TherChenYang commented on issue #30600:
URL: 
https://github.com/apache/shardingsphere/issues/30600#issuecomment-2022578197

   @dongoewang We will consider this requirement. You can use addBatch and 
executeBatch in ShardingSpherePreparedStatement meet your requirements in the 
current version.
   
   ```java
   public class JdbcTest {
       public static void main(String[] args) throws IOException, SQLException {
           DataSource dataSource = 
YamlShardingSphereDataSourceFactory.createDataSource(getFile("classpath:sharding.yml"));
           Connection connection = dataSource.getConnection();
           String sql = "delete FROM books where id = ?";
           PreparedStatement preparedStatement = 
connection.prepareStatement(sql);
   
   
           for (int i = 5; i < 10; i++) {
               preparedStatement.setLong(1, i);
               preparedStatement.addBatch();
           }
   
           int[] ints = preparedStatement.executeBatch();
       }
   }
   ```
   
![image](https://github.com/apache/shardingsphere/assets/124348939/071c41bf-352e-4883-abe5-a0019b4a3af9)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to