Package com.valqueries.automapper
Class H2SqlDialect
java.lang.Object
com.valqueries.automapper.H2SqlDialect
- All Implemented Interfaces:
SqlDialect
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
allowsConversion
(Clazz<?> sqlType, String type) describe
(TableToken tablename) describeIndex
(TableToken tablename) dropTableStatement
(Clazz<?> clazz) escapeColumnOrTable
(String name) generateDeleteStatement
(String tableAlias, TableToken table, List<Element> elements, Integer limit) generateDeleteStatement
(String tableAlias, TypeDescriber<?> typeDescriber, List<Element> elements, Integer limit) generateDropIndexStatement
(TableToken tableName, IndexToken index, boolean isPrimary) generateIndexStatement
(TableToken tablename, KeySet key) generatePrimaryKeyStatement
(TableToken name, KeySet key) generateUpdateStatement
(TableToken table, List<Element> elements, List<Property.PropertyValue<?>> newPropertyValues, List<Property.PropertyValue<?>> incrementPropertyValues) <O> String
getCustomUpsert
(CompoundColumnizer<O> columnizer, Class<O> modelType, List<Property.PropertyValue<?>> newValues, List<Property.PropertyValue<?>> incrementValues, List<Property<?>> setObjValues, List<Property<?>> incrementByObjValues) getDescribeDbResult
(OrmResultSet ormResultSet) getDescribeIndexResult
(OrmResultSet ormResultSet) <O> String
getInsertAutoIncrement
(CompoundColumnizer<O> columnizer, Class<O> oClass, List<Boolean> keyNulls) getLimitDefinition
(int offset, int limit) getSqlType
(Property<?> property) <O> String
getUpsert
(CompoundColumnizer<O> columnizer, Class<O> oClass) <O> String
getUpsertAutoIncrement
(CompoundColumnizer<O> columnizer, Class<O> oClass, List<Boolean> keyNulls) boolean
Check whether an exception was caused by a duplicate value for primary or unique key.prepareColumnOrTable
(String name) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.valqueries.automapper.SqlDialect
_column, buildSelectSql, column, defaultOrderStatement, generateDistinctSelectStatement, generateUpdateStatement, getAddColumnStatement, getInsert, getTableName, getUniqueKeyCheck, groupConcat, harmonizeLikeValue, isOrderRequiredForOffset, operator, operator, operator, table
-
Constructor Details
-
H2SqlDialect
public H2SqlDialect()
-
-
Method Details
-
prepareColumnOrTable
- Specified by:
prepareColumnOrTable
in interfaceSqlDialect
-
escapeColumnOrTable
- Specified by:
escapeColumnOrTable
in interfaceSqlDialect
-
getUpsert
- Specified by:
getUpsert
in interfaceSqlDialect
-
getUpsertAutoIncrement
public <O> String getUpsertAutoIncrement(CompoundColumnizer<O> columnizer, Class<O> oClass, List<Boolean> keyNulls) - Specified by:
getUpsertAutoIncrement
in interfaceSqlDialect
-
getSqlType
- Specified by:
getSqlType
in interfaceSqlDialect
-
getLimitDefinition
- Specified by:
getLimitDefinition
in interfaceSqlDialect
-
generateUpdateStatement
public String generateUpdateStatement(TableToken table, List<Element> elements, List<Property.PropertyValue<?>> newPropertyValues, List<Property.PropertyValue<?>> incrementPropertyValues) - Specified by:
generateUpdateStatement
in interfaceSqlDialect
-
getInsertAutoIncrement
public <O> String getInsertAutoIncrement(CompoundColumnizer<O> columnizer, Class<O> oClass, List<Boolean> keyNulls) - Specified by:
getInsertAutoIncrement
in interfaceSqlDialect
-
describe
- Specified by:
describe
in interfaceSqlDialect
-
describeIndex
- Specified by:
describeIndex
in interfaceSqlDialect
-
getDescribeIndexResult
- Specified by:
getDescribeIndexResult
in interfaceSqlDialect
-
generateDropIndexStatement
- Specified by:
generateDropIndexStatement
in interfaceSqlDialect
-
getDescribeDbResult
- Specified by:
getDescribeDbResult
in interfaceSqlDialect
-
generatePrimaryKeyStatement
- Specified by:
generatePrimaryKeyStatement
in interfaceSqlDialect
-
generateIndexStatement
- Specified by:
generateIndexStatement
in interfaceSqlDialect
-
generateDeleteStatement
public String generateDeleteStatement(String tableAlias, TypeDescriber<?> typeDescriber, List<Element> elements, Integer limit) - Specified by:
generateDeleteStatement
in interfaceSqlDialect
-
generateDeleteStatement
public String generateDeleteStatement(String tableAlias, TableToken table, List<Element> elements, Integer limit) - Specified by:
generateDeleteStatement
in interfaceSqlDialect
-
generateAlterColumnPartStatement
- Specified by:
generateAlterColumnPartStatement
in interfaceSqlDialect
-
dropTableStatement
- Specified by:
dropTableStatement
in interfaceSqlDialect
-
allowsConversion
- Specified by:
allowsConversion
in interfaceSqlDialect
-
isDuplicateKeyEntry
Description copied from interface:SqlDialect
Check whether an exception was caused by a duplicate value for primary or unique key.- Specified by:
isDuplicateKeyEntry
in interfaceSqlDialect
- Parameters:
e
- the exception to be tested- Returns:
- whether the exception was caused by a unique constraint violation
-
getCustomUpsert
public <O> String getCustomUpsert(CompoundColumnizer<O> columnizer, Class<O> modelType, List<Property.PropertyValue<?>> newValues, List<Property.PropertyValue<?>> incrementValues, List<Property<?>> setObjValues, List<Property<?>> incrementByObjValues) - Specified by:
getCustomUpsert
in interfaceSqlDialect
-