@@ -198,7 +198,6 @@ public static URI parseRouteHint(String routeHint) {
198
198
if (routeHint == null || routeHint .isEmpty ()) {
199
199
return null ;
200
200
}
201
- URI target ;
202
201
try {
203
202
if (routeHint .charAt (routeHint .length () - 1 ) != SPECIAL_CHAR ) {
204
203
return null ;
@@ -228,14 +227,6 @@ private static void checkResultSet(int resultSetType, int resultSetConcurrency)
228
227
}
229
228
}
230
229
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
-
239
230
public static String getCopyIntoSql (String database , DatabendCopyParams params ) {
240
231
StringBuilder sb = new StringBuilder ();
241
232
sb .append ("COPY INTO " );
@@ -297,7 +288,7 @@ synchronized private void unregisterStatement(DatabendStatement statement) {
297
288
public PreparedStatement prepareStatement (String s )
298
289
throws SQLException {
299
290
300
- return this .prepareStatement (s , 0 , 0 );
291
+ return this .prepareStatement (s , ResultSet . TYPE_FORWARD_ONLY , ResultSet . CONCUR_READ_ONLY );
301
292
}
302
293
303
294
@ Override
@@ -435,7 +426,7 @@ public Statement createStatement(int resultSetType, int resultSetConcurrency)
435
426
@ Override
436
427
public PreparedStatement prepareStatement (String s , int i , int i1 )
437
428
throws SQLException {
438
- DatabendPreparedStatement statement = new DatabendPreparedStatement (this , this ::unregisterStatement , "test" , s );
429
+ DatabendPreparedStatement statement = new DatabendPreparedStatement (this , this ::unregisterStatement , s );
439
430
registerStatement (statement );
440
431
return statement ;
441
432
}
0 commit comments