Class MariaDB103Dialect

    • Constructor Detail

      • MariaDB103Dialect

        public MariaDB103Dialect()
    • Method Detail

      • supportsSequences

        public boolean supportsSequences()
        Description copied from class: Dialect
        Does this dialect support sequences?
        Overrides:
        supportsSequences in class Dialect
        Returns:
        True if sequences supported; false otherwise.
      • getCreateSequenceString

        protected String getCreateSequenceString​(String sequenceName,
                                                 int initialValue,
                                                 int incrementSize)
                                          throws MappingException
        Description copied from class: Dialect
        Overloaded form of Dialect.getCreateSequenceString(String), additionally taking the initial value and increment size to be applied to the sequence definition.

        The default definition is to suffix Dialect.getCreateSequenceString(String) with the string: " start with {initialValue} increment by {incrementSize}" where {initialValue} and {incrementSize} are replacement placeholders. Generally dialects should only need to override this method if different key phrases are used to apply the allocation information.
        Overrides:
        getCreateSequenceString in class Dialect
        Parameters:
        sequenceName - The name of the sequence
        initialValue - The initial value to apply to 'create sequence' statement
        incrementSize - The increment value to apply to 'create sequence' statement
        Returns:
        The sequence creation command
        Throws:
        MappingException - If sequences are not supported.
      • getDropSequenceString

        public String getDropSequenceString​(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 Dialect
        Parameters:
        sequenceName - The name of the sequence
        Returns:
        The sequence drop commands
      • getSequenceNextValString

        public String getSequenceNextValString​(String sequenceName)
        Description copied from class: Dialect
        Generate the appropriate select statement to to retrieve the next value of a sequence.

        This should be a "stand alone" select statement.

        Overrides:
        getSequenceNextValString in class Dialect
        Parameters:
        sequenceName - the name of the sequence
        Returns:
        String The "nextval" select string.
      • getSelectSequenceNextValString

        public String getSelectSequenceNextValString​(String sequenceName)
        Description copied from class: Dialect
        Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.

        This differs from Dialect.getSequenceNextValString(String) in that this should return an expression usable within another statement.

        Overrides:
        getSelectSequenceNextValString in class Dialect
        Parameters:
        sequenceName - the name of the sequence
        Returns:
        The "nextval" fragment.
      • getQuerySequencesString

        public String getQuerySequencesString()
        Description copied from class: Dialect
        Get the select command used retrieve the names of all sequences.
        Overrides:
        getQuerySequencesString in class Dialect
        Returns:
        The select command; or null if sequences are not supported.
        See Also:
        SchemaUpdate
      • getWriteLockString

        public String getWriteLockString​(int timeout)
        Description copied from class: Dialect
        Get the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the returned string is treated the same as getForUpdateString.
        Overrides:
        getWriteLockString in class MySQLDialect
        Parameters:
        timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.
        Returns:
        The appropriate LOCK clause string.
      • getForUpdateNowaitString

        public String getForUpdateNowaitString()
        Description copied from class: Dialect
        Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.
        Overrides:
        getForUpdateNowaitString in class Dialect
        Returns:
        The appropriate FOR UPDATE NOWAIT clause string.
      • getForUpdateNowaitString

        public String getForUpdateNowaitString​(String aliases)
        Description copied from class: Dialect
        Get the FOR UPDATE OF column_list NOWAIT fragment appropriate for this dialect given the aliases of the columns to be write locked.
        Overrides:
        getForUpdateNowaitString in class Dialect
        Parameters:
        aliases - The columns to be write locked.
        Returns:
        The appropriate FOR UPDATE OF colunm_list NOWAIT clause string.