comparison src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java @ 249:46385d8ff8c9

Improve the implementation of Statement methods getQueryTimeout() and setQueryTimeout(). Previously the timeout would be set directly on the server implying all next statements within the connection session would use the new timeout setting. However the timeout in JDBC can be set per Statement and be different for different Statements. This behavior is now implemented. The implementation is now similar to the implementation in the ODBC driver code.
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 30 Aug 2018 16:55:04 +0200 (2018-08-30)
parents 337a1292fe18
children 96057ee68017 d4baf8a4b43a
comparison
equal deleted inserted replaced
245:55375d489024 249:46385d8ff8c9
153 private boolean hasPrivilege_codesTable = false; 153 private boolean hasPrivilege_codesTable = false;
154 154
155 // Internal cache for determining if system table sys.comments (new as of Mar2018 release) exists on server 155 // Internal cache for determining if system table sys.comments (new as of Mar2018 release) exists on server
156 private boolean queriedCommentsTable = false; 156 private boolean queriedCommentsTable = false;
157 private boolean hasCommentsTable = false; 157 private boolean hasCommentsTable = false;
158
159 /** The last set query timeout on the server as used by Statement and PreparedStatement (and CallableStatement in future) */
160 protected int lastSetQueryTimeout = 0; // 0 means no timeout, which is the default on the server
158 161
159 162
160 /** 163 /**
161 * Constructor of a Connection for MonetDB. At this moment the 164 * Constructor of a Connection for MonetDB. At this moment the
162 * current implementation limits itself to storing the given host, 165 * current implementation limits itself to storing the given host,