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

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

本文整理了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

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

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

/**
 * Close the passed prepared statement. This object's "written" property is passed to the method that does the execute
 * and commit.
 *
 * @param ps
 * @param batch
 * @throws KettleDatabaseException
 */
public void emptyAndCommit( PreparedStatement ps, boolean batch ) throws KettleDatabaseException {
 emptyAndCommit( ps, batch, written );
}

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

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

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

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

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

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

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

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

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

public void dispose( StepMetaInterface smi, StepDataInterface sdi ) {
 meta = (UpdateMeta) smi;
 data = (UpdateData) sdi;
 if ( data.db != null ) {
  try {
   if ( !data.db.isAutoCommit() ) {
    if ( getErrors() == 0 ) {
     data.db.emptyAndCommit( data.prepStatementUpdate, meta.useBatchUpdate() );
    } else {
     data.db.rollback();
    }
   }
   data.db.closePreparedStatement( data.prepStatementUpdate );
   data.db.closePreparedStatement( data.prepStatementLookup );
  } catch ( KettleDatabaseException e ) {
   logError( BaseMessages.getString( PKG, "Update.Log.UnableToCommitUpdateConnection" )
    + data.db + "] :" + e.toString() );
   setErrors( 1 );
  } finally {
   data.db.disconnect();
  }
 }
 super.dispose( smi, sdi );
}

相关文章

微信公众号

最新文章

更多