类 DefaultUniqueDelegate

    • 字段详细资料

      • dialect

        protected final Dialect dialect
    • 构造器详细资料

      • DefaultUniqueDelegate

        public DefaultUniqueDelegate​(Dialect dialect)
        Constructs DefaultUniqueDelegate
        参数:
        dialect - The dialect for which we are handling unique constraints
    • 方法详细资料

      • getColumnDefinitionUniquenessFragment

        public String getColumnDefinitionUniquenessFragment​(Column column)
        从接口复制的说明: UniqueDelegate
        Get the fragment that can be used to make a column unique as part of its column definition.

        This is intended for dialects which do not support unique constraints

        指定者:
        getColumnDefinitionUniquenessFragment 在接口中 UniqueDelegate
        参数:
        column - The column to which to apply the unique
        返回:
        The fragment (usually "unique"), empty string indicates the uniqueness will be indicated using a different approach
      • getTableCreationUniqueConstraintsFragment

        public String getTableCreationUniqueConstraintsFragment​(Table table)
        从接口复制的说明: UniqueDelegate
        Get the fragment that can be used to apply unique constraints as part of table creation. The implementation should iterate over the UniqueKey instances for the given table (see Table.getUniqueKeyIterator() and generate the whole fragment for all unique keys

        Intended for Dialects which support unique constraint definitions, but just not in separate ALTER statements.

        指定者:
        getTableCreationUniqueConstraintsFragment 在接口中 UniqueDelegate
        参数:
        table - The table for which to generate the unique constraints fragment
        返回:
        The fragment, typically in the form ", unique(col1, col2), unique( col20)". NOTE: The leading comma is important!
      • getAlterTableToAddUniqueKeyCommand

        public String getAlterTableToAddUniqueKeyCommand​(UniqueKey uniqueKey,
                                                         Metadata metadata)
        从接口复制的说明: UniqueDelegate
        Get the SQL ALTER TABLE command to be used to create the given UniqueKey.
        指定者:
        getAlterTableToAddUniqueKeyCommand 在接口中 UniqueDelegate
        参数:
        uniqueKey - The UniqueKey instance. Contains all information about the columns
        metadata - Access to the bootstrap mapping information
        返回:
        The ALTER TABLE command
      • uniqueConstraintSql

        protected String uniqueConstraintSql​(UniqueKey uniqueKey)
      • getAlterTableToDropUniqueKeyCommand

        public String getAlterTableToDropUniqueKeyCommand​(UniqueKey uniqueKey,
                                                          Metadata metadata)
        从接口复制的说明: UniqueDelegate
        Get the SQL ALTER TABLE command to be used to drop the given UniqueKey.
        指定者:
        getAlterTableToDropUniqueKeyCommand 在接口中 UniqueDelegate
        参数:
        uniqueKey - The UniqueKey instance. Contains all information about the columns
        metadata - Access to the bootstrap mapping information
        返回:
        The ALTER TABLE command
      • getDropUnique

        protected String getDropUnique()