/** * INTERNAL: * Append the receiver's field 'identity' constraint clause to a writer. */ @Override public void printFieldIdentityClause(Writer writer) throws ValidationException { try { writer.write(" GENERATED BY DEFAULT AS IDENTITY"); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } }
/** Append the receiver's field 'identity' constraint clause to a writer.*/ @Override public void printFieldIdentityClause(Writer writer) throws ValidationException { try { writer.write(" IDENTITY"); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } }
/** * Append the receiver's field 'NOT NULL' constraint clause to a writer. */ public void printFieldNotNullClause(Writer writer) throws ValidationException { try { writer.write(" NOT NULL"); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } }
@Override public void printFieldIdentityClause(Writer writer) throws ValidationException { try { writer.write(" DEFAULT AUTOINCREMENT"); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } }
/** * INTERNAL: * Append the receiver's field 'NULL' constraint clause to a writer. */ public void printFieldNullClause(Writer writer) throws ValidationException { try { writer.write(" NULL"); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } }
/** * Append the receiver's field serial constraint clause to a writer. */ @Override public void printFieldIdentityClause(Writer writer) throws ValidationException { try { writer.write(" SERIAL"); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } }
@Override public void printFieldIdentityClause(Writer writer) throws ValidationException { try { writer.write(" GENERATED BY DEFAULT AS IDENTITY (START WITH 1 INCREMENT BY 1)"); } catch (IOException ex) { throw ValidationException.fileError(ex); } }
public void closeDDLWriter(Writer schemaWriter) { if (schemaWriter == null) { return; } try { schemaWriter.flush(); schemaWriter.close(); } catch (java.io.IOException ioException) { throw ValidationException.fileError(ioException); } }
public void appendToDDLWriter(Writer schemaWriter, String stringToWrite) { if (schemaWriter == null) { return; //do nothing. Ignore append request } try { schemaWriter.write(stringToWrite); schemaWriter.flush(); } catch (java.io.IOException ioException) { throw ValidationException.fileError(ioException); } }
/** * INTERNAL: * Return the DDL to drop the varray. */ public Writer buildDeletionWriter(AbstractSession session, Writer writer) throws ValidationException { try { writer.write("DROP TYPE " + getFullName()); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * INTERNAL: * Return the drop type statement. */ public Writer buildDeletionWriter(AbstractSession session, Writer writer) throws ValidationException { try { writer.write("DROP TYPE " + getFullName()); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * INTERNAL: * Return the DDL to drop the varray. */ public Writer buildDeletionWriter(AbstractSession session, Writer writer) throws ValidationException { try { writer.write("DROP TYPE " + getFullName()); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * INTERNAL: */ @Override public Writer buildVPDCreationFunctionWriter(AbstractSession session, Writer writer) { try { writer.write(session.getPlatform().getVPDCreationFunctionString(getName(), tenantFieldName)); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * INTERNAL: * Build the drop schema DDL. */ protected Writer buildDatabaseSchemaDeletionWriter(AbstractSession session, Writer writer) { try { writer.write(session.getPlatform().getDropDatabaseSchemaString(getDatabaseSchema())); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * INTERNAL: */ @Override public Writer buildVPDDeletionWriter(AbstractSession session, Writer writer) { try { writer.write(session.getPlatform().getVPDDeletionString(getName(), session)); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * INTERNAL: */ @Override public Writer buildVPDDeletionWriter(AbstractSession session, Writer writer) { try { writer.write(session.getPlatform().getVPDDeletionString(getName(), session)); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * INTERNAL: * Return the SQL required to drop the Oracle sequence object. */ public Writer buildDeletionWriter(AbstractSession session, Writer writer) { try { session.getPlatform().buildSequenceObjectDeletionWriter(writer, getFullName()); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * INTERNAL: * Return the create type statement. */ public Writer buildCreationWriter(AbstractSession session, Writer writer) throws ValidationException { try { writer.write(session.getPlatform().buildCreateIndex(getTargetTable(), getName(), getQualifier(), isUnique(), this.fields.toArray(new String[0]))); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * INTERNAL: * Return the SQL required to alter INCREMENT BY */ public Writer buildAlterIncrementWriter(AbstractSession session, Writer writer) { try { session.getPlatform().buildSequenceObjectAlterIncrementWriter(writer, getFullName(), sequence.getPreallocationSize()); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * INTERNAL: * Return the SQL required to alter INCREMENT BY */ public Writer buildAlterIncrementWriter(AbstractSession session, Writer writer) { try { session.getPlatform().buildSequenceObjectAlterIncrementWriter(writer, getFullName(), sequence.getPreallocationSize()); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }