You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Miliving (via GitHub)" <gi...@apache.org> on 2023/04/26 00:52:49 UTC
[GitHub] [shardingsphere] Miliving commented on issue #25314: foreach batchInsert Error
Miliving commented on issue #25314:
URL: https://github.com/apache/shardingsphere/issues/25314#issuecomment-1522605794
Does this mean that I can use the original jdbc API to bypass shardingshsphere's syntax parsing? For example:
```java
Connection connection =getConnection();
connection.setAutoCommit(false);
PreparedStatement statement = connection.prepareStatement(“INSERT INTO TABLEX VALUES(?, ?)”);
//record1
statement.setInt(1, 1);
statement.setString(2, “Cujo”);
statement.addBatch();
//record2
statement.setInt(1, 2);
statement.setString(2, “Fred”);
statement.addBatch();
//record3
statement.setInt(1, 3);
statement.setString(2, “Mark”);
statement.addBatch();
int [] counts = statement.executeBatch();
connection.commit();
```
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org