OmniSciDB  7bf56492aa
 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
 
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
 
void cancel () 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, MapD.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
 
MapD.Client client
 
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
 

Detailed Description

Author
michael

Definition at line 36 of file OmniSciStatement.java.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Definition at line 286 of file OmniSciStatement.java.

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

Definition at line 180 of file OmniSciStatement.java.

180  { // logger.debug("Entered");
181  throw new UnsupportedOperationException("Not supported yet,"
182  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
183  + " class:" + new Throwable().getStackTrace()[0].getClassName()
184  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
185  }
void com.omnisci.jdbc.OmniSciStatement.clearBatch ( ) throws SQLException
inline

Definition at line 294 of file OmniSciStatement.java.

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

Definition at line 193 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.rootWarning.

193  { // logger.debug("Entered");
194  rootWarning = null;
195  }
void com.omnisci.jdbc.OmniSciStatement.close ( ) throws SQLException
inline

Definition at line 119 of file OmniSciStatement.java.

119  { // logger.debug("Entered");
120 
121  // clean up after -- nothing to do
122  }
void com.omnisci.jdbc.OmniSciStatement.closeOnCompletion ( ) 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.execute ( String  sql) throws SQLException
inline

Definition at line 206 of file OmniSciStatement.java.

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

206  { // logger.debug("Entered");
207 
208  ResultSet rs = executeQuery(sql);
209  if (rs != null) {
210  return true;
211  } else {
212  return false;
213  }
214  }

+ Here is the call graph for this function:

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

Definition at line 362 of file OmniSciStatement.java.

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

Definition at line 371 of file OmniSciStatement.java.

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

Definition at line 380 of file OmniSciStatement.java.

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

Definition at line 302 of file OmniSciStatement.java.

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

Definition at line 56 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.currentRS, 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().

57  { // logger.debug("Entered");
58  if (maxRows >= 0) {
59  // add limit to sql call if it doesn't already have one and is a select
60  String[] tokens = sql.toLowerCase().split(" ", 3);
61  if (tokens[0].equals("select")) {
62  if (sql.toLowerCase().contains("limit")) {
63  // do nothing -
64  } else {
65  // Some applications add TOP <number> to limit the
66  // select statement rather than limit. Remove TOP and keep
67  // the number it used as the limit.
68  Matcher matcher = top_pattern.matcher(sql);
69  // Take "select TOP nnnn <rest ot sql>" and translate to select <reset of sql:
70  // limit nnnn
71  if (matcher.find()) {
72  maxRows = Integer.parseInt(matcher.group(1));
73  sql = top_pattern.matcher(sql).replaceAll("select ");
74  }
75 
76  sql = sql + " LIMIT " + maxRows;
77  logger.debug("Added LIMIT of " + maxRows);
78  }
79  }
80  }
81 
82  logger.debug("Before OmniSciEscapeParser [" + sql + "]");
83  // The order of these to SQL re-writes is important.
84  // EscapeParse needs to come first.
85  String afterEscapeParseSQL = OmniSciEscapeParser.parse(sql);
86  String afterSimpleParse = simplisticDateTransform(afterEscapeParseSQL);
87  logger.debug("After OmniSciEscapeParser [" + afterSimpleParse + "]");
88  try {
89  sqlResult = client.sql_execute(session, afterSimpleParse + ";", true, null, -1, -1);
90  } catch (TMapDException ex) {
91  throw new SQLException("Query failed : " + ex.getError_msg());
92  } catch (TException ex) {
93  throw new SQLException("Query failed : " + ex.toString());
94  }
95 
96  currentRS = new OmniSciResultSet(sqlResult, sql);
97  return currentRS;
98  }
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 101 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.session, and com.omnisci.jdbc.OmniSciStatement.sqlResult.

101  { // logger.debug("Entered");
102  try {
103  // remove " characters if it is a CREATE statement
104  if (sql.trim().substring(0, 6).compareToIgnoreCase("CREATE") == 0) {
105  sql = sql.replace('"', ' ');
106  }
107  sqlResult = client.sql_execute(session, sql + ";", true, null, -1, -1);
108  } catch (TMapDException ex) {
109  throw new SQLException(
110  "Query failed : " + ex.getError_msg() + " sql was '" + sql + "'");
111  } catch (TException ex) {
112  throw new SQLException("Query failed : " + ex.toString());
113  }
114 
115  return sqlResult.row_set.columns.size();
116  }
int com.omnisci.jdbc.OmniSciStatement.executeUpdate ( String  sql,
int  autoGeneratedKeys 
) throws SQLException
inline

Definition at line 335 of file OmniSciStatement.java.

336  { // logger.debug("Entered");
337  throw new UnsupportedOperationException("Not supported yet,"
338  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
339  + " class:" + new Throwable().getStackTrace()[0].getClassName()
340  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
341  }
int com.omnisci.jdbc.OmniSciStatement.executeUpdate ( String  sql,
int[]  columnIndexes 
) throws SQLException
inline

Definition at line 344 of file OmniSciStatement.java.

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

Definition at line 353 of file OmniSciStatement.java.

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

Definition at line 310 of file OmniSciStatement.java.

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

Definition at line 243 of file OmniSciStatement.java.

243  { // logger.debug("Entered");
244  throw new UnsupportedOperationException("Not supported yet,"
245  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
246  + " class:" + new Throwable().getStackTrace()[0].getClassName()
247  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
248  }
int com.omnisci.jdbc.OmniSciStatement.getFetchSize ( ) throws SQLException
inline

Definition at line 262 of file OmniSciStatement.java.

262  { // logger.debug("Entered");
263  throw new UnsupportedOperationException("Not supported yet,"
264  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
265  + " class:" + new Throwable().getStackTrace()[0].getClassName()
266  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
267  }
ResultSet com.omnisci.jdbc.OmniSciStatement.getGeneratedKeys ( ) 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  }
int com.omnisci.jdbc.OmniSciStatement.getMaxFieldSize ( ) throws SQLException
inline

Definition at line 125 of file OmniSciStatement.java.

125  { // logger.debug("Entered");
126  throw new UnsupportedOperationException("Not supported yet,"
127  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
128  + " class:" + new Throwable().getStackTrace()[0].getClassName()
129  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
130  }
int com.omnisci.jdbc.OmniSciStatement.getMaxRows ( ) throws SQLException
inline

Definition at line 141 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.maxRows.

141  { // logger.debug("Entered");
142  return maxRows;
143  }
boolean com.omnisci.jdbc.OmniSciStatement.getMoreResults ( ) throws SQLException
inline

Definition at line 228 of file OmniSciStatement.java.

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

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

Definition at line 162 of file OmniSciStatement.java.

163  { // logger.debug("Entered");
164  return (int) sqlResult.execution_time_ms;
165  }
int com.omnisci.jdbc.OmniSciStatement.getQueryTimeout ( ) throws SQLException
inline

Definition at line 157 of file OmniSciStatement.java.

157  { // logger.debug("Entered");
158  return 0;
159  }
ResultSet com.omnisci.jdbc.OmniSciStatement.getResultSet ( ) throws SQLException
inline

Definition at line 217 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.currentRS.

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

217  { // logger.debug("Entered");
218  return currentRS;
219  }

+ Here is the caller graph for this function:

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

Definition at line 270 of file OmniSciStatement.java.

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

Definition at line 389 of file OmniSciStatement.java.

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

Definition at line 278 of file OmniSciStatement.java.

278  { // logger.debug("Entered");
279  throw new UnsupportedOperationException("Not supported yet,"
280  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
281  + " class:" + new Throwable().getStackTrace()[0].getClassName()
282  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
283  }
int com.omnisci.jdbc.OmniSciStatement.getUpdateCount ( ) throws SQLException
inline

Definition at line 222 of file OmniSciStatement.java.

222  { // logger.debug("Entered");
223  // TODO MAT fix update count
224  return 0;
225  }
SQLWarning com.omnisci.jdbc.OmniSciStatement.getWarnings ( ) throws SQLException
inline

Definition at line 188 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.rootWarning.

188  { // logger.debug("Entered");
189  return (rootWarning);
190  }
boolean com.omnisci.jdbc.OmniSciStatement.isClosed ( ) throws SQLException
inline

Definition at line 397 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.isCloseOnCompletion ( ) throws SQLException
inline

Definition at line 430 of file OmniSciStatement.java.

430  { // logger.debug("Entered");
431  throw new UnsupportedOperationException("Not supported yet,"
432  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
433  + " class:" + new Throwable().getStackTrace()[0].getClassName()
434  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
435  }
boolean com.omnisci.jdbc.OmniSciStatement.isPoolable ( ) 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  }
boolean com.omnisci.jdbc.OmniSciStatement.isWrapperFor ( Class<?>  iface) throws SQLException
inline

Definition at line 446 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  }
void com.omnisci.jdbc.OmniSciStatement.setCursorName ( String  name) throws SQLException
inline

Definition at line 198 of file OmniSciStatement.java.

198  { // logger.debug("Entered");
199  throw new UnsupportedOperationException("Not supported yet,"
200  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
201  + " class:" + new Throwable().getStackTrace()[0].getClassName()
202  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
203  }
void com.omnisci.jdbc.OmniSciStatement.setEscapeProcessing ( boolean  enable) throws SQLException
inline

Definition at line 151 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.escapeProcessing.

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

Definition at line 234 of file OmniSciStatement.java.

235  { // logger.debug("Entered");
236  throw new UnsupportedOperationException("Not supported yet,"
237  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
238  + " class:" + new Throwable().getStackTrace()[0].getClassName()
239  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
240  }
void com.omnisci.jdbc.OmniSciStatement.setFetchSize ( int  rows) throws SQLException
inline

Definition at line 251 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.rootWarning.

251  { // logger.debug("Entered");
252  SQLWarning warning = new SQLWarning(
253  "Query FetchSize are not supported. Substituting a value of zero.");
254  if (rootWarning == null) {
255  rootWarning = warning;
256  } else {
257  rootWarning.setNextWarning(warning);
258  }
259  }
void com.omnisci.jdbc.OmniSciStatement.setMaxFieldSize ( int  max) throws SQLException
inline

Definition at line 133 of file OmniSciStatement.java.

133  { // logger.debug("Entered");
134  throw new UnsupportedOperationException("Not supported yet,"
135  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
136  + " class:" + new Throwable().getStackTrace()[0].getClassName()
137  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
138  }
void com.omnisci.jdbc.OmniSciStatement.setMaxRows ( int  max) throws SQLException
inline

Definition at line 146 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.maxRows.

146  { // logger.debug("Entered");
147  maxRows = max;
148  }
void com.omnisci.jdbc.OmniSciStatement.setPoolable ( boolean  poolable) 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  }
void com.omnisci.jdbc.OmniSciStatement.setQueryTimeout ( int  seconds) throws SQLException
inline

Definition at line 168 of file OmniSciStatement.java.

References com.omnisci.jdbc.OmniSciStatement.rootWarning.

169  { // logger.debug("Entered");
170  SQLWarning warning = new SQLWarning(
171  "Query timeouts are not supported. Substituting a value of zero.");
172  if (rootWarning == null) {
173  rootWarning = warning;
174  } else {
175  rootWarning.setNextWarning(warning);
176  }
177  }
static String com.omnisci.jdbc.OmniSciStatement.simplisticDateTransform ( String  sql)
inlinestatic

Definition at line 463 of file OmniSciStatement.java.

References Asio.start().

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

463  {
464  // need to iterate as each reduction of string opens up a anew match
465  String start;
466  do {
467  // Example transform - select quarter(val) from table;
468  // will become select extract(quarter from val) from table;
469  start = sql;
470  sql = QUARTER.matcher(sql).replaceAll(" EXTRACT(QUARTER FROM $1");
471  } while (!sql.equals(start));
472 
473  do {
474  start = sql;
475  sql = DAYOFYEAR.matcher(sql).replaceAll(" EXTRACT(DOY FROM $1");
476  } while (!sql.equals(start));
477 
478  do {
479  start = sql;
480  sql = DAYOFWEEK.matcher(sql).replaceAll(" EXTRACT(ISODOW FROM $1");
481  } while (!sql.equals(start));
482 
483  do {
484  start = sql;
485  sql = WEEK.matcher(sql).replaceAll(" EXTRACT(WEEK FROM $1");
486  } while (!sql.equals(start));
487  return sql;
488  }
void start()
Definition: Asio.cpp:33

+ Here is the call graph for this function:

+ 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 438 of file OmniSciStatement.java.

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

Member Data Documentation

MapD.Client com.omnisci.jdbc.OmniSciStatement.client
private
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 458 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 456 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 37 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 454 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 52 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 460 of file OmniSciStatement.java.


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