Class SQLServer2016Dialect

    • Constructor Detail

      • SQLServer2016Dialect

        public SQLServer2016Dialect()
    • Method Detail

      • supportsIfExistsBeforeTableName

        public boolean supportsIfExistsBeforeTableName()
        Description copied from class: Dialect
        For dropping a table, can the phrase "if exists" be applied before the table name?

        NOTE : Only one or the other (or neither) of this and Dialect.supportsIfExistsAfterTableName() should return true

        Overrides:
        supportsIfExistsBeforeTableName in class Dialect
        Returns:
        true if the "if exists" can be applied before the table name
      • supportsIfExistsBeforeConstraintName

        public boolean supportsIfExistsBeforeConstraintName()
        Description copied from class: Dialect
        For dropping a constraint with an "alter table", can the phrase "if exists" be applied before the constraint name?

        NOTE : Only one or the other (or neither) of this and Dialect.supportsIfExistsAfterConstraintName() should return true

        Overrides:
        supportsIfExistsBeforeConstraintName in class Dialect
        Returns:
        true if the "if exists" can be applied before the constraint name
      • getDropSequenceString

        public java.lang.String getDropSequenceString​(java.lang.String sequenceName)
        Description copied from class: Dialect
        Typically dialects which support sequences can drop a sequence with a single command. This is convenience form of Dialect.getDropSequenceStrings(java.lang.String) to help facilitate that.

        Dialects which support sequences and can drop a sequence in a single command need *only* override this method. Dialects which support sequences but require multiple commands to drop a sequence should instead override Dialect.getDropSequenceStrings(java.lang.String).

        Overrides:
        getDropSequenceString in class SQLServer2012Dialect
        Parameters:
        sequenceName - The name of the sequence
        Returns:
        The sequence drop commands
      • getDropSchemaCommand

        public java.lang.String[] getDropSchemaCommand​(java.lang.String schemaName)
        Description copied from class: Dialect
        Get the SQL command used to drop the named schema
        Overrides:
        getDropSchemaCommand in class Dialect
        Parameters:
        schemaName - The name of the schema to be dropped.
        Returns:
        The drop commands
      • getAddColumnString

        public java.lang.String getAddColumnString()
        Description copied from class: Dialect
        The syntax used to add a column to a table (optional).
        Overrides:
        getAddColumnString in class Dialect
        Returns:
        The "add column" fragment.
      • getNullColumnString

        public java.lang.String getNullColumnString()
        Description copied from class: Dialect
        The keyword used to specify a nullable column.
        Overrides:
        getNullColumnString in class Dialect
        Returns:
        String
      • qualifyIndexName

        public boolean qualifyIndexName()
        Description copied from class: Dialect
        Do we need to qualify index names with the schema name?
        Overrides:
        qualifyIndexName in class Dialect
        Returns:
        boolean
      • getForUpdateString

        public java.lang.String getForUpdateString()
        Description copied from class: Dialect
        Get the string to append to SELECT statements to acquire locks for this dialect.
        Overrides:
        getForUpdateString in class Dialect
        Returns:
        The appropriate FOR UPDATE clause string.
      • applyLocksToSql

        public java.lang.String applyLocksToSql​(java.lang.String sql,
                                                LockOptions aliasedLockOptions,
                                                java.util.Map<java.lang.String,​java.lang.String[]> keyColumnNames)
        Description copied from class: Dialect
        Modifies the given SQL by applying the appropriate updates for the specified lock modes and key columns.

        The behavior here is that of an ANSI SQL SELECT FOR UPDATE. This method is really intended to allow dialects which do not support SELECT FOR UPDATE to achieve this in their own fashion.

        Overrides:
        applyLocksToSql in class Dialect
        Parameters:
        sql - the SQL string to modify
        aliasedLockOptions - lock options indexed by aliased table names.
        keyColumnNames - a map of key columns indexed by aliased table names.
        Returns:
        the modified SQL string.
      • registerResultSetOutParameter

        public int registerResultSetOutParameter​(java.sql.CallableStatement statement,
                                                 int col)
                                          throws java.sql.SQLException
        Description copied from class: Dialect
        Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returning ResultSet *by position*. Pre-Java 8, registering such ResultSet-returning parameters varied greatly across database and drivers; hence its inclusion as part of the Dialect contract.
        Overrides:
        registerResultSetOutParameter in class Dialect
        Parameters:
        statement - The callable statement.
        col - The bind position at which to register the output param.
        Returns:
        The number of (contiguous) bind positions used.
        Throws:
        java.sql.SQLException - Indicates problems registering the param.
      • getResultSet

        public java.sql.ResultSet getResultSet​(java.sql.CallableStatement ps)
                                        throws java.sql.SQLException
        Description copied from class: Dialect
        Given a callable statement previously processed by Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int), extract the ResultSet from the OUT parameter.
        Overrides:
        getResultSet in class Dialect
        Parameters:
        ps - The callable statement.
        Returns:
        The extracted result set.
        Throws:
        java.sql.SQLException - Indicates problems extracting the result set.
      • supportsCurrentTimestampSelection

        public boolean supportsCurrentTimestampSelection()
        Description copied from class: Dialect
        Does this dialect support a way to retrieve the database's current timestamp value?
        Overrides:
        supportsCurrentTimestampSelection in class Dialect
        Returns:
        True if the current timestamp can be retrieved; false otherwise.
      • getSelectGUIDString

        public java.lang.String getSelectGUIDString()
        Description copied from class: Dialect
        Get the command used to select a GUID from the underlying database.

        Optional operation.

        Overrides:
        getSelectGUIDString in class Dialect
        Returns:
        The appropriate command.
      • supportsEmptyInList

        public boolean supportsEmptyInList()
        Description copied from class: Dialect
        Does this dialect support empty IN lists?

        For example, is [where XYZ in ()] a supported construct?

        Overrides:
        supportsEmptyInList in class Dialect
        Returns:
        True if empty in lists are supported; false otherwise.
      • supportsUnionAll

        public boolean supportsUnionAll()
        Description copied from class: Dialect
        Does this dialect support UNION ALL, which is generally a faster variant of UNION?
        Overrides:
        supportsUnionAll in class Dialect
        Returns:
        True if UNION ALL is supported; false otherwise.
      • supportsExistsInSelect

        public boolean supportsExistsInSelect()
        Description copied from class: Dialect
        Does the dialect support an exists statement in the select clause?
        Overrides:
        supportsExistsInSelect in class Dialect
        Returns:
        True if exists checks are allowed in the select clause; false otherwise.
      • supportsTupleDistinctCounts

        public boolean supportsTupleDistinctCounts()
        Description copied from class: Dialect
        Does this dialect support `count(distinct a,b)`?
        Overrides:
        supportsTupleDistinctCounts in class Dialect
        Returns:
        True if the database supports counting distinct tuples; false otherwise.
      • supportsTuplesInSubqueries

        public boolean supportsTuplesInSubqueries()
        Description copied from class: Dialect
        Does this dialect support tuples in subqueries? Ex: delete from Table1 where (col1, col2) in (select col1, col2 from Table2)
        Overrides:
        supportsTuplesInSubqueries in class Dialect
        Returns:
        boolean
      • supportsPartitionBy

        public boolean supportsPartitionBy()
        Description copied from class: Dialect
        Does the underlying database support partition by
        Overrides:
        supportsPartitionBy in class Dialect
        Returns:
        boolean