11package com .taosdata .jdbc .ws .stmt ;
22
33import com .taosdata .jdbc .TSDBConstants ;
4- import com .taosdata .jdbc .common .TDBlob ;
54import com .taosdata .jdbc .utils .SpecifyAddress ;
65import com .taosdata .jdbc .utils .StringUtils ;
76import com .taosdata .jdbc .utils .TestUtils ;
@@ -147,7 +146,7 @@ public void testExecuteUpdate2() throws SQLException {
147146 @ Test
148147 public void testExecuteCriticalValue () throws SQLException {
149148 String sql = "insert into " + db_name + "." + tableName + " values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" ;
150- PreparedStatement statement = connection .prepareStatement (sql );
149+ TSWSPreparedStatement statement = connection .prepareStatement (sql ). unwrap ( TSWSPreparedStatement . class );
151150 statement .setTimestamp (1 , new Timestamp (0 ));
152151 statement .setByte (2 , (byte ) 127 );
153152 statement .setShort (3 , (short ) 32767 );
@@ -159,8 +158,8 @@ public void testExecuteCriticalValue() throws SQLException {
159158 statement .setString (9 , "ABC" );
160159 statement .setNString (10 , "涛思数据" );
161160 statement .setString (11 , "陶" );
162- statement .setBytes (12 , expectedVarBinary );
163- statement .setBytes (13 , expectedGeometry );
161+ statement .setVarbinary (12 , expectedVarBinary );
162+ statement .setGeometry (13 , expectedGeometry );
164163 statement .setShort (14 , TSDBConstants .MAX_UNSIGNED_BYTE );
165164 statement .setInt (15 , TSDBConstants .MAX_UNSIGNED_SHORT );
166165 statement .setLong (16 , TSDBConstants .MAX_UNSIGNED_INT );
0 commit comments