Mercurial > hg > monetdb-java
comparison src/main/java/org/monetdb/jdbc/MonetConnection.java @ 433:b31eaa9e958f
fetchsize is allowed to be -1
author | Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> |
---|---|
date | Wed, 10 Feb 2021 09:25:28 +0100 (2021-02-10) |
parents | f24b59110a7f |
children | 57d46c34c649 |
comparison
equal
deleted
inserted
replaced
432:f24b59110a7f | 433:b31eaa9e958f |
---|---|
206 | 206 |
207 final String fetchsize_prop = props.getProperty("fetchsize"); | 207 final String fetchsize_prop = props.getProperty("fetchsize"); |
208 if (fetchsize_prop != null) { | 208 if (fetchsize_prop != null) { |
209 try { | 209 try { |
210 int fetchsize = Integer.parseInt(fetchsize_prop); | 210 int fetchsize = Integer.parseInt(fetchsize_prop); |
211 if (fetchsize > 0) { | 211 if (fetchsize > 0 || fetchsize == -1) { |
212 this.defaultFetchSize = fetchsize; | 212 this.defaultFetchSize = fetchsize; |
213 conn_props.setProperty("fetchsize", fetchsize_prop); | 213 conn_props.setProperty("fetchsize", fetchsize_prop); |
214 } else { | 214 } else { |
215 addWarning("Fetch size must be positive. Value ignored", "M1M05"); | 215 addWarning("Fetch size must either be positive or -1. Value " + fetchsize + " ignored", "M1M05"); |
216 } | 216 } |
217 } catch (java.lang.NumberFormatException e) { | 217 } catch (java.lang.NumberFormatException e) { |
218 addWarning("Invalid fetch size. Value ignored", "M1M05"); | 218 addWarning("Invalid fetch size. Value '" + fetchsize_prop + "' ignored", "M1M05"); |
219 } | 219 } |
220 } | 220 } |
221 | 221 |
222 final String treatBlobAsVarBinary_prop = props.getProperty("treat_blob_as_binary"); | 222 final String treatBlobAsVarBinary_prop = props.getProperty("treat_blob_as_binary"); |
223 if (treatBlobAsVarBinary_prop != null) { | 223 if (treatBlobAsVarBinary_prop != null) { |