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

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

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

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

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

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

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

  1. public void closeLookup() throws KettleDatabaseException {
  2. closePreparedStatement( pstmt );
  3. pstmt = null;
  4. }

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

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

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

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

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

  1. public void run() {
  2. try {
  3. // TODO cross-check result against actual
  4. // number
  5. // of rows sent.
  6. ps.executeUpdate();
  7. // Pump out any warnings and save them.
  8. SQLWarning warning = ps.getWarnings();
  9. while ( warning != null ) {
  10. warnings.add( warning.getMessage() );
  11. warning = warning.getNextWarning();
  12. }
  13. } catch ( SQLException ex ) {
  14. this.ex = ex;
  15. } finally {
  16. try {
  17. data.db.closePreparedStatement( ps );
  18. } catch ( KettleException ke ) {
  19. // not much we can do with this
  20. } finally {
  21. ps = null;
  22. }
  23. }
  24. }

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

相关文章