private AlterIndexRename parseAlterIndex() { boolean ifExists = readIfExists(false); String indexName = readIdentifierWithSchema(); Schema old = getSchema(); AlterIndexRename command = new AlterIndexRename(session); command.setOldSchema(old); command.setOldName(indexName); command.setIfExists(ifExists); read("RENAME"); read("TO"); String newName = readIdentifierWithSchema(old.getName()); checkSchema(old); command.setNewName(newName); return command; }
private Prepared parseAlterSchema() { boolean ifExists = readIfExists(false); String schemaName = readIdentifierWithSchema(); Schema old = getSchema(); read("RENAME"); read("TO"); String newName = readIdentifierWithSchema(old.getName()); Schema schema = findSchema(schemaName); if (schema == null) { if (ifExists) { return new NoOperation(session); } throw DbException.get(ErrorCode.SCHEMA_NOT_FOUND_1, schemaName); } AlterSchemaRename command = new AlterSchemaRename(session); command.setOldSchema(schema); checkSchema(old); command.setNewName(newName); return command; }
read("ON"); String tableName = readIdentifierWithSchema(); checkSchema(schema); CreateTrigger command = new CreateTrigger(session, getSchema()); command.setForce(force);
} else if (readIf("CONSTRAINT")) { String constraintName = readIdentifierWithSchema(schema.getName()); checkSchema(schema); read("TO"); AlterTableRenameConstraint command = new AlterTableRenameConstraint( read("TO"); String newName = readIdentifierWithSchema(schema.getName()); checkSchema(schema); AlterTableRename command = new AlterTableRename(session, getSchema()); String constraintName = readIdentifierWithSchema(schema.getName()); ifExists = readIfExists(ifExists); checkSchema(schema); AlterTableDropConstraint command = new AlterTableDropConstraint( session, getSchema(), ifExists); checkSchema(schema); AlterTableDropConstraint command = new AlterTableDropConstraint( session, getSchema(), false);
ifNotExists = readIfNotExists(); constraintName = readIdentifierWithSchema(schema.getName()); checkSchema(schema); comment = readCommentIf(); allowIndexDefinition = true;
checkSchema(oldSchema); CreateIndex command = new CreateIndex(session, getSchema()); command.setIfNotExists(ifNotExists);
private AlterIndexRename parseAlterIndex() throws SQLException { String indexName = readIdentifierWithSchema(); Schema old = getSchema(); AlterIndexRename command = new AlterIndexRename(session); command.setOldIndex(getSchema().getIndex(indexName)); read("RENAME"); read("TO"); String newName = readIdentifierWithSchema(old.getName()); checkSchema(old); command.setNewName(newName); return command; }
private AlterIndexRename parseAlterIndex() { boolean ifExists = readIfExists(false); String indexName = readIdentifierWithSchema(); Schema old = getSchema(); AlterIndexRename command = new AlterIndexRename(session); command.setOldSchema(old); command.setOldName(indexName); command.setIfExists(ifExists); read("RENAME"); read("TO"); String newName = readIdentifierWithSchema(old.getName()); checkSchema(old); command.setNewName(newName); return command; }
private AlterIndexRename parseAlterIndex() { boolean ifExists = readIfExists(false); String indexName = readIdentifierWithSchema(); Schema old = getSchema(); AlterIndexRename command = new AlterIndexRename(session); command.setOldSchema(old); command.setOldName(indexName); command.setIfExists(ifExists); read("RENAME"); read("TO"); String newName = readIdentifierWithSchema(old.getName()); checkSchema(old); command.setNewName(newName); return command; }
private Prepared parseAlterSchema() { boolean ifExists = readIfExists(false); String schemaName = readIdentifierWithSchema(); Schema old = getSchema(); read("RENAME"); read("TO"); String newName = readIdentifierWithSchema(old.getName()); Schema schema = findSchema(schemaName); if (schema == null) { if (ifExists) { return new NoOperation(session); } throw DbException.get(ErrorCode.SCHEMA_NOT_FOUND_1, schemaName); } AlterSchemaRename command = new AlterSchemaRename(session); command.setOldSchema(schema); checkSchema(old); command.setNewName(newName); return command; }
private Prepared parseAlterSchema() { boolean ifExists = readIfExists(false); String schemaName = readIdentifierWithSchema(); Schema old = getSchema(); read("RENAME"); read("TO"); String newName = readIdentifierWithSchema(old.getName()); Schema schema = findSchema(schemaName); if (schema == null) { if (ifExists) { return new NoOperation(session); } throw DbException.get(ErrorCode.SCHEMA_NOT_FOUND_1, schemaName); } AlterSchemaRename command = new AlterSchemaRename(session); command.setOldSchema(schema); checkSchema(old); command.setNewName(newName); return command; }
read("ON"); String tableName = readIdentifierWithSchema(); checkSchema(schema); CreateTrigger command = new CreateTrigger(session, getSchema()); command.setForce(force);
read("ON"); String tableName = readIdentifierWithSchema(); checkSchema(schema); CreateTrigger command = new CreateTrigger(session, getSchema()); command.setForce(force);
read("ON"); String tableName = readIdentifierWithSchema(); checkSchema(schema); CreateTrigger command = new CreateTrigger(session, getSchema()); command.setForce(force);
read("TO"); String newName = readIdentifierWithSchema(table.getSchema().getName()); checkSchema(table.getSchema()); AlterTableRename command = new AlterTableRename(session, getSchema()); command.setOldTable(table); if (readIf("CONSTRAINT")) { String constraintName = readIdentifierWithSchema(table.getSchema().getName()); checkSchema(table.getSchema()); AlterTableDropConstraint command = new AlterTableDropConstraint(session, getSchema()); command.setConstraintName(constraintName);
checkSchema(oldSchema); CreateIndex command = new CreateIndex(session, getSchema()); command.setIfNotExists(ifNotExists);
if (readIf("CONSTRAINT")) { constraintName = readIdentifierWithSchema(schema.getName()); checkSchema(schema); comment = readCommentIf();
ifNotExists = readIfNotExists(); constraintName = readIdentifierWithSchema(schema.getName()); checkSchema(schema); comment = readCommentIf(); allowIndexDefinition = true;
ifNotExists = readIfNotExists(); constraintName = readIdentifierWithSchema(schema.getName()); checkSchema(schema); comment = readCommentIf(); allowIndexDefinition = true;
checkSchema(oldSchema); CreateIndex command = new CreateIndex(session, getSchema()); command.setIfNotExists(ifNotExists);