Class Dialect


  • public abstract class Dialect
    extends Object
    • Constructor Detail

      • Dialect

        protected Dialect​(String schema)
    • Method Detail

      • getSchema

        protected final String getSchema()
      • quoteName

        public String quoteName​(String name)
        Quotes a database name. This prevents the name from being interpreted as a SQL keyword. This is usually done by enclosing the name with some (database specific) quotation characters. The default implementation uses double quotes as specified by ANSI SQL.
      • supportsCheckConstraints

        public boolean supportsCheckConstraints()
      • supportsSemicolon

        public boolean supportsSemicolon()
      • adjustExistingCheckConstraintCondition

        protected String adjustExistingCheckConstraintCondition​(String s)
      • verify

        protected abstract void verify​(Schema schema)
      • verifyTablesByMetaData

        protected static final void verifyTablesByMetaData​(Schema schema)
      • verifyColumnsByMetaData

        protected final void verifyColumnsByMetaData​(Schema schema,
                                                     String tableSchema)
        Parameters:
        tableSchema - null means any schema is allowed
      • verifyForeignKeyConstraints

        protected static final void verifyForeignKeyConstraints​(String sql,
                                                                Schema schema)
      • verifyUniqueConstraints

        protected static final void verifyUniqueConstraints​(String sql,
                                                            Schema schema)
      • verifySequences

        protected static final void verifySequences​(String sql,
                                                    Schema schema)
      • notifyExistentTable

        protected static final void notifyExistentTable​(Schema schema,
                                                        String tableName)
      • notifyExistentColumn

        protected static final Column notifyExistentColumn​(Table table,
                                                           String columnName,
                                                           String existingType)
      • notifyExistentCheck

        protected static final void notifyExistentCheck​(Table table,
                                                        String constraintName,
                                                        String condition)
      • notifyExistentPrimaryKey

        protected static final void notifyExistentPrimaryKey​(Table table,
                                                             String constraintName)
      • notifyExistentUnique

        protected static final void notifyExistentUnique​(Table table,
                                                         String constraintName,
                                                         String condition)
      • notifyExists

        protected static final void notifyExists​(Sequence sequence,
                                                 Sequence.Type existingType)
      • getCatalog

        protected static final String getCatalog​(Schema schema)
      • appendTableCreateStatement

        protected void appendTableCreateStatement​(StringBuilder bf)
        Parameters:
        bf - used in subclasses
      • needsTargetColumnName

        protected boolean needsTargetColumnName()
      • appendForeignKeyCreateStatement

        protected void appendForeignKeyCreateStatement​(StringBuilder bf)
        Parameters:
        bf - used in subclasses
      • dropPrimaryKeyConstraint

        protected void dropPrimaryKeyConstraint​(StringBuilder bf,
                                                String tableName,
                                                String constraintName)
      • dropForeignKeyConstraint

        protected void dropForeignKeyConstraint​(StringBuilder bf,
                                                String tableName,
                                                String constraintName)
      • dropUniqueConstraint

        protected void dropUniqueConstraint​(StringBuilder bf,
                                            String tableName,
                                            String constraintName)
      • deleteSchema

        @Deprecated
        public final void deleteSchema​(Schema schema)
        Deprecated.
        The default implementation just drops and re-creates the schema. Subclasses are encouraged to provide a more efficient implementation.