comparison src/main/java/org/monetdb/jdbc/MonetConnection.java @ 967:5cc071c5c170

Corrected the returned integer values of Statement methods executeUpdate(...), executeLargeUpdate(...), getUpdateCount() and getLargeUpdateCount() and PreparedStatement methods executeUpdate() and executeLargeUpdate(). They returned -2 for DDL statements, which was not in compliance with the JDBC API documentation.
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 13 Feb 2025 21:16:20 +0100 (2 months ago)
parents ff075ed5ce81
children
comparison
equal deleted inserted replaced
966:39b74cc688d2 967:5cc071c5c170
2933 // }}} 2933 // }}}
2934 2934
2935 /** 2935 /**
2936 * The SchemaResponse represents an schema modification response. 2936 * The SchemaResponse represents an schema modification response.
2937 * It is issued on statements like CREATE, DROP or ALTER TABLE. 2937 * It is issued on statements like CREATE, DROP or ALTER TABLE.
2938 * This response keeps a field that represents the success state, as
2939 * defined by JDBC, which is currently in MonetDB's case always
2940 * SUCCESS_NO_INFO. Note that this state is not sent by the
2941 * server.<br />
2942 * <samp>&amp;3</samp> 2938 * <samp>&amp;3</samp>
2943 */ 2939 */
2944 // {{{ SchemaResponse class implementation 2940 // {{{ SchemaResponse class implementation
2945 class SchemaResponse implements Response { 2941 class SchemaResponse implements Response {
2946 public final int state = Statement.SUCCESS_NO_INFO;
2947
2948 @Override 2942 @Override
2949 public String addLine(final String line, final LineType linetype) { 2943 public String addLine(final String line, final LineType linetype) {
2950 return "Header lines are not supported for a SchemaResponse"; 2944 return "Header lines are not supported for a SchemaResponse";
2951 } 2945 }
2952 2946