File tree Expand file tree Collapse file tree
com.dbeaver.jdbc.driver.libsql/src/main/java/com/dbeaver/jdbc/driver/libsql Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,21 +121,29 @@ public ResultSet getResultSet() throws SQLException {
121121 @ Override
122122 public int getUpdateCount () throws SQLException {
123123 if (executionResult == null ) {
124- throw new LibSqlException ("No update count before statement execute" );
124+ return -1 ;
125+ }
126+ if (executionResult .getColumns () != null && !executionResult .getColumns ().isEmpty ()) {
127+ return -1 ;
125128 }
126129 return (int ) executionResult .getUpdateCount ();
127130 }
128131
129132 @ Override
130133 public long getLargeUpdateCount () throws SQLException {
131134 if (executionResult == null ) {
132- throw new LibSqlException ("No update count before statement execute" );
135+ return -1 ;
136+ }
137+ if (executionResult .getColumns () != null && !executionResult .getColumns ().isEmpty ()) {
138+ return -1 ;
133139 }
134140 return executionResult .getUpdateCount ();
135141 }
136142
137143 @ Override
138144 public boolean getMoreResults () throws SQLException {
145+ executionResult = null ;
146+ resultSet = null ;
139147 return false ;
140148 }
141149
@@ -151,6 +159,8 @@ public int getFetchDirection() throws SQLException {
151159
152160 @ Override
153161 public boolean getMoreResults (int current ) throws SQLException {
162+ executionResult = null ;
163+ resultSet = null ;
154164 return false ;
155165 }
156166 @ Override
You can’t perform that action at this time.
0 commit comments