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

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

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

Database.closePreparedStatement介绍

暂无

代码示例

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

public synchronized void closeJobAttributeLookupPreparedStatement() throws KettleException {
 database.closePreparedStatement( psJobAttributesLookup );
 psJobAttributesLookup = null;
}

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

public synchronized void closeTransAttributeLookupPreparedStatement() throws KettleException {
 database.closePreparedStatement( psTransAttributesLookup );
 psTransAttributesLookup = null;
}

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

public void closeLookup() throws KettleDatabaseException {
 closePreparedStatement( pstmt );
 pstmt = null;
}

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

public synchronized void closeStepAttributeLookupPreparedStatement() throws KettleException {
 database.closePreparedStatement( psStepAttributesLookup );
 psStepAttributesLookup = null;
}

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

public synchronized void closeLookupJobEntryAttribute() throws KettleException {
 database.closePreparedStatement( pstmt_entry_attributes );
 pstmt_entry_attributes = null;
}

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

public void run() {
 try {
  // TODO cross-check result against actual
  // number
  // of rows sent.
  ps.executeUpdate();
  // Pump out any warnings and save them.
  SQLWarning warning = ps.getWarnings();
  while ( warning != null ) {
   warnings.add( warning.getMessage() );
   warning = warning.getNextWarning();
  }
 } catch ( SQLException ex ) {
  this.ex = ex;
 } finally {
  try {
   data.db.closePreparedStatement( ps );
  } catch ( KettleException ke ) {
   // not much we can do with this
  } finally {
   ps = null;
  }
 }
}

代码示例来源: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 );
}

相关文章

微信公众号

最新文章

更多