/** * INTERNAL: * Return the SQL to delete the row from the sequence table. If we're * dealing with create creation, then delegate to the table so that is * dropped outright since we will delete the schema. */ public Writer buildDeletionWriter(AbstractSession session, Writer writer) throws ValidationException { if (shouldDropTableDefinition()) { return tableDefinition.buildDeletionWriter(session, writer); } else { try { writer.write("DELETE FROM "); writer.write(getSequenceTableQualifiedName()); writer.write(" WHERE " + getSequenceNameFieldName()); writer.write(" = '" + getName() + "'"); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; } }
/** * INTERNAL: * Return the SQL to delete the row from the sequence table. If we're * dealing with create creation, then delegate to the table so that is * dropped outright since we will delete the schema. */ public Writer buildDeletionWriter(AbstractSession session, Writer writer) throws ValidationException { if (shouldDropTableDefinition()) { return tableDefinition.buildDeletionWriter(session, writer); } else { try { writer.write("DELETE FROM "); writer.write(getSequenceTableQualifiedName()); writer.write(" WHERE " + getSequenceNameFieldName()); writer.write(" = '" + getName() + "'"); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; } }
if (((TableSequenceDefinition) definition).shouldDropTableDefinition()) { String tableDefinitionTableName = ((TableSequenceDefinition) definition).getSequenceTableName();
if (((TableSequenceDefinition) definition).shouldDropTableDefinition()) { String tableDefinitionTableName = ((TableSequenceDefinition) definition).getSequenceTableName();