org.pentaho.di.core.database.Database.emptyAndCommit()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(234)

本文整理了Java中org.pentaho.di.core.database.Database.emptyAndCommit()方法的一些代码示例,展示了Database.emptyAndCommit()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Database.emptyAndCommit()方法的具体详情如下:
包路径:org.pentaho.di.core.database.Database
类名称:Database
方法名:emptyAndCommit

Database.emptyAndCommit介绍

[英]Close the passed prepared statement. This object's "written" property is passed to the method that does the execute and commit.
[中]关闭已传递的预处理语句。这个对象的“writed”属性被传递给执行和提交的方法。

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

  1. public synchronized void closeStepAttributeInsertPreparedStatement() throws KettleException {
  2. if ( psStepAttributesInsert != null ) {
  3. database.emptyAndCommit( psStepAttributesInsert, useBatchProcessing, 1 ); // batch
  4. // mode!
  5. psStepAttributesInsert = null;
  6. }
  7. }

代码示例来源:origin: pentaho/pentaho-kettle

  1. /**
  2. * Close the passed prepared statement. This object's "written" property is passed to the method that does the execute
  3. * and commit.
  4. *
  5. * @param ps
  6. * @param batch
  7. * @throws KettleDatabaseException
  8. */
  9. public void emptyAndCommit( PreparedStatement ps, boolean batch ) throws KettleDatabaseException {
  10. emptyAndCommit( ps, batch, written );
  11. }

代码示例来源:origin: pentaho/pentaho-kettle

  1. public synchronized void closeTransAttributeInsertPreparedStatement() throws KettleException {
  2. if ( psTransAttributesInsert != null ) {
  3. database.emptyAndCommit( psTransAttributesInsert, useBatchProcessing, 1 ); // batch
  4. // mode!
  5. psTransAttributesInsert = null;
  6. }
  7. }

代码示例来源:origin: pentaho/pentaho-kettle

  1. public synchronized void closeJobAttributeInsertPreparedStatement() throws KettleException {
  2. if ( psJobAttributesInsert != null ) {
  3. database.emptyAndCommit( psJobAttributesInsert, useBatchProcessing, 1 ); // batch
  4. // mode!
  5. psJobAttributesInsert = null;
  6. }
  7. }

代码示例来源:origin: pentaho/pentaho-kettle

  1. data.db.emptyAndCommit( insertStatement, data.batchMode, batchCounter );

代码示例来源:origin: pentaho/pentaho-kettle

  1. data.db.emptyAndCommit( insertStatement, data.batchMode, batchCounter );

代码示例来源:origin: pentaho/pentaho-kettle

  1. public void dispose( StepMetaInterface smi, StepDataInterface sdi ) {
  2. meta = (UpdateMeta) smi;
  3. data = (UpdateData) sdi;
  4. if ( data.db != null ) {
  5. try {
  6. if ( !data.db.isAutoCommit() ) {
  7. if ( getErrors() == 0 ) {
  8. data.db.emptyAndCommit( data.prepStatementUpdate, meta.useBatchUpdate() );
  9. } else {
  10. data.db.rollback();
  11. }
  12. }
  13. data.db.closePreparedStatement( data.prepStatementUpdate );
  14. data.db.closePreparedStatement( data.prepStatementLookup );
  15. } catch ( KettleDatabaseException e ) {
  16. logError( BaseMessages.getString( PKG, "Update.Log.UnableToCommitUpdateConnection" )
  17. + data.db + "] :" + e.toString() );
  18. setErrors( 1 );
  19. } finally {
  20. data.db.disconnect();
  21. }
  22. }
  23. super.dispose( smi, sdi );
  24. }

相关文章