Mercurial > hg > monetdb-java
comparison src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java @ 378:02f353f62abe
Adjust UpdateResponse to allow for large updates (long instead of int).
Also change getLargeUpdateCount() to use this long count.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Fri, 25 Sep 2020 19:06:11 +0200 (2020-09-25) |
parents | 8a813f5cef1b |
children | 11c30e3b7966 |
comparison
equal
deleted
inserted
replaced
377:8a813f5cef1b | 378:02f353f62abe |
---|---|
2599 * -1 if not applicable.<br /> | 2599 * -1 if not applicable.<br /> |
2600 * <tt>&2 0 -1</tt> | 2600 * <tt>&2 0 -1</tt> |
2601 */ | 2601 */ |
2602 // {{{ UpdateResponse class implementation | 2602 // {{{ UpdateResponse class implementation |
2603 final static class UpdateResponse implements Response { | 2603 final static class UpdateResponse implements Response { |
2604 public final int count; | 2604 public final long count; |
2605 public final String lastid; | 2605 public final String lastid; |
2606 | 2606 |
2607 public UpdateResponse(final int cnt, final String id) { | 2607 public UpdateResponse(final long cnt, final String id) { |
2608 // fill the blank finals | 2608 // fill the blank finals |
2609 this.count = cnt; | 2609 this.count = cnt; |
2610 this.lastid = id; | 2610 this.lastid = id; |
2611 } | 2611 } |
2612 | 2612 |
2900 rsresponses = new HashMap<Integer, ResultSetResponse>(); | 2900 rsresponses = new HashMap<Integer, ResultSetResponse>(); |
2901 rsresponses.put(Integer.valueOf(id), (ResultSetResponse) res); | 2901 rsresponses.put(Integer.valueOf(id), (ResultSetResponse) res); |
2902 } | 2902 } |
2903 } break; | 2903 } break; |
2904 case StartOfHeaderParser.Q_UPDATE: | 2904 case StartOfHeaderParser.Q_UPDATE: |
2905 res = new UpdateResponse(sohp.getNextAsInt(), // count | 2905 res = new UpdateResponse(sohp.getNextAsLong(), // count |
2906 sohp.getNextAsString() // key-id | 2906 sohp.getNextAsString() // key-id |
2907 ); | 2907 ); |
2908 break; | 2908 break; |
2909 case StartOfHeaderParser.Q_SCHEMA: | 2909 case StartOfHeaderParser.Q_SCHEMA: |
2910 res = new SchemaResponse(); | 2910 res = new SchemaResponse(); |