use of org.jkiss.dbeaver.ext.exasol.model.ExasolConnection in project dbeaver by dbeaver.
the class ExasolConnectionManager method addObjectDeleteActions.
@Override
protected void addObjectDeleteActions(List<DBEPersistAction> actions, ObjectDeleteCommand command, Map<String, Object> options) {
final ExasolConnection con = command.getObject();
actions.add(new SQLDatabasePersistAction("Drop Connection", "DROP CONNECTION " + DBUtils.getQuotedIdentifier(con)));
}
use of org.jkiss.dbeaver.ext.exasol.model.ExasolConnection in project dbeaver by dbeaver.
the class ExasolConnectionManager method addObjectRenameActions.
@Override
protected void addObjectRenameActions(List<DBEPersistAction> actions, ObjectRenameCommand command, Map<String, Object> options) {
ExasolConnection obj = command.getObject();
actions.add(new SQLDatabasePersistAction("Rename Connection", "RENAME CONNECTION " + DBUtils.getQuotedIdentifier(obj.getDataSource(), command.getOldName()) + " to " + DBUtils.getQuotedIdentifier(obj.getDataSource(), command.getNewName())));
}
use of org.jkiss.dbeaver.ext.exasol.model.ExasolConnection in project dbeaver by dbeaver.
the class ExasolConnectionManager method addObjectCreateActions.
@Override
protected void addObjectCreateActions(List<DBEPersistAction> actions, ObjectCreateCommand command, Map<String, Object> options) {
final ExasolConnection con = command.getObject();
StringBuilder script = new StringBuilder(String.format("CREATE CONNECTION %s TO ", DBUtils.getQuotedIdentifier(con)));
script.append(" '" + ExasolUtils.quoteString(con.getConnectionString()) + "' ");
if (!(con.getUserName().isEmpty() | con.getPassword().isEmpty())) {
script.append(String.format("USER '%s' IDENTIFIED BY '%s'", ExasolUtils.quoteString(con.getUserName()), ExasolUtils.quoteString(con.getPassword())));
}
actions.add(new SQLDatabasePersistAction("Create Connection", script.toString()));
if (!con.getDescription().isEmpty()) {
actions.add(Comment(con));
}
}
use of org.jkiss.dbeaver.ext.exasol.model.ExasolConnection in project dbeaver by serge-rider.
the class ExasolConnectionManager method addObjectCreateActions.
@Override
protected void addObjectCreateActions(DBRProgressMonitor monitor, DBCExecutionContext executionContext, List<DBEPersistAction> actions, ObjectCreateCommand command, Map<String, Object> options) {
final ExasolConnection con = command.getObject();
StringBuilder script = new StringBuilder(String.format("CREATE CONNECTION %s TO ", DBUtils.getQuotedIdentifier(con)));
script.append(" '" + ExasolUtils.quoteString(con.getConnectionString()) + "' ");
if (!(con.getUserName().isEmpty() | con.getPassword().isEmpty())) {
script.append(String.format("USER '%s' IDENTIFIED BY '%s'", ExasolUtils.quoteString(con.getUserName()), ExasolUtils.quoteString(con.getPassword())));
}
actions.add(new SQLDatabasePersistAction("Create Connection", script.toString()));
if (!con.getDescription().isEmpty()) {
actions.add(getCommentCommand(con));
}
}
use of org.jkiss.dbeaver.ext.exasol.model.ExasolConnection in project dbeaver by serge-rider.
the class ExasolConnectionManager method addObjectDeleteActions.
@Override
protected void addObjectDeleteActions(DBRProgressMonitor monitor, DBCExecutionContext executionContext, List<DBEPersistAction> actions, ObjectDeleteCommand command, Map<String, Object> options) {
final ExasolConnection con = command.getObject();
actions.add(new SQLDatabasePersistAction("Drop Connection", "DROP CONNECTION " + DBUtils.getQuotedIdentifier(con)));
}
Aggregations