OmniSciDB  72180abbfe
 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)
 
 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 Attributes

String session
 
OmniSci.Client client
 
OmniSciConnection connection
 
ResultSet currentRS = null
 
TQueryResult sqlResult = null
 
int maxRows = 100000
 
boolean escapeProcessing = 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

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

Member Function Documentation

void com.omnisci.jdbc.OmniSciStatement.addBatch ( String  sql) 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  }
void com.omnisci.jdbc.OmniSciStatement.cancel ( ) throws SQLException
inline

Definition at line 111 of file OmniSciStatement.java.

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

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

+ Here is the call graph for this function:

void com.omnisci.jdbc.OmniSciStatement.clearBatch ( ) 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  }
void com.omnisci.jdbc.OmniSciStatement.clearWarnings ( ) throws SQLException
inline

Definition at line 218 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.rootWarning.

218  { // logger.debug("Entered");
219  rootWarning = null;
220  }
void com.omnisci.jdbc.OmniSciStatement.close ( ) throws SQLException
inline

Definition at line 152 of file OmniSciStatement.java.

152  { // logger.debug("Entered");
153 
154  // clean up after -- nothing to do
155  }
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 231 of file OmniSciStatement.java.

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

231  { // logger.debug("Entered");
232 
233  ResultSet rs = executeQuery(sql);
234  if (rs != null) {
235  return true;
236  } else {
237  return false;
238  }
239  }

+ Here is the call graph for this function:

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

Definition at line 387 of file OmniSciStatement.java.

388  { // logger.debug("Entered");
389  throw new UnsupportedOperationException("Not supported yet,"
390  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
391  + " class:" + new Throwable().getStackTrace()[0].getClassName()
392  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
393  }
boolean com.omnisci.jdbc.OmniSciStatement.execute ( String  sql,
int[]  columnIndexes 
) throws SQLException
inline

Definition at line 396 of file OmniSciStatement.java.

397  { // logger.debug("Entered");
398  throw new UnsupportedOperationException("Not supported yet,"
399  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
400  + " class:" + new Throwable().getStackTrace()[0].getClassName()
401  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
402  }
boolean com.omnisci.jdbc.OmniSciStatement.execute ( String  sql,
String[]  columnNames 
) throws SQLException
inline

Definition at line 405 of file OmniSciStatement.java.

406  { // logger.debug("Entered");
407  throw new UnsupportedOperationException("Not supported yet,"
408  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
409  + " class:" + new Throwable().getStackTrace()[0].getClassName()
410  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
411  }
int [] com.omnisci.jdbc.OmniSciStatement.executeBatch ( ) 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  }
ResultSet com.omnisci.jdbc.OmniSciStatement.executeQuery ( String  sql) throws SQLException
inline

Definition at line 64 of file OmniSciStatement.java.

References 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().

65  { // logger.debug("Entered");
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 132 of file OmniSciStatement.java.

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

132  { // logger.debug("Entered");
133  try {
134  // remove " characters if it is a CREATE statement
135  if (sql.trim().substring(0, 6).compareToIgnoreCase("CREATE") == 0) {
136  sql = sql.replace('"', ' ');
137  }
138  sqlResult = client.sql_execute(session, sql + ";", true, null, -1, -1);
139  } catch (TOmniSciException ex) {
140  throw new SQLException("Query failed : sql was '" + sql + "' "
141  + OmniSciExceptionText.getExceptionDetail(ex),
142  ex);
143  } catch (TException ex) {
144  throw new SQLException(
145  "Query failed : " + OmniSciExceptionText.getExceptionDetail(ex), ex);
146  }
147 
148  return sqlResult.row_set.columns.size();
149  }

+ Here is the call graph for this function:

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

Definition at line 360 of file OmniSciStatement.java.

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

Definition at line 369 of file OmniSciStatement.java.

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

Definition at line 378 of file OmniSciStatement.java.

379  { // logger.debug("Entered");
380  throw new UnsupportedOperationException("Not supported yet,"
381  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
382  + " class:" + new Throwable().getStackTrace()[0].getClassName()
383  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
384  }
Connection com.omnisci.jdbc.OmniSciStatement.getConnection ( ) 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  }
int com.omnisci.jdbc.OmniSciStatement.getFetchDirection ( ) throws SQLException
inline

Definition at line 268 of file OmniSciStatement.java.

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

Definition at line 287 of file OmniSciStatement.java.

287  { // logger.debug("Entered");
288  throw new UnsupportedOperationException("Not supported yet,"
289  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
290  + " class:" + new Throwable().getStackTrace()[0].getClassName()
291  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
292  }
ResultSet com.omnisci.jdbc.OmniSciStatement.getGeneratedKeys ( ) throws SQLException
inline

Definition at line 352 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  }
int com.omnisci.jdbc.OmniSciStatement.getMaxFieldSize ( ) throws SQLException
inline

Definition at line 158 of file OmniSciStatement.java.

158  { // logger.debug("Entered");
159  throw new UnsupportedOperationException("Not supported yet,"
160  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
161  + " class:" + new Throwable().getStackTrace()[0].getClassName()
162  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
163  }
int com.omnisci.jdbc.OmniSciStatement.getMaxRows ( ) throws SQLException
inline

Definition at line 174 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.maxRows.

174  { // logger.debug("Entered");
175  return maxRows;
176  }
boolean com.omnisci.jdbc.OmniSciStatement.getMoreResults ( ) throws SQLException
inline

Definition at line 253 of file OmniSciStatement.java.

253  { // logger.debug("Entered");
254  // TODO MAT this needs to be fixed for complex queries
255  return false;
256  }
boolean com.omnisci.jdbc.OmniSciStatement.getMoreResults ( int  current) throws SQLException
inline

Definition at line 343 of file OmniSciStatement.java.

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

Definition at line 195 of file OmniSciStatement.java.

196  { // logger.debug("Entered");
197  return (int) sqlResult.execution_time_ms;
198  }
int com.omnisci.jdbc.OmniSciStatement.getQueryTimeout ( ) throws SQLException
inline

Definition at line 190 of file OmniSciStatement.java.

190  { // logger.debug("Entered");
191  return 0;
192  }
ResultSet com.omnisci.jdbc.OmniSciStatement.getResultSet ( ) throws SQLException
inline

Definition at line 242 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.currentRS.

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

242  { // logger.debug("Entered");
243  return currentRS;
244  }

+ Here is the caller graph for this function:

int com.omnisci.jdbc.OmniSciStatement.getResultSetConcurrency ( ) 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  }
int com.omnisci.jdbc.OmniSciStatement.getResultSetHoldability ( ) throws SQLException
inline

Definition at line 414 of file OmniSciStatement.java.

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  }
int com.omnisci.jdbc.OmniSciStatement.getResultSetType ( ) 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  }
int com.omnisci.jdbc.OmniSciStatement.getUpdateCount ( ) throws SQLException
inline

Definition at line 247 of file OmniSciStatement.java.

247  { // logger.debug("Entered");
248  // TODO MAT fix update count
249  return 0;
250  }
SQLWarning com.omnisci.jdbc.OmniSciStatement.getWarnings ( ) throws SQLException
inline

Definition at line 213 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.rootWarning.

213  { // logger.debug("Entered");
214  return (rootWarning);
215  }
boolean com.omnisci.jdbc.OmniSciStatement.isClosed ( ) 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  }
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 223 of file OmniSciStatement.java.

223  { // logger.debug("Entered");
224  throw new UnsupportedOperationException("Not supported yet,"
225  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
226  + " class:" + new Throwable().getStackTrace()[0].getClassName()
227  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
228  }
void com.omnisci.jdbc.OmniSciStatement.setEscapeProcessing ( boolean  enable) throws SQLException
inline

Definition at line 184 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.escapeProcessing.

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

Definition at line 259 of file OmniSciStatement.java.

260  { // logger.debug("Entered");
261  throw new UnsupportedOperationException("Not supported yet,"
262  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
263  + " class:" + new Throwable().getStackTrace()[0].getClassName()
264  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
265  }
void com.omnisci.jdbc.OmniSciStatement.setFetchSize ( int  rows) throws SQLException
inline

Definition at line 276 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.rootWarning.

276  { // logger.debug("Entered");
277  SQLWarning warning = new SQLWarning(
278  "Query FetchSize are not supported. Substituting a value of zero.");
279  if (rootWarning == null) {
280  rootWarning = warning;
281  } else {
282  rootWarning.setNextWarning(warning);
283  }
284  }
void com.omnisci.jdbc.OmniSciStatement.setMaxFieldSize ( int  max) 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  }
void com.omnisci.jdbc.OmniSciStatement.setMaxRows ( int  max) throws SQLException
inline

Definition at line 179 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.maxRows.

179  { // logger.debug("Entered");
180  maxRows = max;
181  }
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 201 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.rootWarning.

202  { // logger.debug("Entered");
203  SQLWarning warning = new SQLWarning(
204  "Query timeouts are not supported. Substituting a value of zero.");
205  if (rootWarning == null) {
206  rootWarning = warning;
207  } else {
208  rootWarning.setNextWarning(warning);
209  }
210  }
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
final org.slf4j.Logger com.omnisci.jdbc.OmniSciStatement.logger = LoggerFactory.getLogger(OmniSciStatement.class)
staticpackage

Definition at line 38 of file OmniSciStatement.java.

int com.omnisci.jdbc.OmniSciStatement.maxRows = 100000
private
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.

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 60 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: