Class SQLDialect

java.lang.Object
net.sf.jailer.database.SQLDialect

public class SQLDialect extends Object
Description of the DBMS's SQL dialect.
Author:
Ralf Wisser
  • Field Details

  • Constructor Details

    • SQLDialect

      public SQLDialect()
  • Method Details

    • isNeedsValuesKeywordForDeletes

      public boolean isNeedsValuesKeywordForDeletes()
      Returns whether the DBMS requires the VALUES keyword in DELETE statements with an IN-clause.
      Returns:
      true if the VALUES keyword is needed for deletes
    • setNeedsValuesKeywordForDeletes

      public void setNeedsValuesKeywordForDeletes(boolean needsValuesKeywordForDeletes)
      Sets whether the DBMS requires the VALUES keyword in DELETE statements with an IN-clause.
      Parameters:
      needsValuesKeywordForDeletes - true if the VALUES keyword is needed for deletes
    • isSupportsInClauseForDeletes

      public boolean isSupportsInClauseForDeletes()
      Returns whether the DBMS supports IN-clauses in DELETE statements.
      Returns:
      true if IN-clauses for deletes are supported
    • setSupportsInClauseForDeletes

      public void setSupportsInClauseForDeletes(boolean supportsInClauseForDeletes)
      Sets whether the DBMS supports IN-clauses in DELETE statements.
      Parameters:
      supportsInClauseForDeletes - true if IN-clauses for deletes are supported
    • isSupportsMultiRowInserts

      public boolean isSupportsMultiRowInserts()
      Returns whether the DBMS supports multi-row INSERT statements.
      Returns:
      true if multi-row inserts are supported
    • setSupportsMultiRowInserts

      public void setSupportsMultiRowInserts(boolean supportsMultiRowInserts)
      Sets whether the DBMS supports multi-row INSERT statements.
      Parameters:
      supportsMultiRowInserts - true if multi-row inserts are supported
    • getUpsertMode

      public UPSERT_MODE getUpsertMode()
      Gets the upsert mode.
      Returns:
      the upsert mode
    • setUpsertMode

      public void setUpsertMode(UPSERT_MODE upsertMode)
      Sets the upsert mode.
      Parameters:
      upsertMode - the upsert mode to set
    • getUpdateMode

      public UPDATE_MODE getUpdateMode()
      Gets the update mode.
      Returns:
      the update mode
    • setUpdateMode

      public void setUpdateMode(UPDATE_MODE updateMode)
      Sets the update mode.
      Parameters:
      updateMode - the update mode to set
    • dmlTableReference

      public static String dmlTableReference(String tableName, Session session, ExecutionContext executionContext) throws SQLException
      Gets table reference for DML statements for a given working table.
      Parameters:
      tableName - the working table
      session - holds connection to DBMS
      executionContext - the execution context
      Returns:
      table reference for the working table
      Throws:
      SQLException - if a database access error occurs
    • toString

      public String toString()
      Returns a string representation of this SQL dialect.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this SQL dialect