public Object[] getLookup( PreparedStatement ps ) throws KettleDatabaseException { // we assume this is external PreparedStatement and we may need to re-create rowMeta // so we just reset it to null and it will be re-created on processRow call rowMeta = null; return getLookup( ps, false ); }
public Object[] getLookup() throws KettleDatabaseException { return getLookup( prepStatementLookup, false ); }
public Object[] getLookup( boolean failOnMultipleResults, boolean lazyConversion ) throws KettleDatabaseException { return getLookup( prepStatementLookup, failOnMultipleResults, lazyConversion ); }
public Object[] getLookup( boolean failOnMultipleResults ) throws KettleDatabaseException { return getLookup( failOnMultipleResults, false ); }
public Object[] getLookup( PreparedStatement ps, boolean failOnMultipleResults ) throws KettleDatabaseException { return getLookup( ps, failOnMultipleResults, false ); }
@Override public RowMetaAndData call() throws Exception { Object[] lookup = database.getLookup( pstmt_entry_attributes ); return new RowMetaAndData( database.getReturnRowMeta(), lookup ); } } );
@Override public RowMetaAndData call() throws Exception { Object[] r = database.getLookup( psJobAttributesLookup ); if ( r == null ) { return null; } return new RowMetaAndData( database.getReturnRowMeta(), r ); } } );
@Override public RowMetaAndData call() throws Exception { Object[] lookup = database.getLookup( psStepAttributesLookup ); return new RowMetaAndData( database.getReturnRowMeta(), lookup ); } } );
@Override public RowMetaAndData call() throws Exception { Object[] r = database.getLookup( psTransAttributesLookup ); if ( r == null ) { return null; } return new RowMetaAndData( database.getReturnRowMeta(), r ); } } );
@Test public void mySqlVariantDbIsLazyConverted() throws Exception { DatabaseLookupMeta meta = createDatabaseMeta(); DatabaseLookupData data = createDatabaseData(); Database db = createVirtualDb( meta.getDatabaseMeta() ); DatabaseLookup lookup = spyLookup( mockHelper, db, meta.getDatabaseMeta() ); lookup.init( meta, data ); lookup.processRow( meta, data ); verify( db ).getLookup( any( PreparedStatement.class ), anyBoolean(), eq( false ) ); }
Database db = mock( Database.class ); RowMeta returnRowMeta = new RowMeta(); doReturn( new Object[] { new Timestamp( System.currentTimeMillis() ) } ).when( db ).getLookup( any( PreparedStatement.class ) ); returnRowMeta.addValueMeta( new ValueMetaDate( "TimeStamp" ) );
Database db = mock( Database.class ); RowMeta returnRowMeta = new RowMeta(); doReturn( new Object[] { new Timestamp( System.currentTimeMillis() ) } ).when( db ).getLookup( any( PreparedStatement.class ) ); returnRowMeta.addValueMeta( new ValueMetaDate( "TimeStamp" ) );
data.lookupParameterRowMeta.getString( lookupRow ) ) ); Object[] add = data.db.getLookup( data.lookupStatement ); incrementLinesInput();
if ( val_key == null ) { data.db.setValues( data.lookupRowMeta, lookupRow, data.prepStatementLookup ); Object[] add = data.db.getLookup( data.prepStatementLookup ); incrementLinesInput();
+ data.lookupParameterRowMeta.getString( lookupRow ) ); Object[] add = data.db.getLookup( data.prepStatementLookup ); incrementLinesInput();
returnRow = data.db.getLookup( data.prepStatementLookup ); data.returnRowMeta = data.db.getReturnRowMeta();
add = data.db.getLookup( meta.isFailingOnMultipleResults() ); cache_now = true;
.getString( lookupRow ), rowMeta.getString( row ) ) ); add = data.db.getLookup( data.prepStatementLookup ); returnRowMeta = data.db.getReturnRowMeta(); } else {