OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OmniSciPreparedStatement.java
Go to the documentation of this file.
1 /*
2  * Copyright 2017 MapD Technologies, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package com.omnisci.jdbc;
17 
18 import com.omnisci.thrift.server.OmniSci;
19 import com.omnisci.thrift.server.TColumnType;
20 import com.omnisci.thrift.server.TOmniSciException;
21 import com.omnisci.thrift.server.TStringRow;
22 import com.omnisci.thrift.server.TStringValue;
23 import com.omnisci.thrift.server.TTableDetails;
24 
25 import org.apache.thrift.TException;
26 import org.slf4j.Logger;
27 import org.slf4j.LoggerFactory;
28 
29 import java.io.InputStream;
30 import java.io.Reader;
31 import java.math.BigDecimal;
32 import java.net.URL;
33 import java.sql.Array;
34 import java.sql.Blob;
35 import java.sql.Clob;
36 import java.sql.Connection;
37 import java.sql.Date;
38 import java.sql.NClob;
39 import java.sql.ParameterMetaData;
40 import java.sql.PreparedStatement;
41 import java.sql.Ref;
42 import java.sql.ResultSet;
43 import java.sql.ResultSetMetaData;
44 import java.sql.RowId;
45 import java.sql.SQLException;
46 import java.sql.SQLWarning;
47 import java.sql.SQLXML;
48 import java.sql.Time;
49 import java.sql.Timestamp;
50 import java.sql.Types;
51 import java.util.ArrayList;
52 import java.util.Arrays;
53 import java.util.Calendar;
54 import java.util.List;
55 import java.util.regex.Matcher;
56 import java.util.regex.Pattern;
57 
62 class OmniSciPreparedStatement implements PreparedStatement {
63  final static Logger MAPDLOGGER =
64  LoggerFactory.getLogger(OmniSciPreparedStatement.class);
65  public SQLWarning rootWarning = null;
66 
67  private String currentSQL;
68  private String insertTableName;
69  private int parmCount = 0;
70  private String brokenSQL[];
71  private String parmRep[];
72  private boolean parmIsNull[];
73  private int fieldsOrder[];
74  private int repCount;
75  private String session;
76  private OmniSci.Client client;
77  private OmniSciStatement stmt = null;
78  private boolean isInsert = false;
79  private boolean isNewBatch = true;
80  private boolean[] parmIsString = null;
81  private List<TStringRow> rows = null;
82  private static final Pattern REGEX_PATTERN = Pattern.compile("(?i)\\s+INTO\\s+(\\w+)");
83  private static final Pattern REGEX_LOF_PATTERN = Pattern.compile(
84  "(?i)\\s*insert\\s+into\\s+[\\w:\\.]+\\s*\\(([\\w:\\s:\\,:\\']+)\\)[\\w:\\s]+\\(");
85  // this regex ignores all multi- and single-line comments and whitespaces at the
86  // beginning of a query and checks if the first meaningful word is SELECT
87  private static final Pattern REGEX_IS_SELECT_PATTERN =
88  Pattern.compile("^(?:\\s|--.*?\\R|/\\*[\\S\\s]*?\\*/|\\s*)*\\s*select[\\S\\s]*",
89  Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
90  private boolean isClosed = false;
91 
92  OmniSciPreparedStatement(String sql, String session, OmniSci.Client client) {
93  MAPDLOGGER.debug("Entered");
94  currentSQL = sql;
95  this.client = client;
96  this.session = session;
97  this.stmt = new OmniSciStatement(session, client);
98  MAPDLOGGER.debug("Prepared statement is " + currentSQL);
99  // TODO in real life this needs to check if the ? is inside quotes before we assume it
100  // a parameter
101  brokenSQL = currentSQL.split("\\?", -1);
102  parmCount = brokenSQL.length - 1;
103  parmRep = new String[parmCount];
104  parmIsNull = new boolean[parmCount];
105  parmIsString = new boolean[parmCount];
106  repCount = 0;
107  if (currentSQL.toUpperCase().contains("INSERT ")) {
108  // remove double quotes required for queries generated with " around all names like
109  // kafka connect
110  currentSQL = currentSQL.replaceAll("\"", " ");
111  MAPDLOGGER.debug("Insert Prepared statement is " + currentSQL);
112  isInsert = true;
113  Matcher matcher = REGEX_PATTERN.matcher(currentSQL);
114  while (matcher.find()) {
115  insertTableName = matcher.group(1);
116  MAPDLOGGER.debug("Table name for insert is '" + insertTableName + "'");
117  }
118  }
119  }
120 
121  private String getQuery() {
122  String qsql;
123  // put string together if required
124  if (parmCount > 0) {
125  if (repCount != parmCount) {
126  throw new UnsupportedOperationException(
127  "Incorrect number of replace parameters for prepared statement "
128  + currentSQL + " has only " + repCount + " parameters");
129  }
130  StringBuilder modQuery = new StringBuilder(currentSQL.length() * 5);
131  for (int i = 0; i < repCount; i++) {
132  modQuery.append(brokenSQL[i]);
133  if (parmIsNull[i]) {
134  modQuery.append("NULL");
135  } else {
136  if (parmIsString[i]) {
137  modQuery.append("'").append(parmRep[i]).append("'");
138  } else {
139  modQuery.append(parmRep[i]);
140  }
141  }
142  }
143  modQuery.append(brokenSQL[parmCount]);
144  qsql = modQuery.toString();
145  } else {
146  qsql = currentSQL;
147  }
148 
149  qsql = qsql.replace(" WHERE 1=0", " LIMIT 1 ");
150  MAPDLOGGER.debug("Query is now " + qsql);
151  repCount = 0; // reset the parameters
152  return qsql;
153  }
154 
155  private boolean isSelect() {
156  Matcher matcher = REGEX_IS_SELECT_PATTERN.matcher(currentSQL);
157  return matcher.matches();
158  }
159 
160  @Override
161  public ResultSet executeQuery() throws SQLException {
162  if (isNewBatch) {
163  String qsql = getQuery();
164  MAPDLOGGER.debug("executeQuery, sql=" + qsql);
165  return stmt.executeQuery(qsql);
166  }
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  }
172 
173  @Override
174  public int executeUpdate() throws SQLException {
175  MAPDLOGGER.debug("Entered");
176  executeQuery();
177  // TODO: OmniSciDB supports updates, inserts and deletes, but
178  // there is no way to get number of affected rows at the moment
179  return -1;
180  }
181 
182  @Override
183  public void setNull(int parameterIndex, int sqlType) throws SQLException {
184  MAPDLOGGER.debug("Entered");
185  parmIsNull[parameterIndex - 1] = true;
186  repCount++;
187  }
188 
189  @Override
190  public void setBoolean(int parameterIndex, boolean x) throws SQLException {
191  MAPDLOGGER.debug("Entered");
192  parmRep[parameterIndex - 1] = x ? "true" : "false";
193  parmIsString[parameterIndex - 1] = false;
194  parmIsNull[parameterIndex - 1] = false;
195  repCount++;
196  }
197 
198  @Override
199  public void setByte(int parameterIndex, byte x) throws SQLException {
200  MAPDLOGGER.debug("Entered");
201  throw new UnsupportedOperationException("Not supported yet,"
202  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
203  + " class:" + new Throwable().getStackTrace()[0].getClassName()
204  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
205  }
206 
207  @Override
208  public void setShort(int parameterIndex, short x) throws SQLException {
209  MAPDLOGGER.debug("Entered");
210  parmRep[parameterIndex - 1] = Short.toString(x);
211  parmIsNull[parameterIndex - 1] = false;
212  repCount++;
213  }
214 
215  @Override
216  public void setInt(int parameterIndex, int x) throws SQLException {
217  MAPDLOGGER.debug("Entered");
218  parmRep[parameterIndex - 1] = Integer.toString(x);
219  parmIsNull[parameterIndex - 1] = false;
220  repCount++;
221  }
222 
223  @Override
224  public void setLong(int parameterIndex, long x) throws SQLException {
225  MAPDLOGGER.debug("Entered");
226  parmRep[parameterIndex - 1] = Long.toString(x);
227  parmIsNull[parameterIndex - 1] = false;
228  repCount++;
229  }
230 
231  @Override
232  public void setFloat(int parameterIndex, float x) throws SQLException {
233  MAPDLOGGER.debug("Entered");
234  parmRep[parameterIndex - 1] = Float.toString(x);
235  parmIsNull[parameterIndex - 1] = false;
236  repCount++;
237  }
238 
239  @Override
240  public void setDouble(int parameterIndex, double x) throws SQLException {
241  MAPDLOGGER.debug("Entered");
242  parmRep[parameterIndex - 1] = Double.toString(x);
243  parmIsNull[parameterIndex - 1] = false;
244  repCount++;
245  }
246 
247  @Override
248  public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException {
249  MAPDLOGGER.debug("Entered");
250  parmRep[parameterIndex - 1] = x.toString();
251  parmIsNull[parameterIndex - 1] = false;
252  repCount++;
253  }
254 
255  @Override
256  public void setString(int parameterIndex, String x) throws SQLException {
257  MAPDLOGGER.debug("Entered");
258  // add extra ' if there are any in string
259  x = x.replaceAll("'", "''");
260  parmRep[parameterIndex - 1] = x;
261  parmIsString[parameterIndex - 1] = true;
262  parmIsNull[parameterIndex - 1] = false;
263  repCount++;
264  }
265 
266  @Override
267  public void setBytes(int parameterIndex, byte[] x) throws SQLException {
268  MAPDLOGGER.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  }
274 
275  @Override
276  public void setDate(int parameterIndex, Date x) throws SQLException {
277  MAPDLOGGER.debug("Entered");
278  parmRep[parameterIndex - 1] = x.toString();
279  parmIsString[parameterIndex - 1] = true;
280  parmIsNull[parameterIndex - 1] = false;
281  repCount++;
282  }
283 
284  @Override
285  public void setTime(int parameterIndex, Time x) throws SQLException {
286  MAPDLOGGER.debug("Entered");
287  parmRep[parameterIndex - 1] = x.toString();
288  parmIsString[parameterIndex - 1] = true;
289  parmIsNull[parameterIndex - 1] = false;
290  repCount++;
291  }
292 
293  @Override
294  public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
295  MAPDLOGGER.debug("Entered");
296  parmRep[parameterIndex - 1] =
297  x.toString(); // new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(x);
298  parmIsString[parameterIndex - 1] = true;
299  parmIsNull[parameterIndex - 1] = false;
300  repCount++;
301  }
302 
303  @Override
304  public void setAsciiStream(int parameterIndex, InputStream x, int length)
305  throws SQLException {
306  MAPDLOGGER.debug("Entered");
307  throw new UnsupportedOperationException("Not supported yet,"
308  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
309  + " class:" + new Throwable().getStackTrace()[0].getClassName()
310  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
311  }
312 
313  @Override
314  public void setUnicodeStream(int parameterIndex, InputStream x, int length)
315  throws SQLException {
316  MAPDLOGGER.debug("Entered");
317  throw new UnsupportedOperationException("Not supported yet,"
318  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
319  + " class:" + new Throwable().getStackTrace()[0].getClassName()
320  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
321  }
322 
323  @Override
324  public void setBinaryStream(int parameterIndex, InputStream x, int length)
325  throws SQLException {
326  MAPDLOGGER.debug("Entered");
327  throw new UnsupportedOperationException("Not supported yet,"
328  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
329  + " class:" + new Throwable().getStackTrace()[0].getClassName()
330  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
331  }
332 
333  @Override
334  public void clearParameters() throws SQLException {
335  MAPDLOGGER.debug("Entered");
336  // TODO MAT we will actually need to do something here one day
337  }
338 
339  @Override
340  public void setObject(int parameterIndex, Object x, int targetSqlType)
341  throws SQLException {
342  MAPDLOGGER.debug("Entered");
343  throw new UnsupportedOperationException("Not supported yet,"
344  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
345  + " class:" + new Throwable().getStackTrace()[0].getClassName()
346  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
347  }
348 
349  @Override
350  public void setObject(int parameterIndex, Object x) throws SQLException {
351  MAPDLOGGER.debug("Entered");
352  throw new UnsupportedOperationException("Not supported yet,"
353  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
354  + " class:" + new Throwable().getStackTrace()[0].getClassName()
355  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
356  }
357 
358  @Override
359  public boolean execute() throws SQLException {
360  MAPDLOGGER.debug("Entered");
361  String tQuery = getQuery();
362  return stmt.execute(tQuery);
363  }
364 
365  @Override
366  public void addBatch() throws SQLException {
367  MAPDLOGGER.debug("Entered");
368  if (isInsert) {
369  // take the values and use stream inserter to add them
370  if (isNewBatch) {
371  // check for columns names
372  Matcher matcher = REGEX_LOF_PATTERN.matcher(currentSQL);
373  if (matcher.find()) {
374  String listOfFields[] = matcher.group(1).trim().split("\\s*,+\\s*,*\\s*");
375  if (listOfFields.length != parmCount) {
376  throw new SQLException("Too many or too few values");
377  } else if (Arrays.stream(listOfFields).distinct().toArray().length
378  != listOfFields.length) {
379  throw new SQLException("Duplicated column name");
380  }
381  fieldsOrder = new int[listOfFields.length];
382  List<String> listOfColumns = new ArrayList<String>();
383  try {
384  TTableDetails tableDetails =
385  client.get_table_details(session, insertTableName);
386  for (TColumnType column : tableDetails.row_desc) {
387  listOfColumns.add(column.col_name.toLowerCase());
388  }
389  } catch (TException ex) {
390  throw new SQLException(ex.toString());
391  }
392  for (int i = 0; i < fieldsOrder.length; i++) {
393  fieldsOrder[i] = listOfColumns.indexOf(listOfFields[i].toLowerCase());
394  if (fieldsOrder[i] == -1) {
395  throw new SQLException(
396  "Column " + listOfFields[i].toLowerCase() + " does not exist");
397  }
398  }
399  }
400 
401  rows = new ArrayList(5000);
402  isNewBatch = false;
403  }
404  // add data to stream
405  TStringRow tsr = new TStringRow();
406  for (int i = 0; i < parmCount; i++) {
407  // place string in rows array
408  TStringValue tsv = new TStringValue();
409  int colID = fieldsOrder == null ? i : fieldsOrder[i];
410  if (parmIsNull[colID]) {
411  tsv.is_null = true;
412  } else {
413  tsv.str_val = this.parmRep[colID];
414  tsv.is_null = false;
415  }
416  tsr.addToCols(tsv);
417  }
418  rows.add(tsr);
419  MAPDLOGGER.debug("addBatch, rows=" + rows.size());
420  } else {
421  throw new UnsupportedOperationException("addBatch only supported for insert, line:"
422  + new Throwable().getStackTrace()[0].getLineNumber());
423  }
424  }
425 
426  @Override
427  public void setCharacterStream(int parameterIndex, Reader reader, int length)
428  throws SQLException {
429  MAPDLOGGER.debug("Entered");
430  throw new UnsupportedOperationException("Not supported yet,"
431  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
432  + " class:" + new Throwable().getStackTrace()[0].getClassName()
433  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
434  }
435 
436  @Override
437  public void setRef(int parameterIndex, Ref x) throws SQLException {
438  MAPDLOGGER.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  }
444 
445  @Override
446  public void setBlob(int parameterIndex, Blob x) throws SQLException {
447  MAPDLOGGER.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  }
453 
454  @Override
455  public void setClob(int parameterIndex, Clob x) throws SQLException {
456  MAPDLOGGER.debug("Entered");
457  throw new UnsupportedOperationException("Not supported yet,"
458  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
459  + " class:" + new Throwable().getStackTrace()[0].getClassName()
460  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
461  }
462 
463  @Override
464  public void setArray(int parameterIndex, Array x) throws SQLException {
465  MAPDLOGGER.debug("Entered");
466  parmRep[parameterIndex - 1] = x.toString();
467  parmIsNull[parameterIndex - 1] = false;
468  repCount++;
469  }
470 
471  @Override
472  public ResultSetMetaData getMetaData() throws SQLException {
473  MAPDLOGGER.debug("Entered");
474  if (!isSelect()) {
475  return null;
476  }
477  if (stmt.getResultSet() != null) {
478  return stmt.getResultSet().getMetaData();
479  }
480  PreparedStatement ps = null;
481  try {
483  ps.setMaxRows(0);
484  for (int i = 1; i <= this.parmCount; ++i) {
485  ps.setNull(i, Types.NULL);
486  }
487  ResultSet rs = ps.executeQuery();
488  if (rs != null) {
489  return rs.getMetaData();
490  } else {
491  return null;
492  }
493  } finally {
494  if (ps != null) {
495  ps.close();
496  }
497  }
498  }
499 
500  @Override
501  public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException {
502  MAPDLOGGER.debug("Entered");
503  throw new UnsupportedOperationException("Not supported yet,"
504  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
505  + " class:" + new Throwable().getStackTrace()[0].getClassName()
506  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
507  }
508 
509  @Override
510  public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException {
511  MAPDLOGGER.debug("Entered");
512  throw new UnsupportedOperationException("Not supported yet,"
513  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
514  + " class:" + new Throwable().getStackTrace()[0].getClassName()
515  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
516  }
517 
518  @Override
519  public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal)
520  throws SQLException {
521  MAPDLOGGER.debug("Entered");
522  throw new UnsupportedOperationException("Not supported yet,"
523  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
524  + " class:" + new Throwable().getStackTrace()[0].getClassName()
525  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
526  }
527 
528  @Override
529  public void setNull(int parameterIndex, int sqlType, String typeName)
530  throws SQLException {
531  MAPDLOGGER.debug("Entered");
532  throw new UnsupportedOperationException("Not supported yet,"
533  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
534  + " class:" + new Throwable().getStackTrace()[0].getClassName()
535  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
536  }
537 
538  @Override
539  public void setURL(int parameterIndex, URL x) throws SQLException {
540  MAPDLOGGER.debug("Entered");
541  throw new UnsupportedOperationException("Not supported yet,"
542  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
543  + " class:" + new Throwable().getStackTrace()[0].getClassName()
544  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
545  }
546 
547  @Override
548  public ParameterMetaData getParameterMetaData() throws SQLException {
549  MAPDLOGGER.debug("Entered");
550  throw new UnsupportedOperationException("Not supported yet,"
551  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
552  + " class:" + new Throwable().getStackTrace()[0].getClassName()
553  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
554  }
555 
556  @Override
557  public void setRowId(int parameterIndex, RowId x) throws SQLException {
558  MAPDLOGGER.debug("Entered");
559  throw new UnsupportedOperationException("Not supported yet,"
560  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
561  + " class:" + new Throwable().getStackTrace()[0].getClassName()
562  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
563  }
564 
565  @Override
566  public void setNString(int parameterIndex, String value) throws SQLException {
567  MAPDLOGGER.debug("Entered");
568  throw new UnsupportedOperationException("Not supported yet,"
569  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
570  + " class:" + new Throwable().getStackTrace()[0].getClassName()
571  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
572  }
573 
574  @Override
575  public void setNCharacterStream(int parameterIndex, Reader value, long length)
576  throws SQLException {
577  MAPDLOGGER.debug("Entered");
578  throw new UnsupportedOperationException("Not supported yet,"
579  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
580  + " class:" + new Throwable().getStackTrace()[0].getClassName()
581  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
582  }
583 
584  @Override
585  public void setNClob(int parameterIndex, NClob value) throws SQLException {
586  MAPDLOGGER.debug("Entered");
587  throw new UnsupportedOperationException("Not supported yet,"
588  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
589  + " class:" + new Throwable().getStackTrace()[0].getClassName()
590  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
591  }
592 
593  @Override
594  public void setClob(int parameterIndex, Reader reader, long length)
595  throws SQLException {
596  MAPDLOGGER.debug("Entered");
597  throw new UnsupportedOperationException("Not supported yet,"
598  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
599  + " class:" + new Throwable().getStackTrace()[0].getClassName()
600  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
601  }
602 
603  @Override
604  public void setBlob(int parameterIndex, InputStream inputStream, long length)
605  throws SQLException {
606  MAPDLOGGER.debug("Entered");
607  throw new UnsupportedOperationException("Not supported yet,"
608  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
609  + " class:" + new Throwable().getStackTrace()[0].getClassName()
610  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
611  }
612 
613  @Override
614  public void setNClob(int parameterIndex, Reader reader, long length)
615  throws SQLException {
616  MAPDLOGGER.debug("Entered");
617  throw new UnsupportedOperationException("Not supported yet,"
618  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
619  + " class:" + new Throwable().getStackTrace()[0].getClassName()
620  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
621  }
622 
623  @Override
624  public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
625  MAPDLOGGER.debug("Entered");
626  throw new UnsupportedOperationException("Not supported yet,"
627  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
628  + " class:" + new Throwable().getStackTrace()[0].getClassName()
629  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
630  }
631 
632  @Override
633  public void setObject(
634  int parameterIndex, Object x, int targetSqlType, int scaleOrLength)
635  throws SQLException {
636  MAPDLOGGER.debug("Entered");
637  throw new UnsupportedOperationException("Not supported yet,"
638  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
639  + " class:" + new Throwable().getStackTrace()[0].getClassName()
640  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
641  }
642 
643  @Override
644  public void setAsciiStream(int parameterIndex, InputStream x, long length)
645  throws SQLException {
646  MAPDLOGGER.debug("Entered");
647  throw new UnsupportedOperationException("Not supported yet,"
648  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
649  + " class:" + new Throwable().getStackTrace()[0].getClassName()
650  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
651  }
652 
653  @Override
654  public void setBinaryStream(int parameterIndex, InputStream x, long length)
655  throws SQLException {
656  MAPDLOGGER.debug("Entered");
657  throw new UnsupportedOperationException("Not supported yet,"
658  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
659  + " class:" + new Throwable().getStackTrace()[0].getClassName()
660  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
661  }
662 
663  @Override
664  public void setCharacterStream(int parameterIndex, Reader reader, long length)
665  throws SQLException {
666  MAPDLOGGER.debug("Entered");
667  throw new UnsupportedOperationException("Not supported yet,"
668  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
669  + " class:" + new Throwable().getStackTrace()[0].getClassName()
670  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
671  }
672 
673  @Override
674  public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException {
675  MAPDLOGGER.debug("Entered");
676  throw new UnsupportedOperationException("Not supported yet,"
677  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
678  + " class:" + new Throwable().getStackTrace()[0].getClassName()
679  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
680  }
681 
682  @Override
683  public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException {
684  MAPDLOGGER.debug("Entered");
685  throw new UnsupportedOperationException("Not supported yet,"
686  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
687  + " class:" + new Throwable().getStackTrace()[0].getClassName()
688  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
689  }
690 
691  @Override
692  public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException {
693  MAPDLOGGER.debug("Entered");
694  throw new UnsupportedOperationException("Not supported yet,"
695  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
696  + " class:" + new Throwable().getStackTrace()[0].getClassName()
697  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
698  }
699 
700  @Override
701  public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {
702  MAPDLOGGER.debug("Entered");
703  throw new UnsupportedOperationException("Not supported yet,"
704  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
705  + " class:" + new Throwable().getStackTrace()[0].getClassName()
706  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
707  }
708 
709  @Override
710  public void setClob(int parameterIndex, Reader reader) throws SQLException {
711  MAPDLOGGER.debug("Entered");
712  throw new UnsupportedOperationException("Not supported yet,"
713  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
714  + " class:" + new Throwable().getStackTrace()[0].getClassName()
715  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
716  }
717 
718  @Override
719  public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException {
720  MAPDLOGGER.debug("Entered");
721  throw new UnsupportedOperationException("Not supported yet,"
722  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
723  + " class:" + new Throwable().getStackTrace()[0].getClassName()
724  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
725  }
726 
727  @Override
728  public void setNClob(int parameterIndex, Reader reader) throws SQLException {
729  MAPDLOGGER.debug("Entered");
730  throw new UnsupportedOperationException("Not supported yet,"
731  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
732  + " class:" + new Throwable().getStackTrace()[0].getClassName()
733  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
734  }
735 
736  @Override
737  public ResultSet executeQuery(String sql) throws SQLException {
738  MAPDLOGGER.debug("Entered");
739  throw new UnsupportedOperationException("Not supported yet,"
740  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
741  + " class:" + new Throwable().getStackTrace()[0].getClassName()
742  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
743  }
744 
745  @Override
746  public int executeUpdate(String sql) throws SQLException {
747  MAPDLOGGER.debug("Entered");
748  throw new UnsupportedOperationException("Not supported yet,"
749  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
750  + " class:" + new Throwable().getStackTrace()[0].getClassName()
751  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
752  }
753 
754  @Override
755  public void close() throws SQLException {
756  MAPDLOGGER.debug("close");
757  if (stmt != null) {
758  // TODO MAT probably more needed here
759  stmt.close();
760  stmt = null;
761  }
762  isClosed = true;
763  }
764 
765  @Override
766  public int getMaxFieldSize() throws SQLException {
767  MAPDLOGGER.debug("Entered");
768  throw new UnsupportedOperationException("Not supported yet,"
769  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
770  + " class:" + new Throwable().getStackTrace()[0].getClassName()
771  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
772  }
773 
774  @Override
775  public void setMaxFieldSize(int max) throws SQLException {
776  MAPDLOGGER.debug("Entered");
777  throw new UnsupportedOperationException("Not supported yet,"
778  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
779  + " class:" + new Throwable().getStackTrace()[0].getClassName()
780  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
781  }
782 
783  @Override
784  public int getMaxRows() throws SQLException {
785  MAPDLOGGER.debug("Entered");
786  return stmt.getMaxRows();
787  }
788 
789  @Override
790  public void setMaxRows(int max) throws SQLException {
791  MAPDLOGGER.debug("Entered");
792  MAPDLOGGER.debug("SetMaxRows to " + max);
793  stmt.setMaxRows(max);
794  }
795 
796  @Override
797  public void setEscapeProcessing(boolean enable) throws SQLException {
798  MAPDLOGGER.debug("Entered");
799  throw new UnsupportedOperationException("Not supported yet,"
800  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
801  + " class:" + new Throwable().getStackTrace()[0].getClassName()
802  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
803  }
804 
805  @Override
806  public int getQueryTimeout() throws SQLException {
807  MAPDLOGGER.debug("Entered");
808  return 0;
809  }
810 
811  @Override
812  public void setQueryTimeout(int seconds) throws SQLException {
813  MAPDLOGGER.debug("Entered");
814  SQLWarning warning = new SQLWarning(
815  "Query timeouts are not supported. Substituting a value of zero.");
816  if (rootWarning == null)
817  rootWarning = warning;
818  else
819  rootWarning.setNextWarning(warning);
820  }
821 
822  @Override
823  public void cancel() throws SQLException {
824  MAPDLOGGER.debug("Entered");
825  throw new UnsupportedOperationException("Not supported yet,"
826  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
827  + " class:" + new Throwable().getStackTrace()[0].getClassName()
828  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
829  }
830 
831  @Override
832  public SQLWarning getWarnings() throws SQLException {
833  MAPDLOGGER.debug("Entered");
834  return rootWarning;
835  }
836 
837  @Override
838  public void clearWarnings() throws SQLException {
839  MAPDLOGGER.debug("Entered");
840  rootWarning = null;
841  }
842 
843  @Override
844  public void setCursorName(String name) throws SQLException {
845  MAPDLOGGER.debug("Entered");
846  throw new UnsupportedOperationException("Not supported yet,"
847  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
848  + " class:" + new Throwable().getStackTrace()[0].getClassName()
849  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
850  }
851 
852  @Override
853  public boolean execute(String sql) throws SQLException {
854  MAPDLOGGER.debug("Entered");
855  throw new UnsupportedOperationException("Not supported yet,"
856  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
857  + " class:" + new Throwable().getStackTrace()[0].getClassName()
858  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
859  }
860 
861  @Override
862  public ResultSet getResultSet() throws SQLException {
863  MAPDLOGGER.debug("Entered");
864  return stmt.getResultSet();
865  }
866 
867  @Override
868  public int getUpdateCount() throws SQLException {
869  MAPDLOGGER.debug("Entered");
870  return stmt.getUpdateCount();
871  }
872 
873  @Override
874  public boolean getMoreResults() throws SQLException {
875  MAPDLOGGER.debug("Entered");
876  return stmt.getMoreResults();
877  }
878 
879  @Override
880  public void setFetchDirection(int direction) throws SQLException {
881  MAPDLOGGER.debug("Entered");
882  throw new UnsupportedOperationException("Not supported yet,"
883  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
884  + " class:" + new Throwable().getStackTrace()[0].getClassName()
885  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
886  }
887 
888  @Override
889  public int getFetchDirection() throws SQLException {
890  MAPDLOGGER.debug("Entered");
891  return ResultSet.FETCH_FORWARD;
892  }
893 
894  @Override
895  public void setFetchSize(int rows) throws SQLException {
896  MAPDLOGGER.debug("Entered");
897  // TODO we need to chnage the model to allow smaller select chunks at the moment you
898  // get everything
899  }
900 
901  @Override
902  public int getFetchSize() throws SQLException {
903  MAPDLOGGER.debug("Entered");
904  throw new UnsupportedOperationException("Not supported yet,"
905  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
906  + " class:" + new Throwable().getStackTrace()[0].getClassName()
907  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
908  }
909 
910  @Override
911  public int getResultSetConcurrency() throws SQLException {
912  MAPDLOGGER.debug("Entered");
913  throw new UnsupportedOperationException("Not supported yet,"
914  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
915  + " class:" + new Throwable().getStackTrace()[0].getClassName()
916  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
917  }
918 
919  @Override
920  public int getResultSetType() throws SQLException {
921  MAPDLOGGER.debug("Entered");
922  throw new UnsupportedOperationException("Not supported yet,"
923  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
924  + " class:" + new Throwable().getStackTrace()[0].getClassName()
925  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
926  }
927 
928  @Override
929  public void addBatch(String sql) throws SQLException {
930  MAPDLOGGER.debug("Entered");
931  throw new UnsupportedOperationException("Not supported yet,"
932  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
933  + " class:" + new Throwable().getStackTrace()[0].getClassName()
934  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
935  }
936 
937  @Override
938  public void clearBatch() throws SQLException {
939  MAPDLOGGER.debug("Entered");
940  if (rows != null) {
941  rows.clear();
942  }
943  }
944 
945  @Override
946  public int[] executeBatch() throws SQLException {
947  checkClosed();
948  int ret[] = null;
949  if (rows != null) {
950  MAPDLOGGER.debug("executeBatch, rows=" + rows.size());
951  try {
952  // send the batch
953  client.load_table(session, insertTableName, rows);
954  } catch (TOmniSciException ex) {
955  throw new SQLException("executeBatch failed: " + ex.getError_msg());
956  } catch (TException ex) {
957  throw new SQLException("executeBatch failed: " + ex.toString());
958  }
959  ret = new int[rows.size()];
960  for (int i = 0; i < rows.size(); i++) {
961  ret[i] = 1;
962  }
963  clearBatch();
964  }
965  return ret;
966  }
967 
968  @Override
969  public Connection getConnection() throws SQLException {
970  MAPDLOGGER.debug("Entered");
971  throw new UnsupportedOperationException("Not supported yet,"
972  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
973  + " class:" + new Throwable().getStackTrace()[0].getClassName()
974  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
975  }
976 
977  @Override
978  public boolean getMoreResults(int current) throws SQLException {
979  MAPDLOGGER.debug("Entered");
980  throw new UnsupportedOperationException("Not supported yet,"
981  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
982  + " class:" + new Throwable().getStackTrace()[0].getClassName()
983  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
984  }
985 
986  @Override
987  public ResultSet getGeneratedKeys() throws SQLException {
988  MAPDLOGGER.debug("Entered");
989  throw new UnsupportedOperationException("Not supported yet,"
990  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
991  + " class:" + new Throwable().getStackTrace()[0].getClassName()
992  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
993  }
994 
995  @Override
996  public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
997  MAPDLOGGER.debug("Entered");
998  throw new UnsupportedOperationException("Not supported yet,"
999  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
1000  + " class:" + new Throwable().getStackTrace()[0].getClassName()
1001  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
1002  }
1003 
1004  @Override
1005  public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
1006  MAPDLOGGER.debug("Entered");
1007  throw new UnsupportedOperationException("Not supported yet,"
1008  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
1009  + " class:" + new Throwable().getStackTrace()[0].getClassName()
1010  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
1011  }
1012 
1013  @Override
1014  public int executeUpdate(String sql, String[] columnNames) throws SQLException {
1015  MAPDLOGGER.debug("Entered");
1016  throw new UnsupportedOperationException("Not supported yet,"
1017  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
1018  + " class:" + new Throwable().getStackTrace()[0].getClassName()
1019  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
1020  }
1021 
1022  @Override
1023  public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
1024  MAPDLOGGER.debug("Entered");
1025  throw new UnsupportedOperationException("Not supported yet,"
1026  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
1027  + " class:" + new Throwable().getStackTrace()[0].getClassName()
1028  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
1029  }
1030 
1031  @Override
1032  public boolean execute(String sql, int[] columnIndexes) throws SQLException {
1033  MAPDLOGGER.debug("Entered");
1034  throw new UnsupportedOperationException("Not supported yet,"
1035  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
1036  + " class:" + new Throwable().getStackTrace()[0].getClassName()
1037  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
1038  }
1039 
1040  @Override
1041  public boolean execute(String sql, String[] columnNames) throws SQLException {
1042  MAPDLOGGER.debug("Entered");
1043  throw new UnsupportedOperationException("Not supported yet,"
1044  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
1045  + " class:" + new Throwable().getStackTrace()[0].getClassName()
1046  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
1047  }
1048 
1049  @Override
1050  public int getResultSetHoldability() throws SQLException {
1051  MAPDLOGGER.debug("Entered");
1052  throw new UnsupportedOperationException("Not supported yet,"
1053  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
1054  + " class:" + new Throwable().getStackTrace()[0].getClassName()
1055  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
1056  }
1057 
1058  @Override
1059  public boolean isClosed() throws SQLException {
1060  MAPDLOGGER.debug("Entered");
1061  return isClosed;
1062  }
1063 
1064  @Override
1065  public void setPoolable(boolean poolable) throws SQLException {
1066  MAPDLOGGER.debug("Entered");
1067  throw new UnsupportedOperationException("Not supported yet,"
1068  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
1069  + " class:" + new Throwable().getStackTrace()[0].getClassName()
1070  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
1071  }
1072 
1073  @Override
1074  public boolean isPoolable() throws SQLException {
1075  MAPDLOGGER.debug("Entered");
1076  throw new UnsupportedOperationException("Not supported yet,"
1077  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
1078  + " class:" + new Throwable().getStackTrace()[0].getClassName()
1079  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
1080  }
1081 
1082  @Override
1083  public void closeOnCompletion() throws SQLException {
1084  MAPDLOGGER.debug("Entered");
1085  throw new UnsupportedOperationException("Not supported yet,"
1086  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
1087  + " class:" + new Throwable().getStackTrace()[0].getClassName()
1088  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
1089  }
1090 
1091  @Override
1092  public boolean isCloseOnCompletion() throws SQLException {
1093  MAPDLOGGER.debug("Entered");
1094  throw new UnsupportedOperationException("Not supported yet,"
1095  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
1096  + " class:" + new Throwable().getStackTrace()[0].getClassName()
1097  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
1098  }
1099 
1100  @Override
1101  public <T> T unwrap(Class<T> iface) throws SQLException {
1102  MAPDLOGGER.debug("Entered");
1103  throw new UnsupportedOperationException("Not supported yet,"
1104  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
1105  + " class:" + new Throwable().getStackTrace()[0].getClassName()
1106  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
1107  }
1108 
1109  @Override
1110  public boolean isWrapperFor(Class<?> iface) throws SQLException {
1111  MAPDLOGGER.debug("Entered");
1112  throw new UnsupportedOperationException("Not supported yet,"
1113  + " line:" + new Throwable().getStackTrace()[0].getLineNumber()
1114  + " class:" + new Throwable().getStackTrace()[0].getClassName()
1115  + " method:" + new Throwable().getStackTrace()[0].getMethodName());
1116  }
1117 
1118  private void checkClosed() throws SQLException {
1119  if (isClosed) {
1120  throw new SQLException("PreparedStatement is closed.");
1121  }
1122  }
1123 }
void setBlob(int parameterIndex, InputStream inputStream)
void setNString(int parameterIndex, String value)
void setObject(int parameterIndex, Object x, int targetSqlType)
void setClob(int parameterIndex, Reader reader)
void setNClob(int parameterIndex, NClob value)
void setNClob(int parameterIndex, Reader reader, long length)
int executeUpdate(String sql, int autoGeneratedKeys)
void setCharacterStream(int parameterIndex, Reader reader, int length)
void setAsciiStream(int parameterIndex, InputStream x)
boolean execute(String sql, int[] columnIndexes)
void setDouble(int parameterIndex, double x)
OmniSciPreparedStatement(String sql, String session, OmniSci.Client client)
void setBinaryStream(int parameterIndex, InputStream x, long length)
boolean execute(String sql, int autoGeneratedKeys)
void setNClob(int parameterIndex, Reader reader)
int executeUpdate(String sql, String[] columnNames)
std::string typeName(const T *v)
void setBinaryStream(int parameterIndex, InputStream x)
void setBinaryStream(int parameterIndex, InputStream x, int length)
void setBoolean(int parameterIndex, boolean x)
void setTimestamp(int parameterIndex, Timestamp x, Calendar cal)
size_t append(FILE *f, const size_t size, int8_t *buf)
Appends the specified number of bytes to the end of the file f from buf.
Definition: File.cpp:140
void setCharacterStream(int parameterIndex, Reader reader, long length)
void setCharacterStream(int parameterIndex, Reader reader)
void setString(int parameterIndex, String x)
void setNull(int parameterIndex, int sqlType, String typeName)
void setNCharacterStream(int parameterIndex, Reader value, long length)
void setNull(int parameterIndex, int sqlType)
void setBigDecimal(int parameterIndex, BigDecimal x)
void setTimestamp(int parameterIndex, Timestamp x)
void setSQLXML(int parameterIndex, SQLXML xmlObject)
void setDate(int parameterIndex, Date x, Calendar cal)
void setNCharacterStream(int parameterIndex, Reader value)
void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength)
int executeUpdate(String sql, int[] columnIndexes)
void setUnicodeStream(int parameterIndex, InputStream x, int length)
boolean execute(String sql, String[] columnNames)
void setAsciiStream(int parameterIndex, InputStream x, int length)
string name
Definition: setup.py:35
void setObject(int parameterIndex, Object x)
void setTime(int parameterIndex, Time x, Calendar cal)
void setAsciiStream(int parameterIndex, InputStream x, long length)
void setBlob(int parameterIndex, InputStream inputStream, long length)
void setClob(int parameterIndex, Reader reader, long length)