You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/12/05 08:19:13 UTC

[GitHub] [shardingsphere] carlyin0801 opened a new issue, #22659: When will shardingsphere support batch insert and batch update?

carlyin0801 opened a new issue, #22659:
URL: https://github.com/apache/shardingsphere/issues/22659

   Which version of ShardingSphere did you use?
   5.0.0
   
   Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   The error message is as follows(batch insert and batch update):
   org.jooq.exception.DataAccessException: SQL [insert into `T_ERROR_CODE_INFO` (`ID`, `ERROR_TYPE`, `ERROR_CODE`, `ERROR_MSG`, `CREATOR`, `MODIFIER`, `UPDATE_TIME`, `CREATE_TIME`) values (8388451, 1, 401, '', '', '', {ts '2022-12-05 16:05:16.322'}, {ts '2022-12-05 16:05:16.322'})]; addBatch sql
   Caused by: java.sql.SQLFeatureNotSupportedException: addBatch sql
           at org.apache.shardingsphere.driver.jdbc.unsupported.AbstractUnsupportedOperationStatement.addBatch(AbstractUnsupportedOperationStatement.java:33)
           at org.jooq.tools.jdbc.DefaultStatement.addBatch(DefaultStatement.java:261)
           at org.jooq.tools.jdbc.DefaultStatement.addBatch(DefaultStatement.java:261)
           at org.jooq.impl.BatchMultiple.execute(BatchMultiple.java:103)
           ... 100 common frames omitted
   
   code template:
   public abstract class AbstractUnsupportedOperationStatement extends WrapperAdapter implements Statement {
       
       @Override
       public final void addBatch(final String sql) throws SQLException {
           throw new SQLFeatureNotSupportedException("addBatch sql");
       }
       
       @Override
       public void clearBatch() throws SQLException {
           throw new SQLFeatureNotSupportedException("clearBatch");
       }
       
       @Override
       public int[] executeBatch() throws SQLException {
           throw new SQLFeatureNotSupportedException("executeBatch");
       }
       
       @Override
       public final void closeOnCompletion() throws SQLException {
           throw new SQLFeatureNotSupportedException("closeOnCompletion");
       }
       
       @Override
       public final boolean isCloseOnCompletion() throws SQLException {
           throw new SQLFeatureNotSupportedException("isCloseOnCompletion");
       }
       
       @Override
       public final void setCursorName(final String name) throws SQLException {
           throw new SQLFeatureNotSupportedException("setCursorName");
       }
   }
   


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] sandynz commented on issue #22659: When will shardingsphere support batch insert and batch update?

Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #22659:
URL: https://github.com/apache/shardingsphere/issues/22659#issuecomment-1337304302

   Hi @carlyin0801 , thanks for your feedback.
   
   Currently, `addBatch` is not supported in `Statement` and it's not scheduled. You could use `PreparedStatement` as workaround for now.
   


-- 
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


[GitHub] [shardingsphere] TeslaCN closed issue #22659: When will shardingsphere support batch insert and batch update?

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #22659: When will shardingsphere support batch insert and batch update?
URL: https://github.com/apache/shardingsphere/issues/22659


-- 
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