forked from duckdb/duckdb-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDuckDBResultSet.java
More file actions
1423 lines (1173 loc) · 51.9 KB
/
DuckDBResultSet.java
File metadata and controls
1423 lines (1173 loc) · 51.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package org.duckdb;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.lang.reflect.InvocationTargetException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.net.URL;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.sql.Array;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Date;
import java.sql.NClob;
import java.sql.Ref;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.RowId;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.sql.SQLWarning;
import java.sql.SQLXML;
import java.sql.Statement;
import java.sql.Struct;
import java.sql.Time;
import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.OffsetTime;
import java.util.*;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
public class DuckDBResultSet implements ResultSet {
private final DuckDBConnection conn;
private final DuckDBPreparedStatement stmt;
private final DuckDBResultSetMetaData meta;
/**
* {@code null} if this result set is closed.
*/
private ByteBuffer resultRef;
private final Lock resultRefLock = new ReentrantLock();
private DuckDBVector[] currentChunk = {};
private int chunkIdx = 0;
private boolean finished = false;
private boolean wasNull;
public DuckDBResultSet(DuckDBConnection conn, DuckDBPreparedStatement stmt, DuckDBResultSetMetaData meta,
ByteBuffer resultRef) throws SQLException {
try {
this.conn = Objects.requireNonNull(conn);
this.stmt = Objects.requireNonNull(stmt);
this.resultRef = Objects.requireNonNull(resultRef);
this.meta = Objects.requireNonNull(meta);
} catch (NullPointerException e) {
throw new SQLException(e);
}
}
public Statement getStatement() throws SQLException {
checkOpen();
return stmt;
}
public ResultSetMetaData getMetaData() throws SQLException {
checkOpen();
return meta;
}
public boolean next() throws SQLException {
checkOpen();
if (finished) {
return false;
}
chunkIdx++;
if (currentChunk.length == 0 || chunkIdx > currentChunk[0].length) {
currentChunk = fetchChunk();
chunkIdx = 1;
}
if (currentChunk.length == 0) {
finished = true;
return false;
}
return true;
}
public void close() throws SQLException {
if (isClosed()) {
return;
}
resultRefLock.lock();
try {
if (isClosed()) {
return;
}
DuckDBNative.duckdb_jdbc_free_result(resultRef);
// Nullness is used to determine whether we're closed
resultRef = null;
} finally {
resultRefLock.unlock();
}
// isCloseOnCompletion() throws if already closed, and we can't check for isClosed() because it could change
// between when we check and call isCloseOnCompletion, so access the field directly.
if (stmt.closeOnCompletion) {
stmt.close();
}
}
protected void finalize() throws Throwable {
close();
}
public boolean isClosed() throws SQLException {
return resultRef == null;
}
private void check(int columnIndex) throws SQLException {
checkOpen();
if (columnIndex < 1 || columnIndex > meta.column_count) {
throw new SQLException("Column index out of bounds");
}
}
/**
* Export the result set as an ArrowReader
*
* @param arrow_buffer_allocator an instance of {@link org.apache.arrow.memory.BufferAllocator}
* @param arrow_batch_size batch size of arrow vectors to return
* @return an instance of {@link org.apache.arrow.vector.ipc.ArrowReader}
*/
public synchronized Object arrowExportStream(Object arrow_buffer_allocator, long arrow_batch_size)
throws SQLException {
checkOpen();
try {
Class<?> buffer_allocator_class = Class.forName("org.apache.arrow.memory.BufferAllocator");
if (!buffer_allocator_class.isInstance(arrow_buffer_allocator)) {
throw new RuntimeException("Need to pass an Arrow BufferAllocator");
}
Long stream_pointer = DuckDBNative.duckdb_jdbc_arrow_stream(resultRef, arrow_batch_size);
Class<?> arrow_array_stream_class = Class.forName("org.apache.arrow.c.ArrowArrayStream");
Object arrow_array_stream =
arrow_array_stream_class.getMethod("wrap", long.class).invoke(null, stream_pointer);
Class<?> c_data_class = Class.forName("org.apache.arrow.c.Data");
return c_data_class.getMethod("importArrayStream", buffer_allocator_class, arrow_array_stream_class)
.invoke(null, arrow_buffer_allocator, arrow_array_stream);
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException | SecurityException |
ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
public Object getObject(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
return currentChunk[columnIndex - 1].getObject(chunkIdx - 1);
}
public Struct getStruct(int columnIndex) throws SQLException {
return checkAndNull(columnIndex) ? null : currentChunk[columnIndex - 1].getStruct(chunkIdx - 1);
}
public OffsetTime getOffsetTime(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
return currentChunk[columnIndex - 1].getOffsetTime(chunkIdx - 1);
}
public boolean wasNull() throws SQLException {
if (isClosed()) {
throw new SQLException("ResultSet was closed");
}
return wasNull;
}
private boolean checkAndNull(int columnIndex) throws SQLException {
check(columnIndex);
try {
wasNull = currentChunk[columnIndex - 1].check_and_null(chunkIdx - 1);
} catch (ArrayIndexOutOfBoundsException e) {
throw new SQLException("No row in context", e);
}
return wasNull;
}
public JsonNode getJsonObject(int columnIndex) throws SQLException {
String result = getLazyString(columnIndex);
return result == null ? null : new JsonNode(result);
}
public String getLazyString(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
return currentChunk[columnIndex - 1].getLazyString(chunkIdx - 1);
}
public String getString(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
Object res = getObject(columnIndex);
if (res == null) {
return null;
} else {
return res.toString();
}
}
public boolean getBoolean(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return false;
}
return currentChunk[columnIndex - 1].getBoolean(chunkIdx - 1);
}
public byte getByte(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return 0;
}
return currentChunk[columnIndex - 1].getByte(chunkIdx - 1);
}
public short getShort(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return 0;
}
return currentChunk[columnIndex - 1].getShort(chunkIdx - 1);
}
public int getInt(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return 0;
}
return currentChunk[columnIndex - 1].getInt(chunkIdx - 1);
}
private short getUint8(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return 0;
}
return currentChunk[columnIndex - 1].getUint8(chunkIdx - 1);
}
private int getUint16(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return 0;
}
return currentChunk[columnIndex - 1].getUint16(chunkIdx - 1);
}
private long getUint32(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return 0;
}
return currentChunk[columnIndex - 1].getUint32(chunkIdx - 1);
}
private BigInteger getUint64(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return BigInteger.ZERO;
}
return currentChunk[columnIndex - 1].getUint64(chunkIdx - 1);
}
public long getLong(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return 0;
}
return currentChunk[columnIndex - 1].getLong(chunkIdx - 1);
}
public BigInteger getHugeint(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return BigInteger.ZERO;
}
return currentChunk[columnIndex - 1].getHugeint(chunkIdx - 1);
}
public BigInteger getUhugeint(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return BigInteger.ZERO;
}
return currentChunk[columnIndex - 1].getUhugeint(chunkIdx - 1);
}
public float getFloat(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return Float.NaN;
}
return currentChunk[columnIndex - 1].getFloat(chunkIdx - 1);
}
public double getDouble(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return Double.NaN;
}
return currentChunk[columnIndex - 1].getDouble(chunkIdx - 1);
}
public int findColumn(String columnLabel) throws SQLException {
checkOpen();
for (int col_idx = 0; col_idx < meta.column_count; col_idx++) {
if (meta.column_names[col_idx].equalsIgnoreCase(columnLabel)) {
return col_idx + 1;
}
}
throw new SQLException("Could not find column with label " + columnLabel);
}
public String getString(String columnLabel) throws SQLException {
return getString(findColumn(columnLabel));
}
public boolean getBoolean(String columnLabel) throws SQLException {
return getBoolean(findColumn(columnLabel));
}
public byte getByte(String columnLabel) throws SQLException {
return getByte(findColumn(columnLabel));
}
public short getShort(String columnLabel) throws SQLException {
return getShort(findColumn(columnLabel));
}
public int getInt(String columnLabel) throws SQLException {
return getInt(findColumn(columnLabel));
}
public long getLong(String columnLabel) throws SQLException {
return getLong(findColumn(columnLabel));
}
public float getFloat(String columnLabel) throws SQLException {
return getFloat(findColumn(columnLabel));
}
public double getDouble(String columnLabel) throws SQLException {
return getDouble(findColumn(columnLabel));
}
public Object getObject(String columnLabel) throws SQLException {
return getObject(findColumn(columnLabel));
}
public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
throw new SQLFeatureNotSupportedException("getBigDecimal");
}
public byte[] getBytes(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
return currentChunk[columnIndex - 1].getBytes(chunkIdx - 1);
}
public Date getDate(int columnIndex) throws SQLException {
return checkAndNull(columnIndex) ? null : currentChunk[columnIndex - 1].getDate(chunkIdx - 1);
}
public Time getTime(int columnIndex) throws SQLException {
return getTime(columnIndex, null);
}
public Timestamp getTimestamp(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
return currentChunk[columnIndex - 1].getTimestamp(chunkIdx - 1);
}
private LocalDateTime getLocalDateTime(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
return currentChunk[columnIndex - 1].getLocalDateTime(chunkIdx - 1);
}
private OffsetDateTime getOffsetDateTime(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
return currentChunk[columnIndex - 1].getOffsetDateTime(chunkIdx - 1);
}
public UUID getUuid(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
return currentChunk[columnIndex - 1].getUuid(chunkIdx - 1);
}
public static class DuckDBBlobResult implements Blob {
static class ByteBufferBackedInputStream extends InputStream {
ByteBuffer buf;
public ByteBufferBackedInputStream(ByteBuffer buf) {
this.buf = buf;
}
public int read() throws IOException {
if (!buf.hasRemaining()) {
return -1;
}
return buf.get() & 0xFF;
}
public int read(byte[] bytes, int off, int len) throws IOException {
if (!buf.hasRemaining()) {
return -1;
}
len = Math.min(len, buf.remaining());
buf.get(bytes, off, len);
return len;
}
}
public DuckDBBlobResult(ByteBuffer buffer_p) {
buffer_p.position(0);
buffer_p.order(ByteOrder.LITTLE_ENDIAN);
this.buffer = buffer_p;
}
public InputStream getBinaryStream() {
return getBinaryStream(0, length());
}
public InputStream getBinaryStream(long pos, long length) {
return new ByteBufferBackedInputStream(buffer);
}
@Override
public byte[] getBytes(long pos, int length) throws SQLException {
if (pos < 1 || length < 0) {
throw new SQLException("Invalid position or length");
}
byte[] bytes = new byte[length];
buffer.position((int) pos - 1);
buffer.get(bytes, 0, length);
return bytes;
}
public long position(Blob pattern, long start) throws SQLException {
throw new SQLFeatureNotSupportedException("position");
}
public long position(byte[] pattern, long start) throws SQLException {
throw new SQLFeatureNotSupportedException("position");
}
public long length() {
return buffer.capacity();
}
public void free() {
// nop
}
public OutputStream setBinaryStream(long pos) throws SQLException {
throw new SQLFeatureNotSupportedException("setBinaryStream");
}
public void truncate(long length) throws SQLException {
throw new SQLFeatureNotSupportedException("truncate");
}
public int setBytes(long pos, byte[] bytes) throws SQLException {
throw new SQLFeatureNotSupportedException("setBytes");
}
public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException {
throw new SQLFeatureNotSupportedException("setBytes");
}
@Override
public String toString() {
return "DuckDBBlobResult{"
+ "buffer=" + buffer + '}';
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
DuckDBBlobResult that = (DuckDBBlobResult) o;
return Objects.equals(buffer, that.buffer);
}
@Override
public int hashCode() {
return Objects.hash(buffer);
}
private final ByteBuffer buffer;
}
public Blob getBlob(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
return currentChunk[columnIndex - 1].getBlob(chunkIdx - 1);
}
public Blob getBlob(String columnLabel) throws SQLException {
return getBlob(findColumn(columnLabel));
}
public InputStream getAsciiStream(int columnIndex) throws SQLException {
throw new SQLFeatureNotSupportedException("getAsciiStream");
}
public InputStream getUnicodeStream(int columnIndex) throws SQLException {
throw new SQLFeatureNotSupportedException("getUnicodeStream");
}
public InputStream getBinaryStream(int columnIndex) throws SQLException {
throw new SQLFeatureNotSupportedException("getBinaryStream");
}
public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException {
throw new SQLFeatureNotSupportedException("getBigDecimal");
}
public byte[] getBytes(String columnLabel) throws SQLException {
throw new SQLFeatureNotSupportedException("getBytes");
}
public Date getDate(String columnLabel) throws SQLException {
return getDate(findColumn(columnLabel));
}
public Time getTime(String columnLabel) throws SQLException {
return getTime(findColumn(columnLabel));
}
public Timestamp getTimestamp(String columnLabel) throws SQLException {
return getTimestamp(findColumn(columnLabel));
}
public InputStream getAsciiStream(String columnLabel) throws SQLException {
throw new SQLFeatureNotSupportedException("getAsciiStream");
}
public InputStream getUnicodeStream(String columnLabel) throws SQLException {
throw new SQLFeatureNotSupportedException("getUnicodeStream");
}
public InputStream getBinaryStream(String columnLabel) throws SQLException {
throw new SQLFeatureNotSupportedException("getBinaryStream");
}
public SQLWarning getWarnings() throws SQLException {
throw new SQLFeatureNotSupportedException("getWarnings");
}
public void clearWarnings() throws SQLException {
throw new SQLFeatureNotSupportedException("clearWarnings");
}
public String getCursorName() throws SQLException {
throw new SQLFeatureNotSupportedException("getCursorName");
}
public Reader getCharacterStream(int columnIndex) throws SQLException {
throw new SQLFeatureNotSupportedException("getCharacterStream");
}
public Reader getCharacterStream(String columnLabel) throws SQLException {
throw new SQLFeatureNotSupportedException("getCharacterStream");
}
public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
return currentChunk[columnIndex - 1].getBigDecimal(chunkIdx - 1);
}
public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
return getBigDecimal(findColumn(columnLabel));
}
public boolean isBeforeFirst() throws SQLException {
throw new SQLFeatureNotSupportedException("isBeforeFirst");
}
public boolean isAfterLast() throws SQLException {
throw new SQLFeatureNotSupportedException("isAfterLast");
}
public boolean isFirst() throws SQLException {
throw new SQLFeatureNotSupportedException("isFirst");
}
public boolean isLast() throws SQLException {
throw new SQLFeatureNotSupportedException("isLast");
}
public void beforeFirst() throws SQLException {
throw new SQLFeatureNotSupportedException("beforeFirst");
}
public void afterLast() throws SQLException {
throw new SQLFeatureNotSupportedException("afterLast");
}
public boolean first() throws SQLException {
throw new SQLFeatureNotSupportedException("first");
}
public boolean last() throws SQLException {
throw new SQLFeatureNotSupportedException("last");
}
public int getRow() throws SQLException {
throw new SQLFeatureNotSupportedException("getRow");
}
public boolean absolute(int row) throws SQLException {
throw new SQLFeatureNotSupportedException("absolute");
}
public boolean relative(int rows) throws SQLException {
throw new SQLFeatureNotSupportedException("relative");
}
public boolean previous() throws SQLException {
throw new SQLFeatureNotSupportedException("previous");
}
public void setFetchDirection(int direction) throws SQLException {
checkOpen();
if (direction != ResultSet.FETCH_FORWARD && direction != ResultSet.FETCH_UNKNOWN) {
throw new SQLFeatureNotSupportedException("setFetchDirection");
}
}
public int getFetchDirection() throws SQLException {
checkOpen();
return ResultSet.FETCH_FORWARD;
}
public void setFetchSize(int rows) throws SQLException {
checkOpen();
if (rows < 0) {
throw new SQLException("Fetch size has to be >= 0");
}
}
public int getFetchSize() throws SQLException {
checkOpen();
return DuckDBNative.duckdb_jdbc_fetch_size();
}
public int getType() throws SQLException {
checkOpen();
return ResultSet.TYPE_FORWARD_ONLY;
}
public int getConcurrency() throws SQLException {
checkOpen();
return ResultSet.CONCUR_READ_ONLY;
}
public boolean rowUpdated() throws SQLException {
throw new SQLFeatureNotSupportedException("rowUpdated");
}
public boolean rowInserted() throws SQLException {
throw new SQLFeatureNotSupportedException("rowInserted");
}
public boolean rowDeleted() throws SQLException {
throw new SQLFeatureNotSupportedException("rowDeleted");
}
public void updateNull(int columnIndex) throws SQLException {
throw new SQLFeatureNotSupportedException("updateNull");
}
public void updateBoolean(int columnIndex, boolean x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateBoolean");
}
public void updateByte(int columnIndex, byte x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateByte");
}
public void updateShort(int columnIndex, short x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateShort");
}
public void updateInt(int columnIndex, int x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateInt");
}
public void updateLong(int columnIndex, long x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateLong");
}
public void updateFloat(int columnIndex, float x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateFloat");
}
public void updateDouble(int columnIndex, double x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateDouble");
}
public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateBigDecimal");
}
public void updateString(int columnIndex, String x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateString");
}
public void updateBytes(int columnIndex, byte[] x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateBytes");
}
public void updateDate(int columnIndex, Date x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateDate");
}
public void updateTime(int columnIndex, Time x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateTime");
}
public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateTimestamp");
}
public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException {
throw new SQLFeatureNotSupportedException("updateAsciiStream");
}
public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException {
throw new SQLFeatureNotSupportedException("updateBinaryStream");
}
public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException {
throw new SQLFeatureNotSupportedException("updateCharacterStream");
}
public void updateObject(int columnIndex, Object x, int scaleOrLength) throws SQLException {
throw new SQLFeatureNotSupportedException("updateObject");
}
public void updateObject(int columnIndex, Object x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateObject");
}
public void updateNull(String columnLabel) throws SQLException {
throw new SQLFeatureNotSupportedException("updateNull");
}
public void updateBoolean(String columnLabel, boolean x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateBoolean");
}
public void updateByte(String columnLabel, byte x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateByte");
}
public void updateShort(String columnLabel, short x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateShort");
}
public void updateInt(String columnLabel, int x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateInt");
}
public void updateLong(String columnLabel, long x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateLong");
}
public void updateFloat(String columnLabel, float x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateFloat");
}
public void updateDouble(String columnLabel, double x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateDouble");
}
public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateBigDecimal");
}
public void updateString(String columnLabel, String x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateString");
}
public void updateBytes(String columnLabel, byte[] x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateBytes");
}
public void updateDate(String columnLabel, Date x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateDate");
}
public void updateTime(String columnLabel, Time x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateTime");
}
public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateTimestamp");
}
public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException {
throw new SQLFeatureNotSupportedException("updateAsciiStream");
}
public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException {
throw new SQLFeatureNotSupportedException("updateBinaryStream");
}
public void updateCharacterStream(String columnLabel, Reader reader, int length) throws SQLException {
throw new SQLFeatureNotSupportedException("updateCharacterStream");
}
public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException {
throw new SQLFeatureNotSupportedException("updateObject");
}
public void updateObject(String columnLabel, Object x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateObject");
}
public void insertRow() throws SQLException {
throw new SQLFeatureNotSupportedException("insertRow");
}
public void updateRow() throws SQLException {
throw new SQLFeatureNotSupportedException("updateRow");
}
public void deleteRow() throws SQLException {
throw new SQLFeatureNotSupportedException("deleteRow");
}
public void refreshRow() throws SQLException {
throw new SQLFeatureNotSupportedException("refreshRow");
}
public void cancelRowUpdates() throws SQLException {
throw new SQLFeatureNotSupportedException("cancelRowUpdates");
}
public void moveToInsertRow() throws SQLException {
throw new SQLFeatureNotSupportedException("moveToInsertRow");
}
public void moveToCurrentRow() throws SQLException {
throw new SQLFeatureNotSupportedException("moveToCurrentRow");
}
public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException {
throw new SQLFeatureNotSupportedException("getObject");
}
public Ref getRef(int columnIndex) throws SQLException {
throw new SQLFeatureNotSupportedException("getRef");
}
public Clob getClob(int columnIndex) throws SQLException {
throw new SQLFeatureNotSupportedException("getClob");
}
public Array getArray(int columnIndex) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
return currentChunk[columnIndex - 1].getArray(chunkIdx - 1);
}
public Object getObject(String columnLabel, Map<String, Class<?>> map) throws SQLException {
throw new SQLFeatureNotSupportedException("getObject");
}
public Ref getRef(String columnLabel) throws SQLException {
throw new SQLFeatureNotSupportedException("getRef");
}
public Clob getClob(String columnLabel) throws SQLException {
throw new SQLFeatureNotSupportedException("getClob");
}
public Array getArray(String columnLabel) throws SQLException {
return getArray(findColumn(columnLabel));
}
public Date getDate(int columnIndex, Calendar cal) throws SQLException {
return getDate(columnIndex);
}
public Date getDate(String columnLabel, Calendar cal) throws SQLException {
return getDate(findColumn(columnLabel), cal);
}
public Time getTime(int columnIndex, Calendar cal) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
return currentChunk[columnIndex - 1].getTime(chunkIdx - 1, cal);
}
public Time getTime(String columnLabel, Calendar cal) throws SQLException {
return getTime(findColumn(columnLabel), cal);
}
public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
if (checkAndNull(columnIndex)) {
return null;
}
return currentChunk[columnIndex - 1].getTimestamp(chunkIdx - 1, cal);
}
public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException {
return getTimestamp(findColumn(columnLabel), cal);
}
public URL getURL(int columnIndex) throws SQLException {
throw new SQLFeatureNotSupportedException("getURL");
}
public URL getURL(String columnLabel) throws SQLException {
throw new SQLFeatureNotSupportedException("getURL");
}
public void updateRef(int columnIndex, Ref x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateRef");
}
public void updateRef(String columnLabel, Ref x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateRef");
}
public void updateBlob(int columnIndex, Blob x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateBlob");
}
public void updateBlob(String columnLabel, Blob x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateBlob");
}
public void updateClob(int columnIndex, Clob x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateClob");
}
public void updateClob(String columnLabel, Clob x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateClob");
}
public void updateArray(int columnIndex, Array x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateArray");
}
public void updateArray(String columnLabel, Array x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateArray");
}
public RowId getRowId(int columnIndex) throws SQLException {
throw new SQLFeatureNotSupportedException("getRowId");
}
public RowId getRowId(String columnLabel) throws SQLException {
throw new SQLFeatureNotSupportedException("getRowId");
}
public void updateRowId(int columnIndex, RowId x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateRowId");
}
public void updateRowId(String columnLabel, RowId x) throws SQLException {
throw new SQLFeatureNotSupportedException("updateRowId");
}
public int getHoldability() throws SQLException {
throw new SQLFeatureNotSupportedException("getHoldability");
}