public void sqlConnection( DatabaseMeta databaseMeta ) { SQLEditor sql = new SQLEditor( databaseMeta, spoon.getShell(), SWT.NONE, databaseMeta, DBCache.getInstance(), "" ); sql.open(); }
public void viewSql() { if ( this.model.getTable() == null ) { return; } SQLEditor theSqlEditor = new SQLEditor( this.getDatabaseMeta(), this.dbExplorerDialog.getShell(), SWT.NONE, this.model .getDatabaseMeta(), this.dbcache, "SELECT * FROM " + getSchemaAndTable( this.model ) ); theSqlEditor.open(); }
public void truncate() { if ( this.model.getTable() == null ) { return; } DatabaseMeta dm = this.model.getDatabaseMeta(); String message = dm.getTruncateTableStatement( this.model.getSchema(), this.model.getTable() ); if ( message == null ) { message = "Truncating tables is not supported by " + dm.getDatabaseInterface().getPluginName(); } SQLEditor theSqlEditor = new SQLEditor( this.getDatabaseMeta(), this.dbExplorerDialog.getShell(), SWT.NONE, dm, this.dbcache, "-- " + message ); theSqlEditor.open(); }
new SQLEditor( jobMeta, shell, SWT.NONE, logTable.getDatabaseMeta(), DBCache.getInstance(), ddl .toString() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
new SQLEditor( this.getDatabaseMeta(), this.dbExplorerDialog.getShell(), SWT.NONE, this.model .getDatabaseMeta(), this.dbcache, sql ); se.open(); } finally { targetdb.disconnect();
public void getDDL() { if ( model.getTable() == null ) { return; } Database db = new Database( null, this.model.getDatabaseMeta() ); try { db.connect(); String tableName = getSchemaAndTable( this.model ); RowMetaInterface r = db.getTableFields( tableName ); String sql = db.getCreateTableStatement( tableName, r, null, false, null, true ); SQLEditor se = new SQLEditor( this.getDatabaseMeta(), this.dbExplorerDialog.getShell(), SWT.NONE, this.model .getDatabaseMeta(), this.dbcache, sql ); se.open(); } catch ( KettleDatabaseException dbe ) { new ErrorDialog( this.dbExplorerDialog.getShell(), BaseMessages.getString( PKG, "Dialog.Error.Header" ), BaseMessages .getString( PKG, "DatabaseExplorerDialog.Error.RetrieveLayout" ), dbe ); } finally { db.disconnect(); } }
private void create() { try { MonetDBBulkLoaderMeta info = new MonetDBBulkLoaderMeta(); getInfo( info ); String name = stepname; // new name might not yet be linked to other steps! SQLStatement sql = info.getTableDdl( transMeta, name, false, null, false ); if ( !sql.hasError() ) { if ( sql.hasSQL() ) { SQLEditor sqledit = new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql .getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION ); mb.setMessage( BaseMessages.getString( PKG, "MonetDBBulkLoaderDialog.NoSQLNeeds.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "MonetDBBulkLoaderDialog.NoSQLNeeds.DialogTitle" ) ); mb.open(); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( sql.getError() ); mb.setText( BaseMessages.getString( PKG, "MonetDBBulkLoaderDialog.SQLError.DialogTitle" ) ); mb.open(); } } catch ( KettleException ke ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "MonetDBBulkLoaderDialog.CouldNotBuildSQL.DialogTitle" ), BaseMessages.getString( PKG, "MonetDBBulkLoaderDialog.CouldNotBuildSQL.DialogMessage" ), ke ); } }
SQLEditor sqledit = new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql.getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql .getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql .getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql .getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql .getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql .getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql .getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql .getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql .getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql .getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql .getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql .getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
new SQLEditor( transMeta, shell, SWT.NONE, info.getDatabaseMeta(), transMeta.getDbCache(), sql .getSQL() ); sqledit.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );