Package com.querydsl.sql
Class SQLTemplates
java.lang.Object
com.querydsl.core.types.Templates
com.querydsl.sql.SQLTemplates
- Direct Known Subclasses:
CUBRIDTemplates,DB2Templates,DerbyTemplates,FirebirdTemplates,H2Templates,HSQLDBTemplates,MySQLTemplates,OracleTemplates,PostgreSQLTemplates,SQLiteTemplates,SQLServerTemplates,TeradataTemplates
SQLTemplates extends Templates to provides SQL specific extensions
and acts as database specific Dialect for Querydsl SQL- Author:
- tiwe
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFluent builder forSQLTemplatesinstances *Nested classes/interfaces inherited from class com.querydsl.core.types.Templates
Templates.Precedence -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SQLTemplatesprotected static final Expression<?>protected static final Expression<?>protected static final Expression<?>static final Expression<?>protected static final intprotected static final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSQLTemplates(String quoteStr, char escape, boolean useQuotes) Deprecated.protectedSQLTemplates(Set<String> reservedKeywords, String quoteStr, char escape, boolean useQuotes) protectedSQLTemplates(Set<String> reservedKeywords, String quoteStr, char escape, boolean useQuotes, boolean requiresSchemaInWhere) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCustomType(Type<?> type) protected voidaddTableOverride(SchemaAndTable from, SchemaAndTable to) protected voidaddTypeNameToCode(String type, int code) protected voidaddTypeNameToCode(String type, int code, boolean override) escapeLiteral(String str) final StringgetAsc()final StringgetCastTypeNameForCode(int code) getCodeForTypeName(String type) final Stringfinal StringgetCount()final Stringfinal Stringfinal Stringfinal Stringfinal Stringfinal Stringfinal Stringfinal StringgetDesc()final Stringfinal Stringfinal Stringfinal QueryFlagfinal QueryFlagfinal StringgetFrom()final Stringfinal Stringfinal Stringfinal Stringfinal Stringfinal StringgetJoin()final StringgetJoinSymbol(JoinType joinType) final StringgetKey()final Stringfinal Stringfinal intfinal Stringfinal Stringfinal QueryFlagfinal Stringfinal Stringfinal Stringfinal StringgetOn()final Stringfinal Stringfinal Stringfinal Stringfinal StringgetSet()final Stringfinal Map<SchemaAndTable,SchemaAndTable> getTypeNameForCode(int code) final Stringfinal Stringfinal StringgetWhere()final StringgetWith()final Stringfinal booleanfinal booleanfinal booleanfinal booleanfinal booleanbooleanfinal booleanfinal booleanfinal booleanfinal booleanfinal booleanfinal booleanfinal booleanfinal booleanfinal booleanfinal booleanfinal booleanprotected voidfinal StringquoteIdentifier(String identifier) final StringquoteIdentifier(String identifier, boolean precededByDot) protected booleanrequiresQuotes(String identifier, boolean precededByDot) voidserialize(QueryMetadata metadata, boolean forCountRow, SQLSerializer context) template method for SELECT serializationvoidserializeDelete(QueryMetadata metadata, RelationalPath<?> entity, SQLSerializer context) template method for DELETE serializationvoidserializeInsert(QueryMetadata metadata, RelationalPath<?> entity, List<Path<?>> columns, List<Expression<?>> values, SubQueryExpression<?> subQuery, SQLSerializer context) template method for INSERT serializationvoidserializeInsert(QueryMetadata metadata, RelationalPath<?> entity, List<SQLInsertBatch> batches, SQLSerializer context) template method for INSERT serializationvoidserializeMerge(QueryMetadata metadata, RelationalPath<?> entity, List<Path<?>> keys, List<Path<?>> columns, List<Expression<?>> values, SubQueryExpression<?> subQuery, SQLSerializer context) template method for MERGE serializationprotected voidserializeModifiers(QueryMetadata metadata, SQLSerializer context) template method for LIMIT and OFFSET serializationvoidserializeUpdate(QueryMetadata metadata, RelationalPath<?> entity, Map<Path<?>, Expression<?>> updates, SQLSerializer context) template method for UPDATE serializationprotected voidsetArraysSupported(boolean b) protected voidprotected voidsetAutoIncrement(String autoIncrement) protected voidsetBatchCountViaGetUpdateCount(boolean batchCountViaGetUpdateCount) protected voidsetBatchToBulkSupported(boolean b) protected voidsetColumnAlias(String columnAlias) protected voidprotected voidsetCountDistinctMultipleColumns(boolean countDistinctMultipleColumns) protected voidsetCountStar(String countStar) protected voidsetCountViaAnalytics(boolean countViaAnalytics) protected voidsetCreateIndex(String createIndex) protected voidsetCreateTable(String createTable) protected voidsetCreateUniqueIndex(String createUniqueIndex) protected voidsetCrossJoin(String crossJoin) protected voidsetDefaultValues(String defaultValues) protected voidprotected voidprotected voidsetDistinctCountEnd(String distinctCountEnd) protected voidsetDistinctCountStart(String distinctCountStart) protected voidsetDummyTable(String dummyTable) protected voidsetForShareFlag(QueryFlag flag) protected voidsetForShareSupported(boolean forShareSupported) protected voidsetForUpdateFlag(QueryFlag flag) protected voidprotected voidsetFullJoin(String fullJoin) protected voidsetFunctionJoinsWrapped(boolean functionJoinsWrapped) protected voidsetGroupBy(String groupBy) protected voidprotected voidsetInnerJoin(String innerJoin) protected voidsetInsertInto(String insertInto) protected voidprotected voidprotected voidsetLeftJoin(String leftJoin) protected voidsetLimitRequired(boolean limitRequired) protected voidsetListMaxSize(int i) protected voidsetMaxLimit(int i) protected voidsetMergeInto(String mergeInto) protected voidsetNativeMerge(boolean nativeMerge) protected voidsetNotNull(String notNull) protected voidsetNoWaitFlag(QueryFlag flag) protected voidsetNullsFirst(String nullsFirst) protected voidsetNullsLast(String nullsLast) protected voidsetOffsetTemplate(String offsetTemplate) protected voidprotected voidsetOrderBy(String orderBy) protected voidsetParameterMetadataAvailable(boolean parameterMetadataAvailable) protected voidsetPrintSchema(boolean printSchema) protected voidsetRightJoin(String rightJoin) protected voidprotected voidsetSelectDistinct(String selectDistinct) protected voidprotected voidsetSupportsUnquotedReservedWordsAsIdentifier(boolean b) protected voidsetTableAlias(String tableAlias) protected voidsetUnionsWrapped(boolean unionsWrapped) protected voidprotected voidprotected voidprotected voidprotected voidsetWithRecursive(String withRecursive) protected voidsetWrapSelectParameters(boolean b) Methods inherited from class com.querydsl.core.types.Templates
add, add, add, escapeForLike, getEscapeChar, getPrecedence, getTemplate, setPrecedence, setPrecedence
-
Field Details
-
FOR_SHARE
-
FOR_UPDATE
-
NO_WAIT
-
TIME_WITH_TIMEZONE
protected static final int TIME_WITH_TIMEZONE- See Also:
-
TIMESTAMP_WITH_TIMEZONE
protected static final int TIMESTAMP_WITH_TIMEZONE- See Also:
-
RECURSIVE
-
DEFAULT
-
OTHER_LIKE_CASES
-
-
Constructor Details
-
SQLTemplates
Deprecated. -
SQLTemplates
-
SQLTemplates
-
-
Method Details
-
serialize
-
escapeLiteral
-
addTypeNameToCode
-
addTypeNameToCode
-
addTableOverride
-
getCustomTypes
-
getAsc
-
getAutoIncrement
-
getColumnAlias
-
getCount
-
getCountStar
-
getCrossJoin
-
getDelete
-
getDesc
-
getDistinctCountEnd
-
getDistinctCountStart
-
getDummyTable
-
getFrom
-
getFullJoin
-
getGroupBy
-
getHaving
-
getInnerJoin
-
getInsertInto
-
getJoin
-
getJoinSymbol
-
getKey
-
getLeftJoin
-
getRightJoin
-
getLimitTemplate
-
getMergeInto
-
getNotNull
-
getOffsetTemplate
-
getOn
-
getOrderBy
-
getSelect
-
getSelectDistinct
-
getSet
-
getTableAlias
-
getTableOverrides
-
getTypeNameForCode
-
getCastTypeNameForCode
-
getCodeForTypeName
-
getUpdate
-
getValues
-
getDefaultValues
-
getWhere
-
isNativeMerge
public final boolean isNativeMerge() -
isSupportsAlias
public final boolean isSupportsAlias() -
getCreateIndex
-
getCreateUniqueIndex
-
getCreateTable
-
getWith
-
getWithRecursive
-
isCountDistinctMultipleColumns
public final boolean isCountDistinctMultipleColumns() -
isRequiresSchemaInWhere
public final boolean isRequiresSchemaInWhere() -
isPrintSchema
public final boolean isPrintSchema() -
isParameterMetadataAvailable
public final boolean isParameterMetadataAvailable() -
isBatchCountViaGetUpdateCount
public final boolean isBatchCountViaGetUpdateCount() -
isUseQuotes
public final boolean isUseQuotes() -
isUnionsWrapped
public final boolean isUnionsWrapped() -
isFunctionJoinsWrapped
public final boolean isFunctionJoinsWrapped() -
isLimitRequired
public final boolean isLimitRequired() -
getNullsFirst
-
getNullsLast
-
isCountViaAnalytics
public final boolean isCountViaAnalytics() -
isWrapSelectParameters
public final boolean isWrapSelectParameters() -
isArraysSupported
public final boolean isArraysSupported() -
getListMaxSize
public final int getListMaxSize() -
isSupportsUnquotedReservedWordsAsIdentifier
public final boolean isSupportsUnquotedReservedWordsAsIdentifier() -
isBatchToBulkSupported
public final boolean isBatchToBulkSupported() -
getForUpdateFlag
-
getNoWaitFlag
-
newLineToSingleSpace
protected void newLineToSingleSpace() -
quoteIdentifier
-
quoteIdentifier
-
requiresQuotes
-
serialize
template method for SELECT serialization- Parameters:
metadata-forCountRow-context-
-
serializeDelete
public void serializeDelete(QueryMetadata metadata, RelationalPath<?> entity, SQLSerializer context) template method for DELETE serialization- Parameters:
metadata-entity-context-
-
serializeInsert
public void serializeInsert(QueryMetadata metadata, RelationalPath<?> entity, List<Path<?>> columns, List<Expression<?>> values, SubQueryExpression<?> subQuery, SQLSerializer context) template method for INSERT serialization- Parameters:
metadata-entity-columns-values-subQuery-context-
-
serializeInsert
public void serializeInsert(QueryMetadata metadata, RelationalPath<?> entity, List<SQLInsertBatch> batches, SQLSerializer context) template method for INSERT serialization- Parameters:
metadata-batches-context-
-
serializeMerge
public void serializeMerge(QueryMetadata metadata, RelationalPath<?> entity, List<Path<?>> keys, List<Path<?>> columns, List<Expression<?>> values, SubQueryExpression<?> subQuery, SQLSerializer context) template method for MERGE serialization- Parameters:
metadata-entity-keys-columns-values-subQuery-context-
-
serializeUpdate
public void serializeUpdate(QueryMetadata metadata, RelationalPath<?> entity, Map<Path<?>, Expression<?>> updates, SQLSerializer context) template method for UPDATE serialization- Parameters:
metadata-entity-updates-context-
-
serializeModifiers
template method for LIMIT and OFFSET serialization- Parameters:
metadata-context-
-
addCustomType
-
setAsc
-
setAutoIncrement
-
setColumnAlias
-
setCount
-
setCountStar
-
setCrossJoin
-
setDelete
-
setDesc
-
setDistinctCountEnd
-
setDistinctCountStart
-
setDummyTable
-
setFrom
-
setFullJoin
-
setGroupBy
-
setHaving
-
setInnerJoin
-
setInsertInto
-
setJoin
-
setKey
-
setLeftJoin
-
setRightJoin
-
setMergeInto
-
setNativeMerge
protected void setNativeMerge(boolean nativeMerge) -
setNotNull
-
setOffsetTemplate
-
setOn
-
setOrderBy
-
setSelect
-
setSelectDistinct
-
setSet
-
setTableAlias
-
setUpdate
-
setValues
-
setDefaultValues
-
setWhere
-
setWith
-
setWithRecursive
-
setCreateIndex
-
setCreateUniqueIndex
-
setCreateTable
-
setPrintSchema
protected void setPrintSchema(boolean printSchema) -
setParameterMetadataAvailable
protected void setParameterMetadataAvailable(boolean parameterMetadataAvailable) -
setBatchCountViaGetUpdateCount
protected void setBatchCountViaGetUpdateCount(boolean batchCountViaGetUpdateCount) -
setUnionsWrapped
protected void setUnionsWrapped(boolean unionsWrapped) -
setFunctionJoinsWrapped
protected void setFunctionJoinsWrapped(boolean functionJoinsWrapped) -
setNullsFirst
-
setNullsLast
-
setLimitRequired
protected void setLimitRequired(boolean limitRequired) -
setCountDistinctMultipleColumns
protected void setCountDistinctMultipleColumns(boolean countDistinctMultipleColumns) -
setCountViaAnalytics
protected void setCountViaAnalytics(boolean countViaAnalytics) -
setWrapSelectParameters
protected void setWrapSelectParameters(boolean b) -
setArraysSupported
protected void setArraysSupported(boolean b) -
setListMaxSize
protected void setListMaxSize(int i) -
setSupportsUnquotedReservedWordsAsIdentifier
protected void setSupportsUnquotedReservedWordsAsIdentifier(boolean b) -
setMaxLimit
protected void setMaxLimit(int i) -
setBatchToBulkSupported
protected void setBatchToBulkSupported(boolean b) -
setForUpdateFlag
-
setNoWaitFlag
-