comparison src/main/java/org/monetdb/jdbc/MonetConnection.java @ 563:fa2493d924c8 onclient

Small updates
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Wed, 22 Sep 2021 20:21:01 +0200 (2021-09-22)
parents c640075da7c9
children eeea18f501b3
comparison
equal deleted inserted replaced
562:c640075da7c9 563:fa2493d924c8
149 protected int lastSetQueryTimeout; // 0 means no timeout, which is the default on the server 149 protected int lastSetQueryTimeout; // 0 means no timeout, which is the default on the server
150 150
151 /** A cache to reduce the number of DatabaseMetaData objects created by getMetaData() to maximum 1 per connection */ 151 /** A cache to reduce the number of DatabaseMetaData objects created by getMetaData() to maximum 1 per connection */
152 private DatabaseMetaData dbmd; 152 private DatabaseMetaData dbmd;
153 153
154 /** Handlers for ON CLIENT requests */
155 private UploadHandler uploadHandler;
156 private DownloadHandler downloadHandler;
157
158 /** 154 /**
159 * Constructor of a Connection for MonetDB. At this moment the 155 * Constructor of a Connection for MonetDB. At this moment the
160 * current implementation limits itself to storing the given host, 156 * current implementation limits itself to storing the given host,
161 * database, username and password for later use by the 157 * database, username and password for later use by the
162 * createStatement() call. This constructor is only accessible to 158 * createStatement() call. This constructor is only accessible to
1676 //== end methods of interface java.sql.Connection 1672 //== end methods of interface java.sql.Connection
1677 1673
1678 1674
1679 //== internal helper methods which do not belong to the JDBC interface 1675 //== internal helper methods which do not belong to the JDBC interface
1680 1676
1681 /** 1677 /** Handlers for ON CLIENT requests */
1682 * Registers a {@link UploadHandler} to support for example COPY ON CLIENT 1678 private UploadHandler uploadHandler;
1679 private DownloadHandler downloadHandler;
1680
1681 /**
1682 * Registers a {@link UploadHandler} to support for example COPY INTO mytable FROM 'data.csv' ON CLIENT
1683 * 1683 *
1684 * @param uploadHandler the handler to register, or null to deregister 1684 * @param uploadHandler the handler to register, or null to deregister
1685 */ 1685 */
1686 public void setUploadHandler(UploadHandler uploadHandler) { 1686 public void setUploadHandler(UploadHandler uploadHandler) {
1687 this.uploadHandler = uploadHandler; 1687 this.uploadHandler = uploadHandler;
1692 */ 1692 */
1693 public UploadHandler getUploadHandler() { 1693 public UploadHandler getUploadHandler() {
1694 return uploadHandler; 1694 return uploadHandler;
1695 } 1695 }
1696 /** 1696 /**
1697 * Registers a {@link DownloadHandler} to support for example COPY ON CLIENT 1697 * Registers a {@link DownloadHandler} to support for example COPY select_result INTO 'data.csv' ON CLIENT
1698 * 1698 *
1699 * @param downloadHandler the handler to register, or null to deregister 1699 * @param downloadHandler the handler to register, or null to deregister
1700 */ 1700 */
1701 public void setDownloadHandler(DownloadHandler downloadHandler) { 1701 public void setDownloadHandler(DownloadHandler downloadHandler) {
1702 this.downloadHandler = downloadHandler; 1702 this.downloadHandler = downloadHandler;