Interface Dialect


public interface Dialect
Description of the capabilities of a database, its SQL dialect, and driver.
  • Field Details

  • Method Details

    • quoteIdentifier

      void quoteIdentifier(StringBuilder buf, String... names)
      Appends to a buffer one or more identifiers, quoted appropriately for this Dialect.

      For example, in the SQL Server dialect, quoteIdentifier(buf, "foo", "bar baz") generates "[foo].[bar baz]".

      Parameters:
      buf - Buffer
      names - One of more identifiers
    • getIntegerTypeString

      String getIntegerTypeString()
      Returns the SQL type string for integer values.

      This value is assumed to the be type returned by the COUNT() aggregate function. Typically "INTEGER".

      Returns:
      integer type string
    • getDoubleTypeString

      String getDoubleTypeString()
      Returns the SQL type string for integer values.

      This value is assumed to the be type returned by the SUM() and AVG() aggregate functions. Typically "DOUBLE".

      Returns:
      double type string
    • removeInvalidIdentifierCharacters

      String removeInvalidIdentifierCharacters(String str)
    • getMaximumTableNameLength

      int getMaximumTableNameLength()
      Returns the maximum length of a table name.
      Returns:
      maximum length of a table name
    • getMaximumColumnNameLength

      int getMaximumColumnNameLength()
      Returns the maximum length of a column name.
      Returns:
      maximum length of a column name
    • comment

      void comment(StringBuilder buf, String s)
      Appends a single-line comment to a string builder.
      Parameters:
      buf - String builder
      s - String
    • terminateCommand

      void terminateCommand(StringBuilder buf)
      Terminates a SQL command.

      For most dialects, this appends ";{newline}" to buf.

      Parameters:
      buf - String builder
    • supportsPrecision

      boolean supportsPrecision(DatabaseMetaData meta, String type) throws SQLException
      Returns true if database column DDL supports precision, ie INT(10) vs. INT.
      Parameters:
      meta - database metadata object
      type - the type of the column
      Returns:
      true if supports precision
      Throws:
      SQLException - on error