16 package com.omnisci.jdbc;
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;
25 import org.apache.thrift.TException;
26 import org.slf4j.Logger;
27 import org.slf4j.LoggerFactory;
29 import java.io.InputStream;
30 import java.io.Reader;
31 import java.math.BigDecimal;
33 import java.sql.Array;
36 import java.sql.Connection;
38 import java.sql.NClob;
39 import java.sql.ParameterMetaData;
40 import java.sql.PreparedStatement;
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;
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;
64 LoggerFactory.getLogger(OmniSciPreparedStatement.class);
81 private List<TStringRow>
rows = null;
82 private static final Pattern
REGEX_PATTERN = Pattern.compile(
"(?i)\\s+INTO\\s+(\\w+)");
84 "(?i)\\s*insert\\s+into\\s+[\\w:\\.]+\\s*\\(([\\w:\\s:\\,:\\']+)\\)[\\w:\\s]+\\(");
88 Pattern.compile(
"^(?:\\s|--.*?\\R|/\\*[\\S\\s]*?\\*/|\\s*)*\\s*select[\\S\\s]*",
89 Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
93 MAPDLOGGER.debug(
"Entered");
95 this.client = connection.client;
98 MAPDLOGGER.debug(
"Prepared statement is " +
currentSQL);
107 if (currentSQL.toUpperCase().contains(
"INSERT ")) {
110 currentSQL = currentSQL.replaceAll(
"\"",
" ");
111 MAPDLOGGER.debug(
"Insert Prepared statement is " +
currentSQL);
113 Matcher matcher = REGEX_PATTERN.matcher(
currentSQL);
114 while (matcher.find()) {
116 MAPDLOGGER.debug(
"Table name for insert is '" +
insertTableName +
"'");
126 throw new UnsupportedOperationException(
127 "Incorrect number of replace parameters for prepared statement "
130 StringBuilder modQuery =
new StringBuilder(
currentSQL.length() * 5);
134 modQuery.append(
"NULL");
144 qsql = modQuery.toString();
149 qsql = qsql.replace(
" WHERE 1=0",
" LIMIT 1 ");
150 MAPDLOGGER.debug(
"Query is now " + qsql);
156 Matcher matcher = REGEX_IS_SELECT_PATTERN.matcher(
currentSQL);
157 return matcher.matches();
164 MAPDLOGGER.debug(
"executeQuery, sql=" + qsql);
165 return stmt.executeQuery(qsql);
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());
175 MAPDLOGGER.debug(
"Entered");
183 public void setNull(
int parameterIndex,
int sqlType)
throws SQLException {
184 MAPDLOGGER.debug(
"Entered");
190 public void setBoolean(
int parameterIndex,
boolean x)
throws SQLException {
191 MAPDLOGGER.debug(
"Entered");
192 parmRep[parameterIndex - 1] = x ?
"true" :
"false";
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());
208 public void setShort(
int parameterIndex,
short x)
throws SQLException {
209 MAPDLOGGER.debug(
"Entered");
210 parmRep[parameterIndex - 1] = Short.toString(x);
216 public void setInt(
int parameterIndex,
int x)
throws SQLException {
217 MAPDLOGGER.debug(
"Entered");
218 parmRep[parameterIndex - 1] = Integer.toString(x);
224 public void setLong(
int parameterIndex,
long x)
throws SQLException {
225 MAPDLOGGER.debug(
"Entered");
226 parmRep[parameterIndex - 1] = Long.toString(x);
232 public void setFloat(
int parameterIndex,
float x)
throws SQLException {
233 MAPDLOGGER.debug(
"Entered");
234 parmRep[parameterIndex - 1] = Float.toString(x);
240 public void setDouble(
int parameterIndex,
double x)
throws SQLException {
241 MAPDLOGGER.debug(
"Entered");
242 parmRep[parameterIndex - 1] = Double.toString(x);
248 public void setBigDecimal(
int parameterIndex, BigDecimal x)
throws SQLException {
249 MAPDLOGGER.debug(
"Entered");
250 parmRep[parameterIndex - 1] = x.toString();
256 public void setString(
int parameterIndex, String x)
throws SQLException {
257 MAPDLOGGER.debug(
"Entered");
259 x = x.replaceAll(
"'",
"''");
260 parmRep[parameterIndex - 1] = x;
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());
276 public void setDate(
int parameterIndex,
Date x)
throws SQLException {
277 MAPDLOGGER.debug(
"Entered");
278 parmRep[parameterIndex - 1] = x.toString();
285 public void setTime(
int parameterIndex,
Time x)
throws SQLException {
286 MAPDLOGGER.debug(
"Entered");
287 parmRep[parameterIndex - 1] = x.toString();
295 MAPDLOGGER.debug(
"Entered");
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());
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());
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());
335 MAPDLOGGER.debug(
"Entered");
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());
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());
359 public boolean execute() throws SQLException {
360 MAPDLOGGER.debug(
"Entered");
362 return stmt.execute(tQuery);
367 MAPDLOGGER.debug(
"Entered");
372 Matcher matcher = REGEX_LOF_PATTERN.matcher(
currentSQL);
373 if (matcher.find()) {
374 listOfFields = matcher.group(1).trim().split(
"\\s*,+\\s*,*\\s*");
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");
381 List<String> listOfColumns =
new ArrayList<String>();
383 TTableDetails tableDetails =
385 for (TColumnType column : tableDetails.row_desc) {
386 listOfColumns.add(column.col_name.toLowerCase());
388 }
catch (TException ex) {
389 throw new SQLException(ex.toString());
392 if (listOfColumns.indexOf(paramName) == -1) {
393 throw new SQLException(
394 "Column " + paramName.toLowerCase() +
" does not exist");
401 rows =
new ArrayList(5000);
405 TStringRow tsr =
new TStringRow();
408 TStringValue tsv =
new TStringValue();
412 tsv.str_val = this.parmRep[
i];
418 MAPDLOGGER.debug(
"addBatch, rows=" + rows.size());
420 throw new UnsupportedOperationException(
"addBatch only supported for insert, line:"
421 +
new Throwable().getStackTrace()[0].getLineNumber());
427 throws SQLException {
428 MAPDLOGGER.debug(
"Entered");
429 throw new UnsupportedOperationException(
"Not supported yet,"
430 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
431 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
432 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
436 public void setRef(
int parameterIndex, Ref x)
throws SQLException {
437 MAPDLOGGER.debug(
"Entered");
438 throw new UnsupportedOperationException(
"Not supported yet,"
439 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
440 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
441 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
445 public void setBlob(
int parameterIndex, Blob x)
throws SQLException {
446 MAPDLOGGER.debug(
"Entered");
447 throw new UnsupportedOperationException(
"Not supported yet,"
448 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
449 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
450 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
454 public void setClob(
int parameterIndex, Clob x)
throws SQLException {
455 MAPDLOGGER.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());
463 public void setArray(
int parameterIndex, Array x)
throws SQLException {
464 MAPDLOGGER.debug(
"Entered");
465 parmRep[parameterIndex - 1] = x.toString();
472 MAPDLOGGER.debug(
"Entered");
479 PreparedStatement ps = null;
484 for (
int i = 1;
i <= this.parmCount; ++
i) {
485 ps.setNull(
i, Types.NULL);
487 ResultSet rs = ps.executeQuery();
489 return rs.getMetaData();
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
755 public void close() throws SQLException {
756 MAPDLOGGER.debug(
"close");
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());
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());
785 MAPDLOGGER.debug(
"Entered");
786 return stmt.getMaxRows();
791 MAPDLOGGER.debug(
"Entered");
792 MAPDLOGGER.debug(
"SetMaxRows to " + max);
793 stmt.setMaxRows(max);
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());
807 MAPDLOGGER.debug(
"Entered");
813 MAPDLOGGER.debug(
"Entered");
814 SQLWarning warning =
new SQLWarning(
815 "Query timeouts are not supported. Substituting a value of zero.");
819 rootWarning.setNextWarning(warning);
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());
833 MAPDLOGGER.debug(
"Entered");
839 MAPDLOGGER.debug(
"Entered");
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());
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());
863 MAPDLOGGER.debug(
"Entered");
864 return stmt.getResultSet();
869 MAPDLOGGER.debug(
"Entered");
870 return stmt.getUpdateCount();
875 MAPDLOGGER.debug(
"Entered");
876 return stmt.getMoreResults();
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());
890 MAPDLOGGER.debug(
"Entered");
891 return ResultSet.FETCH_FORWARD;
896 MAPDLOGGER.debug(
"Entered");
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());
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());
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());
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());
939 MAPDLOGGER.debug(
"Entered");
950 MAPDLOGGER.debug(
"executeBatch, rows=" + rows.size());
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());
959 ret =
new int[rows.size()];
960 for (
int i = 0;
i < rows.size();
i++) {
970 MAPDLOGGER.debug(
"Entered");
971 return stmt.getConnection();
976 MAPDLOGGER.debug(
"Entered");
977 throw new UnsupportedOperationException(
"Not supported yet,"
978 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
979 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
980 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
985 MAPDLOGGER.debug(
"Entered");
986 throw new UnsupportedOperationException(
"Not supported yet,"
987 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
988 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
989 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
993 public int executeUpdate(String sql,
int autoGeneratedKeys)
throws SQLException {
994 MAPDLOGGER.debug(
"Entered");
995 throw new UnsupportedOperationException(
"Not supported yet,"
996 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
997 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
998 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
1003 MAPDLOGGER.debug(
"Entered");
1004 throw new UnsupportedOperationException(
"Not supported yet,"
1005 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
1006 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
1007 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
1011 public int executeUpdate(String sql, String[] columnNames)
throws SQLException {
1012 MAPDLOGGER.debug(
"Entered");
1013 throw new UnsupportedOperationException(
"Not supported yet,"
1014 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
1015 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
1016 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
1020 public boolean execute(String sql,
int autoGeneratedKeys)
throws SQLException {
1021 MAPDLOGGER.debug(
"Entered");
1022 throw new UnsupportedOperationException(
"Not supported yet,"
1023 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
1024 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
1025 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
1029 public boolean execute(String sql,
int[] columnIndexes)
throws SQLException {
1030 MAPDLOGGER.debug(
"Entered");
1031 throw new UnsupportedOperationException(
"Not supported yet,"
1032 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
1033 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
1034 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
1038 public boolean execute(String sql, String[] columnNames)
throws SQLException {
1039 MAPDLOGGER.debug(
"Entered");
1040 throw new UnsupportedOperationException(
"Not supported yet,"
1041 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
1042 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
1043 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
1048 MAPDLOGGER.debug(
"Entered");
1049 throw new UnsupportedOperationException(
"Not supported yet,"
1050 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
1051 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
1052 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
1057 MAPDLOGGER.debug(
"Entered");
1063 MAPDLOGGER.debug(
"Entered");
1064 throw new UnsupportedOperationException(
"Not supported yet,"
1065 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
1066 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
1067 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
1072 MAPDLOGGER.debug(
"Entered");
1073 throw new UnsupportedOperationException(
"Not supported yet,"
1074 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
1075 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
1076 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
1081 MAPDLOGGER.debug(
"Entered");
1082 throw new UnsupportedOperationException(
"Not supported yet,"
1083 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
1084 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
1085 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
1090 MAPDLOGGER.debug(
"Entered");
1091 throw new UnsupportedOperationException(
"Not supported yet,"
1092 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
1093 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
1094 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
1098 public <T>
T unwrap(Class<T> iface)
throws SQLException {
1099 MAPDLOGGER.debug(
"Entered");
1100 throw new UnsupportedOperationException(
"Not supported yet,"
1101 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
1102 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
1103 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
1108 MAPDLOGGER.debug(
"Entered");
1109 throw new UnsupportedOperationException(
"Not supported yet,"
1110 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
1111 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
1112 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
1117 throw new SQLException(
"PreparedStatement is closed.");
void setTime(int parameterIndex, Time x)
void setBlob(int parameterIndex, InputStream inputStream)
void setEscapeProcessing(boolean enable)
OmniSciPreparedStatement(String sql, String session, OmniSciConnection connection)
void setNString(int parameterIndex, String value)
void setObject(int parameterIndex, Object x, int targetSqlType)
void setRowId(int parameterIndex, RowId x)
void setClob(int parameterIndex, Reader reader)
void setMaxFieldSize(int max)
void setNClob(int parameterIndex, NClob value)
void setNClob(int parameterIndex, Reader reader, long length)
int executeUpdate(String sql, int autoGeneratedKeys)
void setArray(int parameterIndex, Array x)
static final Pattern REGEX_PATTERN
void setCharacterStream(int parameterIndex, Reader reader, int length)
void setAsciiStream(int parameterIndex, InputStream x)
int executeUpdate(String sql)
void setClob(int parameterIndex, Clob x)
boolean execute(String sql, int[] columnIndexes)
void setDouble(int parameterIndex, double x)
void setFloat(int parameterIndex, float x)
void setURL(int parameterIndex, URL x)
int getResultSetConcurrency()
void addBatch(String sql)
void setBinaryStream(int parameterIndex, InputStream x, long length)
boolean execute(String sql, int autoGeneratedKeys)
void setShort(int parameterIndex, short x)
public< T > T unwrap(Class< T > iface)
void setQueryTimeout(int seconds)
void setNClob(int parameterIndex, Reader reader)
int executeUpdate(String sql, String[] columnNames)
boolean isWrapperFor(Class<?> iface)
boolean isCloseOnCompletion()
void setBinaryStream(int parameterIndex, InputStream x)
void setBinaryStream(int parameterIndex, InputStream x, int length)
void setLong(int parameterIndex, long x)
void setBoolean(int parameterIndex, boolean x)
void setTimestamp(int parameterIndex, Timestamp x, Calendar cal)
ResultSetMetaData getMetaData()
void setByte(int parameterIndex, byte x)
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.
void setCharacterStream(int parameterIndex, Reader reader, long length)
void setCharacterStream(int parameterIndex, Reader reader)
void setFetchDirection(int direction)
static final Pattern REGEX_IS_SELECT_PATTERN
void setString(int parameterIndex, String x)
void setNull(int parameterIndex, int sqlType, String typeName)
ResultSet executeQuery(String sql)
void setNCharacterStream(int parameterIndex, Reader value, long length)
ResultSet getGeneratedKeys()
void setNull(int parameterIndex, int sqlType)
Connection getConnection()
boolean execute(String sql)
void setInt(int parameterIndex, int x)
void setBigDecimal(int parameterIndex, BigDecimal x)
void setTimestamp(int parameterIndex, Timestamp x)
void setSQLXML(int parameterIndex, SQLXML xmlObject)
std::string typeName(const T *v)
void setDate(int parameterIndex, Date x, Calendar cal)
void setNCharacterStream(int parameterIndex, Reader value)
void setFetchSize(int rows)
void setDate(int parameterIndex, Date x)
void setPoolable(boolean poolable)
void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength)
boolean getMoreResults(int current)
int getResultSetHoldability()
void setCursorName(String name)
void setBytes(int parameterIndex, byte[] x)
static final Pattern REGEX_LOF_PATTERN
int executeUpdate(String sql, int[] columnIndexes)
void setUnicodeStream(int parameterIndex, InputStream x, int length)
void setBlob(int parameterIndex, Blob x)
ParameterMetaData getParameterMetaData()
static final Logger MAPDLOGGER
boolean execute(String sql, String[] columnNames)
void setAsciiStream(int parameterIndex, InputStream x, int length)
void setRef(int parameterIndex, Ref x)
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)