Package com.valqueries.automapper
Interface SqlDialect
- All Known Implementing Classes:
- H2SqlDialect,- MariaSqlDialect,- MssqlSqlDialect
public interface SqlDialect
- 
Method SummaryModifier and TypeMethodDescriptiondefault ColumnTokenDo not use directly.booleanallowsConversion(Clazz<?> sqlType, String type) default <T> StringbuildSelectSql(String tableAlias, T type, MappingHelper mappingHelper, TypeDescriber<T> typeDescriber, List<Element> elementList, List<SortElement> sortElementList, Integer limit, int offset, Collection<RelationDescriber> eagers, boolean deferLimits, String... columns) default ColumnTokendefault Stringdefault Stringdescribe(TableToken tablename) default StringdescribeIndex(TableToken tablename) default StringdropTableStatement(Clazz<?> clazz) escapeColumnOrTable(String name) default Stringdefault StringgenerateDeleteStatement(String tableAlias, TableToken table, List<Element> elements, Integer limit) default StringgenerateDeleteStatement(String tableAlias, TypeDescriber<?> typeDescriber, List<Element> elements, Integer limit) default <T> StringgenerateDistinctSelectStatement(String tableAlias, T target, MappingHelper mappingHelper, TypeDescriber<T> typeDescriber, List<Element> elements, List<SortElement> sortElements, Integer limit, Integer offset, Collection<RelationDescriber> eagers, Property<?> field) generateDropIndexStatement(TableToken tableName, IndexToken index, boolean isPrimary) generateIndexStatement(TableToken tablename, KeySet key) generatePrimaryKeyStatement(TableToken name, KeySet keyset) generateUpdateStatement(TableToken table, List<Element> elements, List<Property.PropertyValue<?>> newPropertyValues, List<Property.PropertyValue<?>> incrementPropertyValues) default StringgenerateUpdateStatement(TypeDescriber<?> typeDescriber, List<Element> elements, List<Property.PropertyValue<?>> newPropertyValues, List<Property.PropertyValue<?>> incrementPropertyValues) default String<O> StringgetCustomUpsert(CompoundColumnizer<O> columnizer, Class<O> modelType, List<Property.PropertyValue<?>> newValues, List<Property.PropertyValue<?>> incrementValues, List<Property<?>> setObjValues, List<Property<?>> incrementByObjValues) getDescribeDbResult(OrmResultSet ormResultSet) default <O> StringgetInsert(CompoundColumnizer<O> columnizer, Class<O> oClass) default <O> StringgetInsertAutoIncrement(CompoundColumnizer<O> columnizer, Class<O> oClass, List<Boolean> keyNulls) getLimitDefinition(int offset, int limit) default StringgetSqlType(Property<?> property) default TableTokengetTableName(Clazz<?> modelType) default <O> StringgetUniqueKeyCheck(CompoundColumnizer<O> columnizer, Class<O> oClass, KeySet uniqueKeySet, List<String> parameters) Get the SQL statement to check whether a set of unique keys is already present in the database.<O> StringgetUpsert(CompoundColumnizer<O> columnizer, Class<O> oClass) default <O> StringgetUpsertAutoIncrement(CompoundColumnizer<O> columnizer, Class<O> oClass, List<Boolean> keyNulls) default StringgroupConcat(Property<?> resultProperty, String separator) default ObjectharmonizeLikeValue(Object value) Harmonize the value to be used in a LIKE statement.booleanCheck whether an exception was caused by a duplicate value for primary or unique key.default booleandefault Stringoperator(BinaryOperator operator) default Stringoperator(ListOperator operator) default Stringoperator(UnaryOperator operator) default StringprepareColumnOrTable(String name) default TableToken
- 
Method Details- 
escapeColumnOrTable
- 
prepareColumnOrTable
- 
getTableName
- 
column
- 
_columnDo not use directly. It is an easy way to introduce a bug becauseDbNameis not respected
- 
table
- 
getSqlType
- 
operator
- 
operator
- 
operator
- 
getUpsert
- 
getUpsertAutoIncrementdefault <O> String getUpsertAutoIncrement(CompoundColumnizer<O> columnizer, Class<O> oClass, List<Boolean> keyNulls) 
- 
getLimitDefinition
- 
generateUpdateStatementString generateUpdateStatement(TableToken table, List<Element> elements, List<Property.PropertyValue<?>> newPropertyValues, List<Property.PropertyValue<?>> incrementPropertyValues) 
- 
generateUpdateStatementdefault String generateUpdateStatement(TypeDescriber<?> typeDescriber, List<Element> elements, List<Property.PropertyValue<?>> newPropertyValues, List<Property.PropertyValue<?>> incrementPropertyValues) 
- 
getInsert
- 
getInsertAutoIncrementdefault <O> String getInsertAutoIncrement(CompoundColumnizer<O> columnizer, Class<O> oClass, List<Boolean> keyNulls) 
- 
generateDeleteStatement
- 
generateDeleteStatement
- 
getAddColumnStatement
- 
generateAlterColumnPartStatement
- 
generateIndexStatement
- 
generateDropIndexStatement
- 
describe
- 
describeIndex
- 
getDescribeDbResult
- 
getDescribeIndexResult
- 
generatePrimaryKeyStatement
- 
dropTableStatement
- 
allowsConversion
- 
groupConcat
- 
isDuplicateKeyEntryCheck whether an exception was caused by a duplicate value for primary or unique key.- Parameters:
- e- the exception to be tested
- Returns:
- whether the exception was caused by a unique constraint violation
 
- 
getUniqueKeyCheckdefault <O> String getUniqueKeyCheck(CompoundColumnizer<O> columnizer, Class<O> oClass, KeySet uniqueKeySet, List<String> parameters) Get the SQL statement to check whether a set of unique keys is already present in the database.- Parameters:
- columnizer- the columnizer to be used, containing the values to be checked
- oClass- the class of the objects to be checked
- uniqueKeySet- the set of unique keys to be checked
- Returns:
- the SQL statement
 
- 
harmonizeLikeValueHarmonize the value to be used in a LIKE statement.Some databases (e.g. MSSQL) allow for a broader range of special operations to be performed in a LIKE statement. This method takes in the value to be used in a LIKE statement and returns a value that performs the same operation in the current database. For example, in MSSQL, the value "a[bc]" would match "a", "ab", or "ac", but in MySQL, it would match "a[bc]". As such the value "a[bc]" would need to be harmonized to "a[[]bc]" when used in a LIKE statement in MSSQL. - Parameters:
- value- the value to be harmonized
- Returns:
- the harmonized value
 
- 
isOrderRequiredForOffsetdefault boolean isOrderRequiredForOffset()
- 
defaultOrderStatement
- 
getCustomUpsert<O> String getCustomUpsert(CompoundColumnizer<O> columnizer, Class<O> modelType, List<Property.PropertyValue<?>> newValues, List<Property.PropertyValue<?>> incrementValues, List<Property<?>> setObjValues, List<Property<?>> incrementByObjValues) 
- 
buildSelectSqldefault <T> String buildSelectSql(String tableAlias, T type, MappingHelper mappingHelper, TypeDescriber<T> typeDescriber, List<Element> elementList, List<SortElement> sortElementList, Integer limit, int offset, Collection<RelationDescriber> eagers, boolean deferLimits, String... columns) 
- 
generateDistinctSelectStatementdefault <T> String generateDistinctSelectStatement(String tableAlias, T target, MappingHelper mappingHelper, TypeDescriber<T> typeDescriber, List<Element> elements, List<SortElement> sortElements, Integer limit, Integer offset, Collection<RelationDescriber> eagers, Property<?> field) 
 
-