comparison src/main/java/org/monetdb/jdbc/MonetConnection.java @ 511:bd860e850fe1 onclient

rename insertFakeFlushes to insertFakePrompts
author Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
date Mon, 23 Aug 2021 09:09:41 +0200 (2021-08-23)
parents 13b48891ac54
children 443780d71bae
comparison
equal deleted inserted replaced
510:13b48891ac54 511:bd860e850fe1
3231 if (uploader == null) { 3231 if (uploader == null) {
3232 return "No file upload handler has been registered with the JDBC driver"; 3232 return "No file upload handler has been registered with the JDBC driver";
3233 } 3233 }
3234 3234
3235 MonetUploadHandle handle = new MonetUploadHandle(server); 3235 MonetUploadHandle handle = new MonetUploadHandle(server);
3236 boolean wasFaking = server.setInsertFakeFlushes(false); 3236 boolean wasFaking = server.setInsertFakePrompts(false);
3237 try { 3237 try {
3238 uploader.handleUpload(handle, path, textMode, offset); 3238 uploader.handleUpload(handle, path, textMode, offset);
3239 if (!handle.hasBeenUsed()) { 3239 if (!handle.hasBeenUsed()) {
3240 String message = String.format("Call to %s.handleUpload for path '%s' sent neither data nor an error message", 3240 String message = String.format("Call to %s.handleUpload for path '%s' sent neither data nor an error message",
3241 uploader.getClass().getCanonicalName(), path); 3241 uploader.getClass().getCanonicalName(), path);
3242 throw new IOException(message); 3242 throw new IOException(message);
3243 } 3243 }
3244 handle.close(); 3244 handle.close();
3245 } finally { 3245 } finally {
3246 server.setInsertFakeFlushes(wasFaking); 3246 server.setInsertFakePrompts(wasFaking);
3247 } 3247 }
3248 return handle.getError(); 3248 return handle.getError();
3249 } 3249 }
3250 3250
3251 private String handleDownload(String path) throws IOException { 3251 private String handleDownload(String path) throws IOException {