/** * Execute a series of SQL statements, separated by ; * <p/> * We are already connected... * <p/> * Multiple statements have to be split into parts We use the ";" to separate statements... * <p/> * We keep the results in Result object from Jobs * * @param script The SQL script to be execute * @return A result with counts of the number or records updates, inserted, deleted or read. * @throws KettleDatabaseException In case an error occurs */ public Result execStatements( String script ) throws KettleDatabaseException { return execStatements( script, null, null ); }
data.result = data.db.execStatement( sql ); } else { data.result = data.db.execStatements( sql );
/** * Lock a tables in the database for write operations * * @param tableNames The tables to lock. These need to be the appropriately quoted fully qualified (schema+table) * names. * @throws KettleDatabaseException */ public void lockTables( String[] tableNames ) throws KettleDatabaseException { if ( Utils.isEmpty( tableNames ) ) { return; } // Get the SQL to lock the (quoted) tables // String sql = databaseMeta.getSQLLockTables( tableNames ); if ( sql != null ) { execStatements( sql ); } }
return execStatement( sql ); } else { return execStatements( sql );
db.connect(); try { db.execStatements( stat.getSQL() ); } catch ( KettleDatabaseException dbe ) { errors++;
db.execStatement( theSQL ); } else { db.execStatements( theSQL );
execStatements( sql ); if ( log.isDetailed() ) { log.logDetailed( "Executed connect time SQL statements:" + Const.CR + sql );
data.result = data.db.execStatement( sql, data.paramsMeta, paramsData ); } else { data.result = data.db.execStatements( sql, data.paramsMeta, paramsData );
database.execStatements( sql ); if ( log.isDetailed() ) { log.logDetailed( "Created/altered table " + schemaTable ); database.execStatements( sql ); if ( log.isDetailed() ) { log.logDetailed( "Created/altered table " + schemaTable ); database.execStatements( sql ); if ( log.isDetailed() ) { log.logDetailed( "Created/altered table " + schemaTable ); database.execStatements( sql ); if ( log.isDetailed() ) { log.logDetailed( "Created or altered table " + schemaTable ); database.execStatements( sql ); if ( log.isDetailed() ) { log.logDetailed( "Created or altered table " + schemaTable ); database.execStatements( sql ); if ( log.isDetailed() ) { log.logDetailed( "Created or altered table " + schemaTable ); database.execStatements( sql ); if ( log.isDetailed() ) { log.logDetailed( "Created or altered table " + schemaTable ); database.execStatements( sql );
data.result = data.db.execStatement( data.sql ); } else { data.result = data.db.execStatements( data.sql );