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

Public Member Functions

ResultSet executeQuery (String sql) throws SQLException
 
void cancel () throws SQLException
 
int executeUpdate (String sql) throws SQLException
 
void close () throws SQLException
 
int getMaxFieldSize () throws SQLException
 
void setMaxFieldSize (int max) throws SQLException
 
int getMaxRows () throws SQLException
 
void setMaxRows (int max) throws SQLException
 
void setEscapeProcessing (boolean enable) throws SQLException
 
int getQueryTimeout () throws SQLException
 
int getQueryInternalExecuteTime () throws SQLException
 
void setQueryTimeout (int seconds) throws SQLException
 
SQLWarning getWarnings () throws SQLException
 
void clearWarnings () throws SQLException
 
void setCursorName (String name) throws SQLException
 
boolean execute (String sql) throws SQLException
 
ResultSet getResultSet () throws SQLException
 
int getUpdateCount () throws SQLException
 
boolean getMoreResults () throws SQLException
 
void setFetchDirection (int direction) throws SQLException
 
int getFetchDirection () throws SQLException
 
void setFetchSize (int rows) throws SQLException
 
int getFetchSize () throws SQLException
 
int getResultSetConcurrency () throws SQLException
 
int getResultSetType () throws SQLException
 
void addBatch (String sql) throws SQLException
 
void clearBatch () throws SQLException
 
int[] executeBatch () throws SQLException
 
Connection getConnection () throws SQLException
 
boolean getMoreResults (int current) throws SQLException
 
ResultSet getGeneratedKeys () throws SQLException
 
int executeUpdate (String sql, int autoGeneratedKeys) throws SQLException
 
int executeUpdate (String sql, int[] columnIndexes) throws SQLException
 
int executeUpdate (String sql, String[] columnNames) throws SQLException
 
boolean execute (String sql, int autoGeneratedKeys) throws SQLException
 
boolean execute (String sql, int[] columnIndexes) throws SQLException
 
boolean execute (String sql, String[] columnNames) throws SQLException
 
int getResultSetHoldability () throws SQLException
 
boolean isClosed () throws SQLException
 
void setPoolable (boolean poolable) throws SQLException
 
boolean isPoolable () throws SQLException
 
void closeOnCompletion () throws SQLException
 
boolean isCloseOnCompletion () throws SQLException
 
boolean isWrapperFor (Class<?> iface) throws SQLException
 

Static Public Member Functions

static String simplisticDateTransform (String sql)
 

Public Attributes

SQLWarning rootWarning = null
 

Package Functions

 OmniSciStatement (String tsession, OmniSciConnection tconnection)
 
public< T > T unwrap (Class< T > iface) throws SQLException
 

Static Package Attributes

static final org.slf4j.Logger logger = LoggerFactory.getLogger(OmniSciStatement.class)
 
static Pattern top_pattern
 

Private Member Functions

void checkClosed () throws SQLException
 

Private Attributes

String session
 
OmniSci.Client client
 
OmniSciConnection connection
 
ResultSet currentRS = null
 
TQueryResult sqlResult = null
 
int maxRows
 
boolean escapeProcessing = false
 
boolean isClosed = false
 

Static Private Attributes

static final Pattern QUARTER
 
static final Pattern DAYOFYEAR
 
static final Pattern DAYOFWEEK
 
static final Pattern WEEK
 
static final Pattern CURRENTDATE
 

Detailed Description

Author
michael

Definition at line 37 of file OmniSciStatement.java.

Constructor & Destructor Documentation

Member Function Documentation

void com.omnisci.jdbc.OmniSciStatement.addBatch ( String  sql) throws SQLException
inline

Definition at line 317 of file OmniSciStatement.java.

317  { // logger.debug("Entered");
318  throw new UnsupportedOperationException("Not supported yet,"
319  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
320  + " class:" + new Throwable().getStackTrace()[0].getClassName()
321  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
322  }
void com.omnisci.jdbc.OmniSciStatement.cancel ( ) throws SQLException
inline

Definition at line 111 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.checkClosed(), com.omnisci.jdbc.OmniSciExceptionText.getExceptionDetail(), and com.omnisci.jdbc.OmniSciStatement.session.

111  { // logger.debug("Entered");
112  checkClosed();
113  OmniSciConnection alternate_connection = null;
114  try {
115  alternate_connection = connection.getAlternateConnection();
116  // Note alternate_connection shares a session with original connection
117  alternate_connection.client.interrupt(session, session);
118  } catch (TOmniSciException ttE) {
119  throw new SQLException("Thrift transport connection failed - "
120  + OmniSciExceptionText.getExceptionDetail(ttE),
121  ttE);
122  } catch (TException tE) {
123  throw new SQLException(
124  "Thrift failed - " + OmniSciExceptionText.getExceptionDetail(tE), tE);
125  } finally {
126  // Note closeConnection only closes the underlying thrft connection
127  // not the logical db session connection
128  alternate_connection.closeConnection();
129  }
130  }

+ Here is the call graph for this function:

void com.omnisci.jdbc.OmniSciStatement.checkClosed ( ) throws SQLException
inlineprivate

Definition at line 542 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.isClosed().

Referenced by com.omnisci.jdbc.OmniSciStatement.cancel(), com.omnisci.jdbc.OmniSciStatement.executeQuery(), com.omnisci.jdbc.OmniSciStatement.executeUpdate(), com.omnisci.jdbc.OmniSciStatement.getMoreResults(), com.omnisci.jdbc.OmniSciStatement.getResultSet(), and com.omnisci.jdbc.OmniSciStatement.getUpdateCount().

542  {
543  if (isClosed) {
544  throw new SQLException("Statement is closed.");
545  }
546  }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void com.omnisci.jdbc.OmniSciStatement.clearBatch ( ) throws SQLException
inline

Definition at line 325 of file OmniSciStatement.java.

325  { // logger.debug("Entered");
326  throw new UnsupportedOperationException("Not supported yet,"
327  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
328  + " class:" + new Throwable().getStackTrace()[0].getClassName()
329  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
330  }
void com.omnisci.jdbc.OmniSciStatement.clearWarnings ( ) throws SQLException
inline

Definition at line 224 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.rootWarning.

224  { // logger.debug("Entered");
225  rootWarning = null;
226  }
void com.omnisci.jdbc.OmniSciStatement.close ( ) throws SQLException
inline

Definition at line 156 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.currentRS, and com.omnisci.jdbc.OmniSciStatement.isClosed().

Referenced by omnisci.connection.Connection.__del__(), omnisci.cursor.Cursor.__exit__(), and omnisci.connection.Connection.__exit__().

156  { // logger.debug("Entered");
157  if (currentRS != null) {
158  currentRS.close();
159  }
160  isClosed = true;
161  }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void com.omnisci.jdbc.OmniSciStatement.closeOnCompletion ( ) throws SQLException
inline

Definition at line 447 of file OmniSciStatement.java.

447  { // logger.debug("Entered");
448  throw new UnsupportedOperationException("Not supported yet,"
449  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
450  + " class:" + new Throwable().getStackTrace()[0].getClassName()
451  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
452  }
boolean com.omnisci.jdbc.OmniSciStatement.execute ( String  sql) throws SQLException
inline

Definition at line 237 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.executeQuery().

Referenced by omnisci.cursor.Cursor.executemany().

237  { // logger.debug("Entered");
238  ResultSet rs = executeQuery(sql);
239  if (rs != null) {
240  return true;
241  } else {
242  return false;
243  }
244  }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

boolean com.omnisci.jdbc.OmniSciStatement.execute ( String  sql,
int  autoGeneratedKeys 
) throws SQLException
inline

Definition at line 390 of file OmniSciStatement.java.

Referenced by omnisci.cursor.Cursor.executemany().

391  { // logger.debug("Entered");
392  throw new UnsupportedOperationException("Not supported yet,"
393  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
394  + " class:" + new Throwable().getStackTrace()[0].getClassName()
395  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
396  }

+ Here is the caller graph for this function:

boolean com.omnisci.jdbc.OmniSciStatement.execute ( String  sql,
int[]  columnIndexes 
) throws SQLException
inline

Definition at line 399 of file OmniSciStatement.java.

Referenced by omnisci.cursor.Cursor.executemany().

400  { // logger.debug("Entered");
401  throw new UnsupportedOperationException("Not supported yet,"
402  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
403  + " class:" + new Throwable().getStackTrace()[0].getClassName()
404  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
405  }

+ Here is the caller graph for this function:

boolean com.omnisci.jdbc.OmniSciStatement.execute ( String  sql,
String[]  columnNames 
) throws SQLException
inline

Definition at line 408 of file OmniSciStatement.java.

Referenced by omnisci.cursor.Cursor.executemany().

409  { // logger.debug("Entered");
410  throw new UnsupportedOperationException("Not supported yet,"
411  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
412  + " class:" + new Throwable().getStackTrace()[0].getClassName()
413  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
414  }

+ Here is the caller graph for this function:

int [] com.omnisci.jdbc.OmniSciStatement.executeBatch ( ) throws SQLException
inline

Definition at line 333 of file OmniSciStatement.java.

333  { // logger.debug("Entered");
334  throw new UnsupportedOperationException("Not supported yet,"
335  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
336  + " class:" + new Throwable().getStackTrace()[0].getClassName()
337  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
338  }
ResultSet com.omnisci.jdbc.OmniSciStatement.executeQuery ( String  sql) throws SQLException
inline

Definition at line 61 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.checkClosed(), com.omnisci.jdbc.OmniSciStatement.currentRS, com.omnisci.jdbc.OmniSciExceptionText.getExceptionDetail(), com.omnisci.jdbc.OmniSciStatement.maxRows, com.omnisci.jdbc.OmniSciStatement.session, com.omnisci.jdbc.OmniSciStatement.simplisticDateTransform(), split(), and com.omnisci.jdbc.OmniSciStatement.sqlResult.

Referenced by com.omnisci.jdbc.OmniSciStatement.execute().

62  { // logger.debug("Entered");
63  checkClosed();
64  // @TODO: we can and probably should use "first_n" parameter of the sql_execute()
65  // endpoint to force the limit on the query, instead of rewriting it here.
66  if (maxRows >= 0) {
67  // add limit to sql call if it doesn't already have one and is a select
68  String[] tokens = sql.toLowerCase().split(" ", 3);
69  if (tokens[0].equals("select")) {
70  if (sql.toLowerCase().contains("limit")) {
71  // do nothing -
72  } else {
73  // Some applications add TOP <number> to limit the
74  // select statement rather than limit. Remove TOP and keep
75  // the number it used as the limit.
76  Matcher matcher = top_pattern.matcher(sql);
77  // Take "select TOP nnnn <rest ot sql>" and translate to select <reset of sql:
78  // limit nnnn
79  if (matcher.find()) {
80  maxRows = Integer.parseInt(matcher.group(1));
81  sql = top_pattern.matcher(sql).replaceAll("select ");
82  }
83 
84  sql = sql + " LIMIT " + maxRows;
85  logger.debug("Added LIMIT of " + maxRows);
86  }
87  }
88  }
89 
90  logger.debug("Before OmniSciEscapeParser [" + sql + "]");
91  // The order of these to SQL re-writes is important.
92  // EscapeParse needs to come first.
93  String afterEscapeParseSQL = OmniSciEscapeParser.parse(sql);
94  String afterSimpleParse = simplisticDateTransform(afterEscapeParseSQL);
95  logger.debug("After OmniSciEscapeParser [" + afterSimpleParse + "]");
96  try {
97  sqlResult = client.sql_execute(session, afterSimpleParse + ";", true, null, -1, -1);
98  } catch (TOmniSciException ex) {
99  throw new SQLException(
100  "Query failed : " + OmniSciExceptionText.getExceptionDetail(ex));
101  } catch (TException ex) {
102  throw new SQLException(
103  "Query failed : " + OmniSciExceptionText.getExceptionDetail(ex));
104  }
105 
106  currentRS = new OmniSciResultSet(sqlResult, sql);
107  return currentRS;
108  }
static String simplisticDateTransform(String sql)
std::vector< std::string > split(std::string_view str, std::string_view delim, std::optional< size_t > maxsplit)
split apart a string into a vector of substrings

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int com.omnisci.jdbc.OmniSciStatement.executeUpdate ( String  sql) throws SQLException
inline

Definition at line 133 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.checkClosed(), com.omnisci.jdbc.OmniSciExceptionText.getExceptionDetail(), com.omnisci.jdbc.OmniSciStatement.session, and com.omnisci.jdbc.OmniSciStatement.sqlResult.

133  { // logger.debug("Entered");
134  checkClosed();
135  try {
136  // remove " characters if it is a CREATE statement
137  if (sql.trim().substring(0, 6).compareToIgnoreCase("CREATE") == 0) {
138  sql = sql.replace('"', ' ');
139  }
140  sqlResult = client.sql_execute(session, sql + ";", true, null, -1, -1);
141  } catch (TOmniSciException ex) {
142  throw new SQLException("Query failed : sql was '" + sql + "' "
143  + OmniSciExceptionText.getExceptionDetail(ex),
144  ex);
145  } catch (TException ex) {
146  throw new SQLException(
147  "Query failed : " + OmniSciExceptionText.getExceptionDetail(ex), ex);
148  }
149 
150  // TODO: OmniSciDB supports updates, inserts and deletes, but
151  // there is no way to get number of affected rows at the moment
152  return -1;
153  }

+ Here is the call graph for this function:

int com.omnisci.jdbc.OmniSciStatement.executeUpdate ( String  sql,
int  autoGeneratedKeys 
) throws SQLException
inline

Definition at line 363 of file OmniSciStatement.java.

364  { // logger.debug("Entered");
365  throw new UnsupportedOperationException("Not supported yet,"
366  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
367  + " class:" + new Throwable().getStackTrace()[0].getClassName()
368  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
369  }
int com.omnisci.jdbc.OmniSciStatement.executeUpdate ( String  sql,
int[]  columnIndexes 
) throws SQLException
inline

Definition at line 372 of file OmniSciStatement.java.

373  { // logger.debug("Entered");
374  throw new UnsupportedOperationException("Not supported yet,"
375  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
376  + " class:" + new Throwable().getStackTrace()[0].getClassName()
377  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
378  }
int com.omnisci.jdbc.OmniSciStatement.executeUpdate ( String  sql,
String[]  columnNames 
) throws SQLException
inline

Definition at line 381 of file OmniSciStatement.java.

382  { // logger.debug("Entered");
383  throw new UnsupportedOperationException("Not supported yet,"
384  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
385  + " class:" + new Throwable().getStackTrace()[0].getClassName()
386  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
387  }
Connection com.omnisci.jdbc.OmniSciStatement.getConnection ( ) throws SQLException
inline

Definition at line 341 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.connection.

341  { // logger.debug("Entered");
342  return connection;
343  }
int com.omnisci.jdbc.OmniSciStatement.getFetchDirection ( ) throws SQLException
inline

Definition at line 277 of file OmniSciStatement.java.

277  { // logger.debug("Entered");
278  return ResultSet.FETCH_FORWARD;
279  }
int com.omnisci.jdbc.OmniSciStatement.getFetchSize ( ) throws SQLException
inline

Definition at line 293 of file OmniSciStatement.java.

293  { // logger.debug("Entered");
294  throw new UnsupportedOperationException("Not supported yet,"
295  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
296  + " class:" + new Throwable().getStackTrace()[0].getClassName()
297  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
298  }
ResultSet com.omnisci.jdbc.OmniSciStatement.getGeneratedKeys ( ) throws SQLException
inline

Definition at line 355 of file OmniSciStatement.java.

355  { // logger.debug("Entered");
356  throw new UnsupportedOperationException("Not supported yet,"
357  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
358  + " class:" + new Throwable().getStackTrace()[0].getClassName()
359  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
360  }
int com.omnisci.jdbc.OmniSciStatement.getMaxFieldSize ( ) throws SQLException
inline

Definition at line 164 of file OmniSciStatement.java.

164  { // logger.debug("Entered");
165  throw new UnsupportedOperationException("Not supported yet,"
166  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
167  + " class:" + new Throwable().getStackTrace()[0].getClassName()
168  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
169  }
int com.omnisci.jdbc.OmniSciStatement.getMaxRows ( ) throws SQLException
inline

Definition at line 180 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.maxRows.

180  { // logger.debug("Entered");
181  return maxRows;
182  }
boolean com.omnisci.jdbc.OmniSciStatement.getMoreResults ( ) throws SQLException
inline

Definition at line 261 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.checkClosed().

261  { // logger.debug("Entered");
262  checkClosed();
263  // TODO MAT this needs to be fixed for complex queries
264  return false;
265  }

+ Here is the call graph for this function:

boolean com.omnisci.jdbc.OmniSciStatement.getMoreResults ( int  current) throws SQLException
inline

Definition at line 346 of file OmniSciStatement.java.

347  { // logger.debug("Entered");
348  throw new UnsupportedOperationException("Not supported yet,"
349  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
350  + " class:" + new Throwable().getStackTrace()[0].getClassName()
351  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
352  }
int com.omnisci.jdbc.OmniSciStatement.getQueryInternalExecuteTime ( ) throws SQLException
inline

Definition at line 201 of file OmniSciStatement.java.

202  { // logger.debug("Entered");
203  return (int) sqlResult.execution_time_ms;
204  }
int com.omnisci.jdbc.OmniSciStatement.getQueryTimeout ( ) throws SQLException
inline

Definition at line 196 of file OmniSciStatement.java.

196  { // logger.debug("Entered");
197  return 0;
198  }
ResultSet com.omnisci.jdbc.OmniSciStatement.getResultSet ( ) throws SQLException
inline

Definition at line 247 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.checkClosed(), and com.omnisci.jdbc.OmniSciStatement.currentRS.

Referenced by com.omnisci.jdbc.OmniSciPreparedStatement.getMetaData().

247  { // logger.debug("Entered");
248  checkClosed();
249  return currentRS;
250  }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int com.omnisci.jdbc.OmniSciStatement.getResultSetConcurrency ( ) throws SQLException
inline

Definition at line 301 of file OmniSciStatement.java.

301  { // logger.debug("Entered");
302  throw new UnsupportedOperationException("Not supported yet,"
303  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
304  + " class:" + new Throwable().getStackTrace()[0].getClassName()
305  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
306  }
int com.omnisci.jdbc.OmniSciStatement.getResultSetHoldability ( ) throws SQLException
inline

Definition at line 417 of file OmniSciStatement.java.

417  { // logger.debug("Entered");
418  throw new UnsupportedOperationException("Not supported yet,"
419  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
420  + " class:" + new Throwable().getStackTrace()[0].getClassName()
421  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
422  }
int com.omnisci.jdbc.OmniSciStatement.getResultSetType ( ) throws SQLException
inline

Definition at line 309 of file OmniSciStatement.java.

309  { // logger.debug("Entered");
310  throw new UnsupportedOperationException("Not supported yet,"
311  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
312  + " class:" + new Throwable().getStackTrace()[0].getClassName()
313  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
314  }
int com.omnisci.jdbc.OmniSciStatement.getUpdateCount ( ) throws SQLException
inline

Definition at line 253 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.checkClosed().

253  { // logger.debug("Entered");
254  checkClosed();
255  // TODO: OmniSciDB supports updates, inserts and deletes, but
256  // there is no way to get number of affected rows at the moment
257  return -1;
258  }

+ Here is the call graph for this function:

SQLWarning com.omnisci.jdbc.OmniSciStatement.getWarnings ( ) throws SQLException
inline

Definition at line 219 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.rootWarning.

219  { // logger.debug("Entered");
220  return (rootWarning);
221  }
boolean com.omnisci.jdbc.OmniSciStatement.isClosed ( ) throws SQLException
inline

Definition at line 425 of file OmniSciStatement.java.

Referenced by com.omnisci.jdbc.OmniSciStatement.checkClosed(), and com.omnisci.jdbc.OmniSciStatement.close().

425  { // logger.debug("Entered");
426  return isClosed;
427  }

+ Here is the caller graph for this function:

boolean com.omnisci.jdbc.OmniSciStatement.isCloseOnCompletion ( ) throws SQLException
inline

Definition at line 455 of file OmniSciStatement.java.

455  { // logger.debug("Entered");
456  throw new UnsupportedOperationException("Not supported yet,"
457  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
458  + " class:" + new Throwable().getStackTrace()[0].getClassName()
459  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
460  }
boolean com.omnisci.jdbc.OmniSciStatement.isPoolable ( ) throws SQLException
inline

Definition at line 439 of file OmniSciStatement.java.

439  { // logger.debug("Entered");
440  throw new UnsupportedOperationException("Not supported yet,"
441  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
442  + " class:" + new Throwable().getStackTrace()[0].getClassName()
443  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
444  }
boolean com.omnisci.jdbc.OmniSciStatement.isWrapperFor ( Class<?>  iface) throws SQLException
inline

Definition at line 471 of file OmniSciStatement.java.

472  { // logger.debug("Entered");
473  throw new UnsupportedOperationException("Not supported yet,"
474  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
475  + " class:" + new Throwable().getStackTrace()[0].getClassName()
476  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
477  }
void com.omnisci.jdbc.OmniSciStatement.setCursorName ( String  name) throws SQLException
inline

Definition at line 229 of file OmniSciStatement.java.

229  { // logger.debug("Entered");
230  throw new UnsupportedOperationException("Not supported yet,"
231  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
232  + " class:" + new Throwable().getStackTrace()[0].getClassName()
233  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
234  }
void com.omnisci.jdbc.OmniSciStatement.setEscapeProcessing ( boolean  enable) throws SQLException
inline

Definition at line 190 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.escapeProcessing.

191  { // logger.debug("Entered");
192  escapeProcessing = enable;
193  }
void com.omnisci.jdbc.OmniSciStatement.setFetchDirection ( int  direction) throws SQLException
inline

Definition at line 268 of file OmniSciStatement.java.

269  { // logger.debug("Entered");
270  throw new UnsupportedOperationException("Not supported yet,"
271  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
272  + " class:" + new Throwable().getStackTrace()[0].getClassName()
273  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
274  }
void com.omnisci.jdbc.OmniSciStatement.setFetchSize ( int  rows) throws SQLException
inline

Definition at line 282 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.rootWarning.

282  { // logger.debug("Entered");
283  SQLWarning warning = new SQLWarning(
284  "Query FetchSize are not supported. Substituting a value of zero.");
285  if (rootWarning == null) {
286  rootWarning = warning;
287  } else {
288  rootWarning.setNextWarning(warning);
289  }
290  }
void com.omnisci.jdbc.OmniSciStatement.setMaxFieldSize ( int  max) throws SQLException
inline

Definition at line 172 of file OmniSciStatement.java.

172  { // logger.debug("Entered");
173  throw new UnsupportedOperationException("Not supported yet,"
174  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
175  + " class:" + new Throwable().getStackTrace()[0].getClassName()
176  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
177  }
void com.omnisci.jdbc.OmniSciStatement.setMaxRows ( int  max) throws SQLException
inline

Definition at line 185 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.maxRows.

185  { // logger.debug("Entered");
186  maxRows = max;
187  }
void com.omnisci.jdbc.OmniSciStatement.setPoolable ( boolean  poolable) throws SQLException
inline

Definition at line 430 of file OmniSciStatement.java.

431  { // logger.debug("Entered");
432  throw new UnsupportedOperationException("Not supported yet,"
433  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
434  + " class:" + new Throwable().getStackTrace()[0].getClassName()
435  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
436  }
void com.omnisci.jdbc.OmniSciStatement.setQueryTimeout ( int  seconds) throws SQLException
inline

Definition at line 207 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.rootWarning.

208  { // logger.debug("Entered");
209  SQLWarning warning = new SQLWarning(
210  "Query timeouts are not supported. Substituting a value of zero.");
211  if (rootWarning == null) {
212  rootWarning = warning;
213  } else {
214  rootWarning.setNextWarning(warning);
215  }
216  }
static String com.omnisci.jdbc.OmniSciStatement.simplisticDateTransform ( String  sql)
inlinestatic

Definition at line 508 of file OmniSciStatement.java.

Referenced by com.omnisci.jdbc.OmniSciStatement.executeQuery().

508  {
509  // need to iterate as each reduction of string opens up a anew match
510  String start;
511  do {
512  // Example transform - select quarter(val) from table;
513  // will become select extract(quarter from val) from table;
514  // will also replace all CURRENT_TIME and CURRENT_DATE with a call to now().
515  start = sql;
516  sql = QUARTER.matcher(sql).replaceAll(" EXTRACT(QUARTER FROM $1");
517  } while (!sql.equals(start));
518 
519  do {
520  start = sql;
521  sql = DAYOFYEAR.matcher(sql).replaceAll(" EXTRACT(DOY FROM $1");
522  } while (!sql.equals(start));
523 
524  do {
525  start = sql;
526  sql = DAYOFWEEK.matcher(sql).replaceAll(" EXTRACT(ISODOW FROM $1");
527  } while (!sql.equals(start));
528 
529  do {
530  start = sql;
531  sql = WEEK.matcher(sql).replaceAll(" EXTRACT(WEEK FROM $1");
532  } while (!sql.equals(start));
533 
534  do {
535  start = sql;
536  sql = CURRENTDATE.matcher(sql).replaceAll(" cast(now() as date) ");
537  } while (!sql.equals(start));
538 
539  return sql;
540  }

+ Here is the caller graph for this function:

public<T> T com.omnisci.jdbc.OmniSciStatement.unwrap ( Class< T >  iface) throws SQLException
inlinepackage

Definition at line 463 of file OmniSciStatement.java.

463  { // logger.debug("Entered");
464  throw new UnsupportedOperationException("Not supported yet,"
465  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
466  + " class:" + new Throwable().getStackTrace()[0].getClassName()
467  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
468  }

Member Data Documentation

OmniSci.Client com.omnisci.jdbc.OmniSciStatement.client
private
OmniSciConnection com.omnisci.jdbc.OmniSciStatement.connection
private
final Pattern com.omnisci.jdbc.OmniSciStatement.CURRENTDATE
staticprivate
Initial value:
=
Pattern.compile("(?<![\\w.])CURRENT_DATE(?:\\(\\))?(?![\\w.])",
Pattern.DOTALL | Pattern.CASE_INSENSITIVE)

Definition at line 505 of file OmniSciStatement.java.

ResultSet com.omnisci.jdbc.OmniSciStatement.currentRS = null
private
final Pattern com.omnisci.jdbc.OmniSciStatement.DAYOFWEEK
staticprivate
Initial value:
= Pattern.compile(
"\\sDAYOFWEEK\\(([^\\{]*?)", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)

Definition at line 483 of file OmniSciStatement.java.

final Pattern com.omnisci.jdbc.OmniSciStatement.DAYOFYEAR
staticprivate
Initial value:
= Pattern.compile(
"\\sDAYOFYEAR\\(([^\\{]*?)", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)

Definition at line 481 of file OmniSciStatement.java.

boolean com.omnisci.jdbc.OmniSciStatement.escapeProcessing = false
private
boolean com.omnisci.jdbc.OmniSciStatement.isClosed = false
private

Definition at line 48 of file OmniSciStatement.java.

final org.slf4j.Logger com.omnisci.jdbc.OmniSciStatement.logger = LoggerFactory.getLogger(OmniSciStatement.class)
staticpackage

Definition at line 38 of file OmniSciStatement.java.

final Pattern com.omnisci.jdbc.OmniSciStatement.QUARTER
staticprivate
Initial value:
= Pattern.compile(
"\\sQUARTER\\(([^\\{]*?)", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)

Definition at line 479 of file OmniSciStatement.java.

String com.omnisci.jdbc.OmniSciStatement.session
private

Definition at line 41 of file OmniSciStatement.java.

Referenced by com.omnisci.jdbc.OmniSciStatement.cancel(), com.omnisci.jdbc.OmniSciStatement.executeQuery(), com.omnisci.jdbc.OmniSciStatement.executeUpdate(), com.omnisci.jdbc.OmniSciStatement.OmniSciStatement(), omnisci.thrift.OmniSci.disconnect_args.read(), omnisci.thrift.OmniSci.switch_database_args.read(), omnisci.thrift.OmniSci.clone_session_args.read(), omnisci.thrift.OmniSci.get_server_status_args.read(), omnisci.thrift.OmniSci.get_status_args.read(), omnisci.thrift.OmniSci.get_hardware_info_args.read(), omnisci.thrift.OmniSci.get_tables_args.read(), omnisci.thrift.OmniSci.get_physical_tables_args.read(), omnisci.thrift.OmniSci.get_views_args.read(), omnisci.thrift.OmniSci.get_tables_meta_args.read(), omnisci.thrift.OmniSci.get_table_details_args.read(), omnisci.thrift.OmniSci.get_internal_table_details_args.read(), omnisci.thrift.OmniSci.get_users_args.read(), omnisci.thrift.OmniSci.get_databases_args.read(), omnisci.thrift.OmniSci.start_heap_profile_args.read(), omnisci.thrift.OmniSci.stop_heap_profile_args.read(), omnisci.thrift.OmniSci.get_heap_profile_args.read(), omnisci.thrift.OmniSci.get_memory_args.read(), omnisci.thrift.OmniSci.clear_cpu_memory_args.read(), omnisci.thrift.OmniSci.clear_gpu_memory_args.read(), omnisci.thrift.OmniSci.set_table_epoch_args.read(), omnisci.thrift.OmniSci.set_table_epoch_by_name_args.read(), omnisci.thrift.OmniSci.get_table_epoch_args.read(), omnisci.thrift.OmniSci.get_table_epoch_by_name_args.read(), omnisci.thrift.OmniSci.get_table_epochs_args.read(), omnisci.thrift.OmniSci.set_table_epochs_args.read(), omnisci.thrift.OmniSci.get_session_info_args.read(), omnisci.thrift.OmniSci.sql_execute_args.read(), omnisci.thrift.OmniSci.sql_execute_df_args.read(), omnisci.thrift.OmniSci.sql_execute_gdf_args.read(), omnisci.thrift.OmniSci.deallocate_df_args.read(), omnisci.thrift.OmniSci.sql_validate_args.read(), omnisci.thrift.OmniSci.get_completion_hints_args.read(), omnisci.thrift.OmniSci.set_execution_mode_args.read(), omnisci.thrift.OmniSci.render_vega_args.read(), omnisci.thrift.OmniSci.get_result_row_for_pixel_args.read(), omnisci.thrift.OmniSci.get_dashboard_args.read(), omnisci.thrift.OmniSci.get_dashboards_args.read(), omnisci.thrift.OmniSci.create_dashboard_args.read(), omnisci.thrift.OmniSci.replace_dashboard_args.read(), omnisci.thrift.OmniSci.delete_dashboard_args.read(), omnisci.thrift.OmniSci.share_dashboards_args.read(), omnisci.thrift.OmniSci.delete_dashboards_args.read(), omnisci.thrift.OmniSci.share_dashboard_args.read(), omnisci.thrift.OmniSci.unshare_dashboard_args.read(), omnisci.thrift.OmniSci.unshare_dashboards_args.read(), omnisci.thrift.OmniSci.get_dashboard_grantees_args.read(), omnisci.thrift.OmniSci.get_link_view_args.read(), omnisci.thrift.OmniSci.create_link_args.read(), omnisci.thrift.OmniSci.load_table_binary_args.read(), omnisci.thrift.OmniSci.load_table_binary_columnar_args.read(), omnisci.thrift.OmniSci.load_table_binary_arrow_args.read(), omnisci.thrift.OmniSci.load_table_args.read(), omnisci.thrift.OmniSci.detect_column_types_args.read(), omnisci.thrift.OmniSci.create_table_args.read(), omnisci.thrift.OmniSci.import_table_args.read(), omnisci.thrift.OmniSci.import_geo_table_args.read(), omnisci.thrift.OmniSci.import_table_status_args.read(), omnisci.thrift.OmniSci.get_first_geo_file_in_archive_args.read(), omnisci.thrift.OmniSci.get_all_files_in_archive_args.read(), omnisci.thrift.OmniSci.get_layers_in_geo_file_args.read(), omnisci.thrift.OmniSci.query_get_outer_fragment_count_args.read(), omnisci.thrift.OmniSci.check_table_consistency_args.read(), omnisci.thrift.OmniSci.start_render_query_args.read(), omnisci.thrift.OmniSci.insert_data_args.read(), omnisci.thrift.OmniSci.checkpoint_args.read(), omnisci.thrift.OmniSci.get_roles_args.read(), omnisci.thrift.OmniSci.get_db_objects_for_grantee_args.read(), omnisci.thrift.OmniSci.get_db_object_privs_args.read(), omnisci.thrift.OmniSci.get_all_roles_for_user_args.read(), omnisci.thrift.OmniSci.has_role_args.read(), omnisci.thrift.OmniSci.has_object_privilege_args.read(), omnisci.thrift.OmniSci.set_license_key_args.read(), omnisci.thrift.OmniSci.get_license_claims_args.read(), omnisci.thrift.OmniSci.get_device_parameters_args.read(), omnisci.thrift.OmniSci.register_runtime_extension_functions_args.read(), omnisci.thrift.OmniSci.disconnect_args.write(), omnisci.thrift.OmniSci.switch_database_args.write(), omnisci.thrift.OmniSci.clone_session_args.write(), omnisci.thrift.OmniSci.get_server_status_args.write(), omnisci.thrift.OmniSci.get_status_args.write(), omnisci.thrift.OmniSci.get_hardware_info_args.write(), omnisci.thrift.OmniSci.get_tables_args.write(), omnisci.thrift.OmniSci.get_physical_tables_args.write(), omnisci.thrift.OmniSci.get_views_args.write(), omnisci.thrift.OmniSci.get_tables_meta_args.write(), omnisci.thrift.OmniSci.get_table_details_args.write(), omnisci.thrift.OmniSci.get_internal_table_details_args.write(), omnisci.thrift.OmniSci.get_users_args.write(), omnisci.thrift.OmniSci.get_databases_args.write(), omnisci.thrift.OmniSci.start_heap_profile_args.write(), omnisci.thrift.OmniSci.stop_heap_profile_args.write(), omnisci.thrift.OmniSci.get_heap_profile_args.write(), omnisci.thrift.OmniSci.get_memory_args.write(), omnisci.thrift.OmniSci.clear_cpu_memory_args.write(), omnisci.thrift.OmniSci.clear_gpu_memory_args.write(), omnisci.thrift.OmniSci.set_table_epoch_args.write(), omnisci.thrift.OmniSci.set_table_epoch_by_name_args.write(), omnisci.thrift.OmniSci.get_table_epoch_args.write(), omnisci.thrift.OmniSci.get_table_epoch_by_name_args.write(), omnisci.thrift.OmniSci.get_table_epochs_args.write(), omnisci.thrift.OmniSci.set_table_epochs_args.write(), omnisci.thrift.OmniSci.get_session_info_args.write(), omnisci.thrift.OmniSci.sql_execute_args.write(), omnisci.thrift.OmniSci.sql_execute_df_args.write(), omnisci.thrift.OmniSci.sql_execute_gdf_args.write(), omnisci.thrift.OmniSci.deallocate_df_args.write(), omnisci.thrift.OmniSci.sql_validate_args.write(), omnisci.thrift.OmniSci.get_completion_hints_args.write(), omnisci.thrift.OmniSci.set_execution_mode_args.write(), omnisci.thrift.OmniSci.render_vega_args.write(), omnisci.thrift.OmniSci.get_result_row_for_pixel_args.write(), omnisci.thrift.OmniSci.get_dashboard_args.write(), omnisci.thrift.OmniSci.get_dashboards_args.write(), omnisci.thrift.OmniSci.create_dashboard_args.write(), omnisci.thrift.OmniSci.replace_dashboard_args.write(), omnisci.thrift.OmniSci.delete_dashboard_args.write(), omnisci.thrift.OmniSci.share_dashboards_args.write(), omnisci.thrift.OmniSci.delete_dashboards_args.write(), omnisci.thrift.OmniSci.share_dashboard_args.write(), omnisci.thrift.OmniSci.unshare_dashboard_args.write(), omnisci.thrift.OmniSci.unshare_dashboards_args.write(), omnisci.thrift.OmniSci.get_dashboard_grantees_args.write(), omnisci.thrift.OmniSci.get_link_view_args.write(), omnisci.thrift.OmniSci.create_link_args.write(), omnisci.thrift.OmniSci.load_table_binary_args.write(), omnisci.thrift.OmniSci.load_table_binary_columnar_args.write(), omnisci.thrift.OmniSci.load_table_binary_arrow_args.write(), omnisci.thrift.OmniSci.load_table_args.write(), omnisci.thrift.OmniSci.detect_column_types_args.write(), omnisci.thrift.OmniSci.create_table_args.write(), omnisci.thrift.OmniSci.import_table_args.write(), omnisci.thrift.OmniSci.import_geo_table_args.write(), omnisci.thrift.OmniSci.import_table_status_args.write(), omnisci.thrift.OmniSci.get_first_geo_file_in_archive_args.write(), omnisci.thrift.OmniSci.get_all_files_in_archive_args.write(), omnisci.thrift.OmniSci.get_layers_in_geo_file_args.write(), omnisci.thrift.OmniSci.query_get_outer_fragment_count_args.write(), omnisci.thrift.OmniSci.check_table_consistency_args.write(), omnisci.thrift.OmniSci.start_render_query_args.write(), omnisci.thrift.OmniSci.insert_data_args.write(), omnisci.thrift.OmniSci.checkpoint_args.write(), omnisci.thrift.OmniSci.get_roles_args.write(), omnisci.thrift.OmniSci.get_db_objects_for_grantee_args.write(), omnisci.thrift.OmniSci.get_db_object_privs_args.write(), omnisci.thrift.OmniSci.get_all_roles_for_user_args.write(), omnisci.thrift.OmniSci.has_role_args.write(), omnisci.thrift.OmniSci.has_object_privilege_args.write(), omnisci.thrift.OmniSci.set_license_key_args.write(), omnisci.thrift.OmniSci.get_license_claims_args.write(), omnisci.thrift.OmniSci.get_device_parameters_args.write(), and omnisci.thrift.OmniSci.register_runtime_extension_functions_args.write().

TQueryResult com.omnisci.jdbc.OmniSciStatement.sqlResult = null
private
Pattern com.omnisci.jdbc.OmniSciStatement.top_pattern
staticpackage
Initial value:
=
Pattern.compile("select top\\s+([0-9]+)\\s+", Pattern.CASE_INSENSITIVE)

Definition at line 57 of file OmniSciStatement.java.

final Pattern com.omnisci.jdbc.OmniSciStatement.WEEK
staticprivate
Initial value:
= Pattern.compile(
"\\sWEEK\\(([^\\{]*?)", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)

Definition at line 485 of file OmniSciStatement.java.


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