OmniSciDB  dfae7c3b14
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)
 
 OmniSciStatement (String tsession, OmniSci.Client tclient)
 
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 = 100000
 
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

◆ OmniSciStatement() [1/2]

com.omnisci.jdbc.OmniSciStatement.OmniSciStatement ( String  tsession,
OmniSciConnection  tconnection 
)
inlinepackage

◆ OmniSciStatement() [2/2]

com.omnisci.jdbc.OmniSciStatement.OmniSciStatement ( String  tsession,
OmniSci.Client  tclient 
)
inlinepackage

Definition at line 56 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.client.

56  {
57  session = tsession;
58  client = tclient;
59  }

Member Function Documentation

◆ addBatch()

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

Definition at line 319 of file OmniSciStatement.java.

319  { // logger.debug("Entered");
320  throw new UnsupportedOperationException("Not supported yet,"
321  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
322  + " class:" + new Throwable().getStackTrace()[0].getClassName()
323  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
324  }

◆ cancel()

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

Definition at line 113 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.checkClosed(), com.omnisci.jdbc.OmniSciConnection.client, com.omnisci.jdbc.OmniSciConnection.closeConnection(), com.omnisci.jdbc.OmniSciConnection.getAlternateConnection(), and com.omnisci.jdbc.OmniSciExceptionText.getExceptionDetail().

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

◆ checkClosed()

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

Definition at line 547 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.getMoreResults(), com.omnisci.jdbc.OmniSciStatement.getResultSet(), and com.omnisci.jdbc.OmniSciStatement.getUpdateCount().

547  {
548  if (isClosed) {
549  throw new SQLException("Statement is closed.");
550  }
551  }
+ Here is the caller graph for this function:

◆ clearBatch()

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

Definition at line 327 of file OmniSciStatement.java.

327  { // logger.debug("Entered");
328  throw new UnsupportedOperationException("Not supported yet,"
329  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
330  + " class:" + new Throwable().getStackTrace()[0].getClassName()
331  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
332  }

◆ clearWarnings()

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

Definition at line 226 of file OmniSciStatement.java.

226  { // logger.debug("Entered");
227  rootWarning = null;
228  }

◆ close()

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

Definition at line 158 of file OmniSciStatement.java.

Referenced by omnisci.connection.Connection.__del__(), omnisci.cursor.Cursor.__exit__(), omnisci.connection.Connection.__exit__(), and com.omnisci.jdbc.OmniSciPreparedStatement.close().

158  { // logger.debug("Entered");
159  if (currentRS != null) {
160  currentRS.close();
161  }
162  isClosed = true;
163  }
+ Here is the caller graph for this function:

◆ closeOnCompletion()

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

Definition at line 452 of file OmniSciStatement.java.

452  { // logger.debug("Entered");
453  throw new UnsupportedOperationException("Not supported yet,"
454  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
455  + " class:" + new Throwable().getStackTrace()[0].getClassName()
456  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
457  }

◆ execute() [1/4]

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

Definition at line 239 of file OmniSciStatement.java.

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

Referenced by com.omnisci.jdbc.OmniSciPreparedStatement.execute(), and omnisci.cursor.Cursor.executemany().

239  { // logger.debug("Entered");
240  ResultSet rs = executeQuery(sql);
241  if (rs != null) {
242  return true;
243  } else {
244  return false;
245  }
246  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ execute() [2/4]

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

Definition at line 395 of file OmniSciStatement.java.

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

396  { // logger.debug("Entered");
397  throw new UnsupportedOperationException("Not supported yet,"
398  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
399  + " class:" + new Throwable().getStackTrace()[0].getClassName()
400  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
401  }
+ Here is the caller graph for this function:

◆ execute() [3/4]

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

Definition at line 404 of file OmniSciStatement.java.

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

405  { // logger.debug("Entered");
406  throw new UnsupportedOperationException("Not supported yet,"
407  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
408  + " class:" + new Throwable().getStackTrace()[0].getClassName()
409  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
410  }
+ Here is the caller graph for this function:

◆ execute() [4/4]

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

Definition at line 413 of file OmniSciStatement.java.

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

414  { // logger.debug("Entered");
415  throw new UnsupportedOperationException("Not supported yet,"
416  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
417  + " class:" + new Throwable().getStackTrace()[0].getClassName()
418  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
419  }
+ Here is the caller graph for this function:

◆ executeBatch()

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

Definition at line 335 of file OmniSciStatement.java.

335  { // logger.debug("Entered");
336  throw new UnsupportedOperationException("Not supported yet,"
337  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
338  + " class:" + new Throwable().getStackTrace()[0].getClassName()
339  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
340  }

◆ executeQuery()

ResultSet com.omnisci.jdbc.OmniSciStatement.executeQuery ( String  sql) throws SQLException
inline

Definition at line 65 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.checkClosed(), com.omnisci.jdbc.OmniSciStatement.client, com.omnisci.jdbc.OmniSciStatement.currentRS, com.omnisci.jdbc.OmniSciExceptionText.getExceptionDetail(), com.omnisci.jdbc.OmniSciStatement.maxRows, com.omnisci.jdbc.OmniSciEscapeParser.parse(), and com.omnisci.jdbc.OmniSciStatement.simplisticDateTransform().

Referenced by com.omnisci.jdbc.OmniSciStatement.execute(), and com.omnisci.jdbc.OmniSciPreparedStatement.executeQuery().

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

◆ executeUpdate() [1/4]

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

Definition at line 135 of file OmniSciStatement.java.

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

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

◆ executeUpdate() [2/4]

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

Definition at line 368 of file OmniSciStatement.java.

369  { // logger.debug("Entered");
370  throw new UnsupportedOperationException("Not supported yet,"
371  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
372  + " class:" + new Throwable().getStackTrace()[0].getClassName()
373  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
374  }

◆ executeUpdate() [3/4]

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

Definition at line 377 of file OmniSciStatement.java.

378  { // logger.debug("Entered");
379  throw new UnsupportedOperationException("Not supported yet,"
380  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
381  + " class:" + new Throwable().getStackTrace()[0].getClassName()
382  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
383  }

◆ executeUpdate() [4/4]

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

Definition at line 386 of file OmniSciStatement.java.

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

◆ getConnection()

Connection com.omnisci.jdbc.OmniSciStatement.getConnection ( ) throws SQLException
inline

Definition at line 343 of file OmniSciStatement.java.

343  { // logger.debug("Entered");
344  throw new UnsupportedOperationException("Not supported yet,"
345  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
346  + " class:" + new Throwable().getStackTrace()[0].getClassName()
347  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
348  }

◆ getFetchDirection()

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

Definition at line 279 of file OmniSciStatement.java.

279  { // logger.debug("Entered");
280  return ResultSet.FETCH_FORWARD;
281  }

◆ getFetchSize()

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

Definition at line 295 of file OmniSciStatement.java.

295  { // logger.debug("Entered");
296  throw new UnsupportedOperationException("Not supported yet,"
297  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
298  + " class:" + new Throwable().getStackTrace()[0].getClassName()
299  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
300  }

◆ getGeneratedKeys()

ResultSet com.omnisci.jdbc.OmniSciStatement.getGeneratedKeys ( ) throws SQLException
inline

Definition at line 360 of file OmniSciStatement.java.

360  { // logger.debug("Entered");
361  throw new UnsupportedOperationException("Not supported yet,"
362  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
363  + " class:" + new Throwable().getStackTrace()[0].getClassName()
364  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
365  }

◆ getMaxFieldSize()

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

Definition at line 166 of file OmniSciStatement.java.

166  { // logger.debug("Entered");
167  throw new UnsupportedOperationException("Not supported yet,"
168  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
169  + " class:" + new Throwable().getStackTrace()[0].getClassName()
170  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
171  }

◆ getMaxRows()

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

Definition at line 182 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.maxRows.

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

182  { // logger.debug("Entered");
183  return maxRows;
184  }
+ Here is the caller graph for this function:

◆ getMoreResults() [1/2]

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

Definition at line 263 of file OmniSciStatement.java.

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

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

263  { // logger.debug("Entered");
264  checkClosed();
265  // TODO MAT this needs to be fixed for complex queries
266  return false;
267  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMoreResults() [2/2]

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

Definition at line 351 of file OmniSciStatement.java.

352  { // logger.debug("Entered");
353  throw new UnsupportedOperationException("Not supported yet,"
354  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
355  + " class:" + new Throwable().getStackTrace()[0].getClassName()
356  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
357  }

◆ getQueryInternalExecuteTime()

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

Definition at line 203 of file OmniSciStatement.java.

204  { // logger.debug("Entered");
205  return (int) sqlResult.execution_time_ms;
206  }

◆ getQueryTimeout()

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

Definition at line 198 of file OmniSciStatement.java.

198  { // logger.debug("Entered");
199  return 0;
200  }

◆ getResultSet()

ResultSet com.omnisci.jdbc.OmniSciStatement.getResultSet ( ) throws SQLException
inline

Definition at line 249 of file OmniSciStatement.java.

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

Referenced by com.omnisci.jdbc.OmniSciPreparedStatement.getMetaData(), and com.omnisci.jdbc.OmniSciPreparedStatement.getResultSet().

249  { // logger.debug("Entered");
250  checkClosed();
251  return currentRS;
252  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getResultSetConcurrency()

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

Definition at line 303 of file OmniSciStatement.java.

303  { // logger.debug("Entered");
304  throw new UnsupportedOperationException("Not supported yet,"
305  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
306  + " class:" + new Throwable().getStackTrace()[0].getClassName()
307  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
308  }

◆ getResultSetHoldability()

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

Definition at line 422 of file OmniSciStatement.java.

422  { // logger.debug("Entered");
423  throw new UnsupportedOperationException("Not supported yet,"
424  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
425  + " class:" + new Throwable().getStackTrace()[0].getClassName()
426  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
427  }

◆ getResultSetType()

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

Definition at line 311 of file OmniSciStatement.java.

311  { // logger.debug("Entered");
312  throw new UnsupportedOperationException("Not supported yet,"
313  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
314  + " class:" + new Throwable().getStackTrace()[0].getClassName()
315  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
316  }

◆ getUpdateCount()

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

Definition at line 255 of file OmniSciStatement.java.

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

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

255  { // logger.debug("Entered");
256  checkClosed();
257  // TODO: OmniSciDB supports updates, inserts and deletes, but
258  // there is no way to get number of affected rows at the moment
259  return -1;
260  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getWarnings()

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

Definition at line 221 of file OmniSciStatement.java.

221  { // logger.debug("Entered");
222  return (rootWarning);
223  }

◆ isClosed()

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

Definition at line 430 of file OmniSciStatement.java.

430  { // logger.debug("Entered");
431  return isClosed;
432  }

◆ isCloseOnCompletion()

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

Definition at line 460 of file OmniSciStatement.java.

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

◆ isPoolable()

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

Definition at line 444 of file OmniSciStatement.java.

444  { // logger.debug("Entered");
445  throw new UnsupportedOperationException("Not supported yet,"
446  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
447  + " class:" + new Throwable().getStackTrace()[0].getClassName()
448  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
449  }

◆ isWrapperFor()

boolean com.omnisci.jdbc.OmniSciStatement.isWrapperFor ( Class<?>  iface) throws SQLException
inline

Definition at line 476 of file OmniSciStatement.java.

477  { // logger.debug("Entered");
478  throw new UnsupportedOperationException("Not supported yet,"
479  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
480  + " class:" + new Throwable().getStackTrace()[0].getClassName()
481  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
482  }

◆ setCursorName()

void com.omnisci.jdbc.OmniSciStatement.setCursorName ( String  name) throws SQLException
inline

Definition at line 231 of file OmniSciStatement.java.

231  { // logger.debug("Entered");
232  throw new UnsupportedOperationException("Not supported yet,"
233  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
234  + " class:" + new Throwable().getStackTrace()[0].getClassName()
235  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
236  }

◆ setEscapeProcessing()

void com.omnisci.jdbc.OmniSciStatement.setEscapeProcessing ( boolean  enable) throws SQLException
inline

Definition at line 192 of file OmniSciStatement.java.

193  { // logger.debug("Entered");
194  escapeProcessing = enable;
195  }

◆ setFetchDirection()

void com.omnisci.jdbc.OmniSciStatement.setFetchDirection ( int  direction) throws SQLException
inline

Definition at line 270 of file OmniSciStatement.java.

271  { // logger.debug("Entered");
272  throw new UnsupportedOperationException("Not supported yet,"
273  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
274  + " class:" + new Throwable().getStackTrace()[0].getClassName()
275  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
276  }

◆ setFetchSize()

void com.omnisci.jdbc.OmniSciStatement.setFetchSize ( int  rows) throws SQLException
inline

Definition at line 284 of file OmniSciStatement.java.

284  { // logger.debug("Entered");
285  SQLWarning warning = new SQLWarning(
286  "Query FetchSize are not supported. Substituting a value of zero.");
287  if (rootWarning == null) {
288  rootWarning = warning;
289  } else {
290  rootWarning.setNextWarning(warning);
291  }
292  }

◆ setMaxFieldSize()

void com.omnisci.jdbc.OmniSciStatement.setMaxFieldSize ( int  max) throws SQLException
inline

Definition at line 174 of file OmniSciStatement.java.

174  { // logger.debug("Entered");
175  throw new UnsupportedOperationException("Not supported yet,"
176  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
177  + " class:" + new Throwable().getStackTrace()[0].getClassName()
178  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
179  }

◆ setMaxRows()

void com.omnisci.jdbc.OmniSciStatement.setMaxRows ( int  max) throws SQLException
inline

Definition at line 187 of file OmniSciStatement.java.

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

187  { // logger.debug("Entered");
188  maxRows = max;
189  }
+ Here is the caller graph for this function:

◆ setPoolable()

void com.omnisci.jdbc.OmniSciStatement.setPoolable ( boolean  poolable) throws SQLException
inline

Definition at line 435 of file OmniSciStatement.java.

436  { // logger.debug("Entered");
437  throw new UnsupportedOperationException("Not supported yet,"
438  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
439  + " class:" + new Throwable().getStackTrace()[0].getClassName()
440  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
441  }

◆ setQueryTimeout()

void com.omnisci.jdbc.OmniSciStatement.setQueryTimeout ( int  seconds) throws SQLException
inline

Definition at line 209 of file OmniSciStatement.java.

210  { // logger.debug("Entered");
211  SQLWarning warning = new SQLWarning(
212  "Query timeouts are not supported. Substituting a value of zero.");
213  if (rootWarning == null) {
214  rootWarning = warning;
215  } else {
216  rootWarning.setNextWarning(warning);
217  }
218  }

◆ simplisticDateTransform()

static String com.omnisci.jdbc.OmniSciStatement.simplisticDateTransform ( String  sql)
inlinestatic

Definition at line 513 of file OmniSciStatement.java.

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

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

◆ unwrap()

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

Definition at line 468 of file OmniSciStatement.java.

468  { // logger.debug("Entered");
469  throw new UnsupportedOperationException("Not supported yet,"
470  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
471  + " class:" + new Throwable().getStackTrace()[0].getClassName()
472  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
473  }

Member Data Documentation

◆ client

OmniSci.Client com.omnisci.jdbc.OmniSciStatement.client
private

◆ connection

OmniSciConnection com.omnisci.jdbc.OmniSciStatement.connection
private

Definition at line 43 of file OmniSciStatement.java.

◆ CURRENTDATE

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

Definition at line 510 of file OmniSciStatement.java.

◆ currentRS

ResultSet com.omnisci.jdbc.OmniSciStatement.currentRS = null
private

◆ DAYOFWEEK

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

Definition at line 488 of file OmniSciStatement.java.

◆ DAYOFYEAR

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

Definition at line 486 of file OmniSciStatement.java.

◆ escapeProcessing

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

Definition at line 47 of file OmniSciStatement.java.

◆ isClosed

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

Definition at line 48 of file OmniSciStatement.java.

◆ logger

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

Definition at line 38 of file OmniSciStatement.java.

◆ maxRows

int com.omnisci.jdbc.OmniSciStatement.maxRows = 100000
private

◆ QUARTER

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

Definition at line 484 of file OmniSciStatement.java.

◆ rootWarning

SQLWarning com.omnisci.jdbc.OmniSciStatement.rootWarning = null

Definition at line 39 of file OmniSciStatement.java.

◆ session

String com.omnisci.jdbc.OmniSciStatement.session
private

Definition at line 41 of file OmniSciStatement.java.

Referenced by 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_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_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().

◆ sqlResult

TQueryResult com.omnisci.jdbc.OmniSciStatement.sqlResult = null
private

Definition at line 45 of file OmniSciStatement.java.

◆ top_pattern

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

Definition at line 61 of file OmniSciStatement.java.

◆ WEEK

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

Definition at line 490 of file OmniSciStatement.java.


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