feat(postgres_java): adjust classes LctMsg...

This commit is contained in:
dancingCycle 2022-05-10 14:09:23 +02:00
parent 1c4d3221e4
commit e488cf0f03
2 changed files with 3 additions and 3 deletions

View File

@ -27,8 +27,8 @@ public class LctMsgCreateTable {
//type: 0:echt,1:frei,2:wird benoetigt,3:virtuell
//create a new table called friends and insert five rows into it
st.addBatch("DROP TABLE IF EXISTS lct_msg_x");
st.addBatch("CREATE TABLE lct_msg_x(" + "bs_id bigserial PRIMARY KEY NOT NULL" + ",vc_trip VARCHAR(20) NOT NULL" + ",vc_route VARCHAR(20)" + ",vc_tenant VARCHAR(20)" + ",vc_date VARCHAR(20) NOT NULL" + ",vc_time VARCHAR(20) NOT NULL" + ",vc_lat VARCHAR(20) NOT NULL" + ",vc_lng VARCHAR(20) NOT NULL" + ")");
st.addBatch("DROP TABLE IF EXISTS lct_msg_y");
st.addBatch("CREATE TABLE lct_msg_y(" + "bs_id bigserial PRIMARY KEY NOT NULL" + ",vc_trip VARCHAR(20) NOT NULL" + ",vc_route VARCHAR(20)" + ",vc_tenant VARCHAR(20)" + ",vc_date VARCHAR(20) NOT NULL" + ",vc_time VARCHAR(20) NOT NULL" + ",vc_lat VARCHAR(20) NOT NULL" + ",vc_lon VARCHAR(20) NOT NULL" + ")");
//method returns an array of committed changes
int[] counts = st.executeBatch();

View File

@ -26,7 +26,7 @@ public class LctMsgInsert {
con.setAutoCommit(false);
//create a new table called friends and insert five rows into it
st.addBatch("INSERT INTO lct_msg_x(" + "vc_trip" + ",vc_route" + ",vc_tenant" + ",vc_date" + ",vc_time" + ",vc_lat" + ",vc_lng" + ") VALUES (" + "'4457006'," + "'4457'," + "'EDZ/247'," + "'2022-05-10'," + "'13:34:05,824'," + "'74635669'," + "'534651826')");
st.addBatch("INSERT INTO lct_msg_y(" + "vc_trip" + ",vc_date" + ",vc_time" + ",vc_lat" + ",vc_lon" + ") VALUES (" + "'4457006'," + "'2022-05-10'," + "'13:34:05,824'," + "'74635669'," + "'534651826')");
//method returns an array of committed changes
int[] counts = st.executeBatch();