本文整理了Java中org.pentaho.di.core.database.Database.emptyAndCommit()
方法的一些代码示例,展示了Database.emptyAndCommit()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Database.emptyAndCommit()
方法的具体详情如下:
包路径:org.pentaho.di.core.database.Database
类名称: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 );
}
内容来源于网络,如有侵权,请联系作者删除!