@@ -198,7 +198,6 @@ public static URI parseRouteHint(String routeHint) {
198198 if (routeHint == null || routeHint .isEmpty ()) {
199199 return null ;
200200 }
201- URI target ;
202201 try {
203202 if (routeHint .charAt (routeHint .length () - 1 ) != SPECIAL_CHAR ) {
204203 return null ;
@@ -228,14 +227,6 @@ private static void checkResultSet(int resultSetType, int resultSetConcurrency)
228227 }
229228 }
230229
231- // Databend DOES NOT support transaction now
232- private static void checkHoldability (int resultSetHoldability )
233- throws SQLFeatureNotSupportedException {
234- if (resultSetHoldability != ResultSet .HOLD_CURSORS_OVER_COMMIT ) {
235- throw new SQLFeatureNotSupportedException ("Result set holdability must be HOLD_CURSORS_OVER_COMMIT" );
236- }
237- }
238-
239230 public static String getCopyIntoSql (String database , DatabendCopyParams params ) {
240231 StringBuilder sb = new StringBuilder ();
241232 sb .append ("COPY INTO " );
@@ -297,7 +288,7 @@ synchronized private void unregisterStatement(DatabendStatement statement) {
297288 public PreparedStatement prepareStatement (String s )
298289 throws SQLException {
299290
300- return this .prepareStatement (s , 0 , 0 );
291+ return this .prepareStatement (s , ResultSet . TYPE_FORWARD_ONLY , ResultSet . CONCUR_READ_ONLY );
301292 }
302293
303294 @ Override
@@ -435,7 +426,7 @@ public Statement createStatement(int resultSetType, int resultSetConcurrency)
435426 @ Override
436427 public PreparedStatement prepareStatement (String s , int i , int i1 )
437428 throws SQLException {
438- DatabendPreparedStatement statement = new DatabendPreparedStatement (this , this ::unregisterStatement , "test" , s );
429+ DatabendPreparedStatement statement = new DatabendPreparedStatement (this , this ::unregisterStatement , s );
439430 registerStatement (statement );
440431 return statement ;
441432 }
0 commit comments