OmniSciDB  0fdbebe030
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
com.omnisci.jdbc.OmniSciStatementTest Class Reference
+ Collaboration diagram for com.omnisci.jdbc.OmniSciStatementTest:

Public Member Functions

void setUp () throws Exception
 
void tearDown () throws Exception
 
void insert_times () throws Exception
 
void create_times () throws Exception
 
void escape_function1 () throws Exception
 
void escape_function2 () throws Exception
 
void escape_function3 () throws Exception
 
void create_types () throws Exception
 

Static Package Attributes

static Properties PROPERTIES = new Property_loader("connection.properties")
 
static final String url = PROPERTIES.getProperty("default_db_connection_url")
 
static final String user = PROPERTIES.getProperty("default_super_user")
 
static final String password = PROPERTIES.getProperty("default_user_password")
 
static String sql_drop_tbl_tm = "drop table if exists test_jdbc_tm_tble"
 
static String sql_create_tbl_tm
 
static String sql_insert_tm_1
 
static String sql_insert_tm_2
 
static String sql_insert_tm_3
 
static String insert_prepare_tm
 
static String sql_insert_tm_4
 
static String sql_select_tm = "select * from test_jdbc_tm_tble"
 
static String sql_drop_tbl = "drop table if exists test_jdbc_types_tble"
 
static String sql_create_tbl
 
static String sql_insert
 
static String sql_select_all = "select * from test_jdbc_types_tble"
 

Private Attributes

Connection m_conn = null
 

Detailed Description

Definition at line 18 of file OmniSciStatementTest.java.

Member Function Documentation

void com.omnisci.jdbc.OmniSciStatementTest.create_times ( ) throws Exception
inline

Definition at line 111 of file OmniSciStatementTest.java.

References com.omnisci.jdbc.OmniSciStatementTest.sql_create_tbl_tm, com.omnisci.jdbc.OmniSciStatementTest.sql_drop_tbl_tm, com.omnisci.jdbc.OmniSciStatementTest.sql_insert_tm_1, com.omnisci.jdbc.OmniSciStatementTest.sql_insert_tm_2, com.omnisci.jdbc.OmniSciStatementTest.sql_insert_tm_3, com.omnisci.jdbc.OmniSciStatementTest.sql_insert_tm_4, and com.omnisci.jdbc.OmniSciStatementTest.sql_select_tm.

111  {
112  Statement statement = m_conn.createStatement();
113  statement.executeUpdate(sql_drop_tbl_tm);
114  statement.executeUpdate(sql_create_tbl_tm);
115 
116  statement.executeUpdate(sql_insert_tm_1);
117  statement.executeUpdate(sql_insert_tm_2);
118  statement.executeUpdate(sql_insert_tm_3);
119  statement.executeUpdate(sql_insert_tm_4);
120  ResultSet rs = statement.executeQuery(sql_select_tm);
121 
122  for (int i = 0; rs.next(); ++i) {
123  TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
124  Timestamp timestamp = rs.getTimestamp("m_timestamp");
125 
126  Timestamp timestamp_3 = rs.getTimestamp("m_timestamp_3");
127  Timestamp timestamp_6 = rs.getTimestamp("m_timestamp_6");
128  Timestamp timestamp_9 = rs.getTimestamp("m_timestamp_9");
129  if (i == 0) {
130  assertEquals("1910-01-01 00:00:10.0", timestamp.toString());
131  assertEquals("1910-01-01 00:00:10.001", timestamp_3.toString());
132  assertEquals("1910-01-01 00:00:10.555556", timestamp_6.toString());
133  assertEquals("1910-01-01 00:00:10.999999999", timestamp_9.toString());
134  }
135  if (i == 1) {
136  assertEquals("1969-12-31 23:00:00.0", timestamp.toString());
137  assertEquals("1969-12-31 23:00:00.001", timestamp_3.toString());
138  assertEquals("1969-12-31 23:00:00.000001", timestamp_6.toString());
139  assertEquals("1969-12-31 23:00:00.000000001", timestamp_9.toString());
140  }
141  if (i == 2) {
142  assertEquals("1970-01-01 00:00:10.0", timestamp.toString());
143  assertEquals("1970-01-01 00:00:10.001", timestamp_3.toString());
144  assertEquals("1970-01-01 00:00:10.000001", timestamp_6.toString());
145  assertEquals("1970-01-01 00:00:10.000000001", timestamp_9.toString());
146  }
147  if (i == 3) {
148  assertEquals("2970-01-01 00:00:10.0", timestamp.toString());
149  assertEquals("2970-01-01 00:00:10.001", timestamp_3.toString());
150  assertEquals("2970-01-01 00:00:10.000001", timestamp_6.toString());
151  assertEquals("2262-04-11 23:47:16.850000001", timestamp_9.toString());
152  }
153  }
154 
155  statement.executeUpdate(sql_drop_tbl_tm);
156  }
void com.omnisci.jdbc.OmniSciStatementTest.create_types ( ) throws Exception
inline

Definition at line 434 of file OmniSciStatementTest.java.

References Double, Float, Integer, com.omnisci.jdbc.OmniSciStatementTest.sql_create_tbl, com.omnisci.jdbc.OmniSciStatementTest.sql_drop_tbl, com.omnisci.jdbc.OmniSciStatementTest.sql_insert, and com.omnisci.jdbc.OmniSciStatementTest.sql_select_all.

434  {
435  Statement statement = m_conn.createStatement();
436  statement.executeQuery(sql_drop_tbl);
437  statement.executeUpdate(sql_create_tbl);
438  statement.executeUpdate(sql_insert);
439  statement.executeUpdate(sql_insert);
440  ResultSet rs = statement.executeQuery(sql_select_all);
441 
442  int i = 0;
443  for (; rs.next(); ++i) {
444  int r_int = rs.getInt("m_int");
445  assertEquals(Integer.MAX_VALUE, r_int);
446  float r_float = rs.getFloat("m_float");
447  float delta_f = ulp(Float.MAX_VALUE);
448  assertEquals(Float.MAX_VALUE, r_float, delta_f);
449 
450  double r_double = rs.getDouble("m_double");
451  double delta_d = ulp(Double.MAX_VALUE);
452  assertEquals(Double.MAX_VALUE, r_double, delta_d);
453 
454  long r_long = rs.getLong("m_bigint");
455  assertEquals(Long.MAX_VALUE, r_long);
456 
457  short r_short = rs.getShort("m_smallint");
458  assertEquals(Short.MAX_VALUE, r_short);
459 
460  byte r_byte = (byte) rs.getShort("m_tinyint");
461  assertEquals(Byte.MAX_VALUE, r_byte);
462 
463  String decimal_str = rs.getString("m_decimal");
464  assertEquals("12345.123", decimal_str);
465 
466  // byte r_boolean = rs.getByte("m_boolean"); Not supported!
467  byte r_boolean = (byte) rs.getShort("m_boolean");
468  assertEquals(0, r_boolean);
469 
470  String r_text_encoded = rs.getString("m_text_encoded");
471  assertEquals("String 1 - encoded", r_text_encoded);
472 
473  String r_text_encoded_none = rs.getString("m_text_encoded_none");
474  assertEquals("String 2 - not encoded", r_text_encoded_none);
475 
476  // Set the tz to GMT to help with compares
477  TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
478 
479  Timestamp r_timestamp = rs.getTimestamp("m_timestamp");
480  assertEquals("1970-01-01 00:00:00.0", r_timestamp.toString());
481 
482  Date r_date = rs.getDate("m_date");
483  assertEquals("1970-01-01", r_date.toString());
484 
485  Time r_time = rs.getTime("m_time");
486  assertEquals("00:00:00", r_time.toString());
487  }
488 
489  assertEquals(2, i);
490 
491  statement.executeUpdate(sql_drop_tbl);
492  }
void com.omnisci.jdbc.OmniSciStatementTest.escape_function1 ( ) throws Exception
inline

Definition at line 185 of file OmniSciStatementTest.java.

References Double.

185  {
186  Statement statement = m_conn.createStatement();
187  TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
188 
189  // Test multiple nested fn {}
190  String d_select =
191  "select {fn cos(1)} as m_cos, {d '1999-01-09'} as m_date, {t '20:00:03'} as m_time, {ts '1990-01-09 20:00:03'} as m_timestamp, {fn week({d '2005-01-24'})} as m_week";
192  ResultSet rs = statement.executeQuery(d_select);
193  for (int i = 0; rs.next(); ++i) {
194  Date r_date = rs.getDate("m_date");
195  assertEquals("1999-01-09", r_date.toString());
196  Time r_time = rs.getTime("m_time");
197  assertEquals("20:00:03", r_time.toString());
198  Timestamp ts_time = rs.getTimestamp("m_timestamp");
199  assertEquals("1990-01-09 20:00:03.0", ts_time.toString());
200  double m_cos = rs.getDouble("m_cos");
201  assertEquals(Double.compare(m_cos, 0.5403023058681398), 0);
202  int m_week = rs.getInt("m_week");
203  assertEquals(m_week, 5);
204  }
205 
206  d_select = "select {fn FLOOR(-1 * {fn dayofmonth({d '1990-01-31'})})} as WWW";
207  rs = statement.executeQuery(d_select);
208  for (int i = 0; rs.next(); ++i) {
209  int www = rs.getInt("WWW");
210  assertEquals(-31, www);
211  }
212  d_select =
213  "select {fn FLOOR(-1 * {fn dayofmonth(cast('1990-01-31' as date))})} as XXX";
214  rs = statement.executeQuery(d_select);
215  for (int i = 0; rs.next(); ++i) {
216  int xxx = rs.getInt("XXX");
217  assertEquals(-31, xxx);
218  }
219 
220  d_select = "select {fn floor(1.005)} as YYY limit 1000 {";
221  try {
222  statement.executeQuery(d_select);
223  assertTrue(false);
224  } catch (RuntimeException rE) {
225  }
226 
227  d_select = "select ' {fn floor(1.005)} as YYY limit 1000 {";
228  try {
229  statement.executeQuery(d_select);
230  assertTrue(false);
231  } catch (RuntimeException rE) {
232  }
233 
234  d_select = "select ' {fn floor(1.005)} as YYY limit 1000 }";
235  try {
236  statement.executeQuery(d_select);
237  assertTrue(false);
238  } catch (RuntimeException rE) {
239  }
240  }
void com.omnisci.jdbc.OmniSciStatementTest.escape_function2 ( ) throws Exception
inline

Definition at line 242 of file OmniSciStatementTest.java.

242  {
243  Statement statement = m_conn.createStatement();
244  TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
245 
246  String sql_drop_tester = "drop table if exists tester";
247 
248  statement.executeUpdate(sql_drop_tester);
249  String sql_create_tester =
250  "CREATE table tester(Connection_start TIMESTAMP, d_start DATE)";
251  statement.executeUpdate(sql_create_tester);
252 
253  String sql_insert_tester1 =
254  "insert into tester values ('2018-11-08 12:19:59', '2018-11-08')";
255  statement.executeUpdate(sql_insert_tester1);
256 
257  // test multiple embedded {} with TIMESTAMPSIDD.
258  String e_statement =
259  "select COUNT( {fn TIMESTAMPDIFF(SQL_TSI_DAY, {fn TIMESTAMPADD(SQL_TSI_DAY,CAST((-1 * (EXTRACT(DAY FROM tester.d_start) - 1)) AS INTEGER),CAST( tester.d_start AS DATE))}, {fn TIMESTAMPADD(SQL_TSI_DAY,CAST((-1 * (EXTRACT(DAY FROM {fn TIMESTAMPADD(SQL_TSI_MONTH,1, tester.d_start)}) - 1)) AS INTEGER),CAST( {fn TIMESTAMPADD(SQL_TSI_MONTH,1, tester.d_start)} AS DATE)) }) }) AS TEMP from tester";
260  ResultSet rs = statement.executeQuery(e_statement);
261  rs = statement.executeQuery(e_statement);
262  for (int i = 0; rs.next(); ++i) {
263  int r_count = rs.getInt("TEMP");
264  assertEquals(r_count, 1);
265  }
266  // test TOP filter.
267  String x_select =
268  "SELECT TOP 1000 sum(1) AS sum_Number_of_Records_ok, {fn TIMESTAMPADD(SQL_TSI_HOUR, EXTRACT(HOUR FROM tester.Connection_Start), CAST(tester.Connection_Start as DATE))} AS thr_Connection_Start_ok FROM tester Where ((tester.Connection_Start >= {ts '2018-11-01 00:00:00'}) AND (tester.Connection_Start <= {ts '2018-11-08 23:59:59'})) GROUP BY 2";
269  rs = statement.executeQuery(x_select);
270  for (int i = 0; rs.next(); ++i) {
271  int r_count = rs.getInt("sum_Number_of_Records_ok");
272  assertEquals(r_count, 1);
273  Timestamp ts_time = rs.getTimestamp("thr_Connection_Start_ok");
274  assertEquals(ts_time.toString(), "2018-11-08 12:00:00.0");
275  }
276 
277  // Test the simple date transformation in OmniSciStatment.
278  String d_simple_quarter = "select quarter(Connection_start) as m_quarter from tester";
279  rs = statement.executeQuery(d_simple_quarter);
280  for (int i = 0; rs.next(); ++i) {
281  int r_quarter = rs.getInt("m_quarter");
282  assertEquals(4, r_quarter);
283  }
284  d_simple_quarter =
285  "select quarter(cast('2019-04-03' as date)) as m_quarter from tester";
286  rs = statement.executeQuery(d_simple_quarter);
287  for (int i = 0; rs.next(); ++i) {
288  int r_quarter = rs.getInt("m_quarter");
289  assertEquals(2, r_quarter);
290  }
291  }
void com.omnisci.jdbc.OmniSciStatementTest.escape_function3 ( ) throws Exception
inline

Definition at line 294 of file OmniSciStatementTest.java.

References Double, and Float.

294  {
295  Statement statement = m_conn.createStatement();
296  TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
297 
298  // ceil
299  String d_ceiling = "select {fn ceiling(1.005)} as YYY";
300  ResultSet rs = statement.executeQuery(d_ceiling);
301  for (int i = 0; rs.next(); ++i) {
302  float yyy = rs.getFloat("YYY");
303  assertEquals(Float.compare(2.0F, yyy), 0);
304  }
305 
306  // floor
307  String d_floor = "select {fn floor(1.005)} as YYY";
308  rs = statement.executeQuery(d_floor);
309  for (int i = 0; rs.next(); ++i) {
310  float yyy = rs.getFloat("YYY");
311  assertEquals(Float.compare(1.0F, yyy), 0);
312  }
313 
314  // ln
315  String d_ln = "select {fn log(10)} as m_ln";
316  rs = statement.executeQuery(d_ln);
317  for (int i = 0; rs.next(); ++i) {
318  double r_ln = rs.getDouble("m_ln");
319  assertEquals(Double.compare(r_ln, 2.302585092994046), 0);
320  }
321  // ln
322  d_ln = "select {fn ln(10)} as m_ln";
323  rs = statement.executeQuery(d_ln);
324  for (int i = 0; rs.next(); ++i) {
325  double r_ln = rs.getDouble("m_ln");
326  assertEquals(Double.compare(r_ln, 2.302585092994046), 0);
327  }
328 
329  // log10
330  String d_log10 = "select {fn log10(10)} as m_log10";
331  rs = statement.executeQuery(d_log10);
332  for (int i = 0; rs.next(); ++i) {
333  double r_log10 = rs.getDouble("m_log10");
334  assertEquals(Double.compare(r_log10, 1), 0);
335  }
336 
337  // abs
338  String d_abs = "select {fn abs(-1.45)} as m_abs";
339  rs = statement.executeQuery(d_abs);
340  for (int i = 0; rs.next(); ++i) {
341  float r_abs = rs.getFloat("m_abs");
342  assertEquals(Float.compare(r_abs, (float) Math.abs(-1.45)), 0);
343  }
344 
345  // power
346  String d_power = "select {fn power(2,10)} as YYY";
347  rs = statement.executeQuery(d_power);
348  for (int i = 0; rs.next(); ++i) {
349  float yyy = rs.getFloat("YYY");
350  assertEquals(Float.compare((float) Math.pow(2, 10), yyy), 0);
351  }
352  // truncate
353  String d_truncate = "select {fn truncate(2.01,1)} as YYY";
354  rs = statement.executeQuery(d_truncate);
355  for (int i = 0; rs.next(); ++i) {
356  float yyy = rs.getFloat("YYY");
357  assertEquals(Float.compare(2.0F, yyy), 0);
358  }
359 
360  // length
361  String d_length = "select {fn length('12345')} as YYY";
362  rs = statement.executeQuery(d_length);
363  for (int i = 0; rs.next(); ++i) {
364  int yyy = rs.getInt("YYY");
365  assertEquals(5, yyy);
366  }
367 
368  // quarter
369  String d_quarter = "select {fn quarter({d '2005-01-24'})} as m_quarter";
370  rs = statement.executeQuery(d_quarter);
371  for (int i = 0; rs.next(); ++i) {
372  int r_quarter = rs.getInt("m_quarter");
373  assertEquals(1, r_quarter);
374  }
375 
376  // day of year
377  String d_dayofyear = "select {fn DAYOFYEAR({d '2005-01-24'})} as m_dayofyear";
378  rs = statement.executeQuery(d_dayofyear);
379  for (int i = 0; rs.next(); ++i) {
380  int r_dayofyear = rs.getInt("m_dayofyear");
381  assertEquals(24, r_dayofyear);
382  }
383 
384  // day of week
385  String d_dayofweek = "select {fn dayofweek({d '2005-01-24'})} as m_dayofweek";
386  rs = statement.executeQuery(d_dayofweek);
387  for (int i = 0; rs.next(); ++i) {
388  int r_dayofweek = rs.getInt("m_dayofweek");
389  assertEquals(2, r_dayofweek);
390  }
391  // day of month
392  String d_dayofmonth = "select {fn dayofmonth({d '2005-01-24'})} as m_dayofmonth";
393  rs = statement.executeQuery(d_dayofmonth);
394  for (int i = 0; rs.next(); ++i) {
395  int r_dayofmonth = rs.getInt("m_dayofmonth");
396  assertEquals(24, r_dayofmonth);
397  }
398  // hour
399  String d_hour = "select {fn hour({ts '2005-01-24 10:11:12'})} as m_hour";
400  rs = statement.executeQuery(d_hour);
401  for (int i = 0; rs.next(); ++i) {
402  int r_hour = rs.getInt("m_hour");
403  assertEquals(10, r_hour);
404  }
405 
406  // current date
407  String d_c =
408  "select {fn TIMESTAMPADD(SQL_TSI_DAY, 1, CURRENT_DATE())} m, TIMESTAMPADD(SQL_TSI_WEEK, 1, CURRENT_DATE) y";
409  ResultSet rx = statement.executeQuery(d_c);
410  for (int i = 0; rx.next(); ++i) {
411  Date r_m = rx.getDate("m");
412  Date r_y = rx.getDate("y");
413  }
414 
415  // current date
416  d_c = "select TIMESTAMPADD(SQL_TSI_DAY, 1, CURRENT_DATE) as m_zzz";
417  rs = statement.executeQuery(d_c);
418  for (int i = 0; rs.next(); ++i) {
419  Timestamp r_zzz = rs.getTimestamp("m_zzz");
420  }
421  // current date
422  d_c = "select TIMESTAMPADD(SQL_TSI_DAY, 1, CURRENT_DATE_TIME) as m_zzz";
423  try {
424  rs = statement.executeQuery(d_c);
425  assertTrue(false);
426  } catch (SQLException sE) {
427  assertTrue(sE.toString().contains("CURRENT_DATE_TIME' not found in any table"));
428  } catch (Exception ex) {
429  assertTrue(false);
430  }
431  }
void com.omnisci.jdbc.OmniSciStatementTest.insert_times ( ) throws Exception
inline

Definition at line 65 of file OmniSciStatementTest.java.

References com.omnisci.jdbc.OmniSciStatementTest.insert_prepare_tm, com.omnisci.jdbc.OmniSciStatementTest.sql_create_tbl_tm, com.omnisci.jdbc.OmniSciStatementTest.sql_drop_tbl_tm, and com.omnisci.jdbc.OmniSciStatementTest.sql_select_tm.

65  {
66  Statement statement = m_conn.createStatement();
67  statement.executeUpdate(sql_drop_tbl_tm);
68  statement.executeUpdate(sql_create_tbl_tm);
69 
70  TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
71  DateFormat date_format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
72 
73  java.util.Date date_tm = date_format.parse("1918-11-11 11:11:00.000");
74  Timestamp tm = new Timestamp(date_tm.getTime());
75 
76  date_tm = date_format.parse("1918-11-11 11:11:00.001");
77  Timestamp tm_3 = new Timestamp(date_tm.getTime());
78 
79  date_tm = date_format.parse("1918-11-11 11:11:00.000");
80  Timestamp tm_6 = new Timestamp(date_tm.getTime());
81  tm_6.setNanos(999999000);
82 
83  date_tm = date_format.parse("1918-11-11 11:11:00.000");
84  Timestamp tm_9 = new Timestamp(date_tm.getTime());
85  tm_9.setNanos(123456789);
86 
87  PreparedStatement pr = m_conn.prepareStatement(insert_prepare_tm);
88  pr.setTimestamp(1, tm);
89  pr.setTimestamp(2, tm_3);
90  pr.setTimestamp(3, tm_6);
91  pr.setTimestamp(4, tm_9);
92 
93  pr.executeUpdate();
94 
95  ResultSet rs = statement.executeQuery(sql_select_tm);
96  while (rs.next()) {
97  Timestamp r_tm = rs.getTimestamp("m_timestamp");
98  assertTrue(r_tm.equals(tm));
99  Timestamp r_tm3 = rs.getTimestamp("m_timestamp_3");
100  assertTrue(r_tm3.equals(tm_3));
101  Timestamp r_tm6 = rs.getTimestamp("m_timestamp_6");
102  assertTrue(r_tm6.equals(tm_6));
103  Timestamp r_tm9 = rs.getTimestamp("m_timestamp_9");
104  assertTrue(r_tm9.equals(tm_9));
105  }
106 
107  statement.executeUpdate(sql_drop_tbl_tm);
108  }
void com.omnisci.jdbc.OmniSciStatementTest.setUp ( ) throws Exception
inline

Definition at line 27 of file OmniSciStatementTest.java.

References com.omnisci.jdbc.OmniSciStatementTest.m_conn, com.omnisci.jdbc.OmniSciStatementTest.password, com.omnisci.jdbc.OmniSciStatementTest.url, and com.omnisci.jdbc.OmniSciStatementTest.user.

27  {
28  Properties pt = new Properties();
29  pt.setProperty("user", user);
30  pt.setProperty("password", password);
31  m_conn = DriverManager.getConnection(url, pt);
32  }
void com.omnisci.jdbc.OmniSciStatementTest.tearDown ( ) throws Exception
inline

Definition at line 35 of file OmniSciStatementTest.java.

35  {
36  m_conn.close();
37  }

Member Data Documentation

String com.omnisci.jdbc.OmniSciStatementTest.insert_prepare_tm
staticpackage
Initial value:
=
"insert into test_jdbc_tm_tble (m_timestamp, m_timestamp_3, m_timestamp_6, m_timestamp_9) values (?, ?, ?, ?)"

Definition at line 56 of file OmniSciStatementTest.java.

Referenced by com.omnisci.jdbc.OmniSciStatementTest.insert_times().

Connection com.omnisci.jdbc.OmniSciStatementTest.m_conn = null
private
final String com.omnisci.jdbc.OmniSciStatementTest.password = PROPERTIES.getProperty("default_user_password")
staticpackage
Properties com.omnisci.jdbc.OmniSciStatementTest.PROPERTIES = new Property_loader("connection.properties")
staticpackage

Definition at line 19 of file OmniSciStatementTest.java.

String com.omnisci.jdbc.OmniSciStatementTest.sql_create_tbl
staticpackage
Initial value:
= "CREATE table test_jdbc_types_tble("
+ "m_decimal DECIMAL(8,3),"
+ "m_int int,"
+ "m_float float,"
+ "m_double double,"
+ "m_bigint BIGINT,"
+ "m_smallint SMALLINT,"
+ "m_tinyint TINYINT,"
+ "m_boolean BOOLEAN,"
+ "m_text_encoded TEXT ENCODING DICT,"
+ "m_text_encoded_none TEXT ENCODING NONE,"
+ "m_time TIME,"
+ "m_date DATE,"
+ "m_timestamp TIMESTAMP)"

Definition at line 160 of file OmniSciStatementTest.java.

Referenced by com.omnisci.jdbc.OmniSciStatementTest.create_types().

String com.omnisci.jdbc.OmniSciStatementTest.sql_create_tbl_tm
staticpackage
Initial value:
= "CREATE table test_jdbc_tm_tble("
+ "m_timestamp TIMESTAMP,"
+ "m_timestamp_3 TIMESTAMP(3),"
+ "m_timestamp_6 TIMESTAMP(6),"
+ "m_timestamp_9 TIMESTAMP(9))"

Definition at line 41 of file OmniSciStatementTest.java.

Referenced by com.omnisci.jdbc.OmniSciStatementTest.create_times(), and com.omnisci.jdbc.OmniSciStatementTest.insert_times().

String com.omnisci.jdbc.OmniSciStatementTest.sql_drop_tbl = "drop table if exists test_jdbc_types_tble"
staticpackage
String com.omnisci.jdbc.OmniSciStatementTest.sql_drop_tbl_tm = "drop table if exists test_jdbc_tm_tble"
staticpackage
String com.omnisci.jdbc.OmniSciStatementTest.sql_insert
staticpackage
Initial value:
= "insert into test_jdbc_types_tble values ("
+ "12345.123" + +Integer.MAX_VALUE + "," + Integer.MAX_VALUE + ","
+ Float.MAX_VALUE + "," + Double.MAX_VALUE + "," + Long.MAX_VALUE + ","
+ Short.MAX_VALUE + "," + Byte.MAX_VALUE + ","
+ "\'0\',"
+ "'String 1 - encoded', 'String 2 - not encoded', '00:00:00', '1970-01-01', '1970-01-01 00:00:00')"

Definition at line 175 of file OmniSciStatementTest.java.

Referenced by com.omnisci.jdbc.OmniSciStatementTest.create_types().

String com.omnisci.jdbc.OmniSciStatementTest.sql_insert_tm_1
staticpackage
Initial value:
=
"insert into test_jdbc_tm_tble values ('1910-01-01 00:00:10', '1910-01-01 00:00:10.001', '1910-01-01 00:00:10.555556', '1910-01-01 00:00:10.999999999')"

Definition at line 47 of file OmniSciStatementTest.java.

Referenced by com.omnisci.jdbc.OmniSciStatementTest.create_times().

String com.omnisci.jdbc.OmniSciStatementTest.sql_insert_tm_2
staticpackage
Initial value:
=
"insert into test_jdbc_tm_tble values ('1969-12-31 23:00:00', '1969-12-31 23:00:00.001', '1969-12-31 23:00:00.000001', '1969-12-31 23:00:00.000000001')"

Definition at line 50 of file OmniSciStatementTest.java.

Referenced by com.omnisci.jdbc.OmniSciStatementTest.create_times().

String com.omnisci.jdbc.OmniSciStatementTest.sql_insert_tm_3
staticpackage
Initial value:
=
"insert into test_jdbc_tm_tble values ('1970-01-01 00:00:10', '1970-01-01 00:00:10.001', '1970-01-01 00:00:10.000001', '1970-01-01 00:00:10.000000001')"

Definition at line 53 of file OmniSciStatementTest.java.

Referenced by com.omnisci.jdbc.OmniSciStatementTest.create_times().

String com.omnisci.jdbc.OmniSciStatementTest.sql_insert_tm_4
staticpackage
Initial value:
=
"insert into test_jdbc_tm_tble values ('2970-01-01 00:00:10', '2970-01-01 00:00:10.001', '2970-01-01 00:00:10.000001', '2262-04-11 23:47:16.850000001')"

Definition at line 60 of file OmniSciStatementTest.java.

Referenced by com.omnisci.jdbc.OmniSciStatementTest.create_times().

String com.omnisci.jdbc.OmniSciStatementTest.sql_select_all = "select * from test_jdbc_types_tble"
staticpackage
String com.omnisci.jdbc.OmniSciStatementTest.sql_select_tm = "select * from test_jdbc_tm_tble"
staticpackage
final String com.omnisci.jdbc.OmniSciStatementTest.url = PROPERTIES.getProperty("default_db_connection_url")
staticpackage
final String com.omnisci.jdbc.OmniSciStatementTest.user = PROPERTIES.getProperty("default_super_user")
staticpackage

The documentation for this class was generated from the following file: