Class SQLDialect
java.lang.Object
net.sf.jailer.database.SQLDialect
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdmlTableReference(String tableName, Session session, ExecutionContext executionContext) Gets table reference for DML statements for a given working table.Gets the update mode.Gets the upsert mode.booleanReturns whether the DBMS requires theVALUESkeyword in DELETE statements with an IN-clause.booleanReturns whether the DBMS supports IN-clauses in DELETE statements.booleanReturns whether the DBMS supports multi-row INSERT statements.voidsetNeedsValuesKeywordForDeletes(boolean needsValuesKeywordForDeletes) Sets whether the DBMS requires theVALUESkeyword in DELETE statements with an IN-clause.voidsetSupportsInClauseForDeletes(boolean supportsInClauseForDeletes) Sets whether the DBMS supports IN-clauses in DELETE statements.voidsetSupportsMultiRowInserts(boolean supportsMultiRowInserts) Sets whether the DBMS supports multi-row INSERT statements.voidsetUpdateMode(UPDATE_MODE updateMode) Sets the update mode.voidsetUpsertMode(UPSERT_MODE upsertMode) Sets the upsert mode.toString()Returns a string representation of this SQL dialect.
-
Field Details
-
CONFIG_TABLE_
-
TMP_TABLE_
-
DUAL_TABLE
-
-
Constructor Details
-
SQLDialect
public SQLDialect()
-
-
Method Details
-
isNeedsValuesKeywordForDeletes
public boolean isNeedsValuesKeywordForDeletes()Returns whether the DBMS requires theVALUESkeyword in DELETE statements with an IN-clause.- Returns:
trueif theVALUESkeyword is needed for deletes
-
setNeedsValuesKeywordForDeletes
public void setNeedsValuesKeywordForDeletes(boolean needsValuesKeywordForDeletes) Sets whether the DBMS requires theVALUESkeyword in DELETE statements with an IN-clause.- Parameters:
needsValuesKeywordForDeletes-trueif theVALUESkeyword is needed for deletes
-
isSupportsInClauseForDeletes
public boolean isSupportsInClauseForDeletes()Returns whether the DBMS supports IN-clauses in DELETE statements.- Returns:
trueif IN-clauses for deletes are supported
-
setSupportsInClauseForDeletes
public void setSupportsInClauseForDeletes(boolean supportsInClauseForDeletes) Sets whether the DBMS supports IN-clauses in DELETE statements.- Parameters:
supportsInClauseForDeletes-trueif IN-clauses for deletes are supported
-
isSupportsMultiRowInserts
public boolean isSupportsMultiRowInserts()Returns whether the DBMS supports multi-row INSERT statements.- Returns:
trueif multi-row inserts are supported
-
setSupportsMultiRowInserts
public void setSupportsMultiRowInserts(boolean supportsMultiRowInserts) Sets whether the DBMS supports multi-row INSERT statements.- Parameters:
supportsMultiRowInserts-trueif multi-row inserts are supported
-
getUpsertMode
-
setUpsertMode
Sets the upsert mode.- Parameters:
upsertMode- the upsert mode to set
-
getUpdateMode
-
setUpdateMode
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 tablesession- holds connection to DBMSexecutionContext- the execution context- Returns:
- table reference for the working table
- Throws:
SQLException- if a database access error occurs
-
toString
-