Package org.hibernate.community.dialect
Class SQLiteDialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.community.dialect.SQLiteDialect
-
- All Implemented Interfaces:
org.hibernate.exception.spi.ConversionContext
public class SQLiteDialect extends org.hibernate.dialect.Dialect
An SQL dialect for SQLite.
-
-
Constructor Summary
Constructors Constructor Description SQLiteDialect()
SQLiteDialect(org.hibernate.dialect.DatabaseVersion version)
SQLiteDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendDatetimeFormat(org.hibernate.sql.ast.spi.SqlAppender appender, String format)
void
appendDateTimeLiteral(org.hibernate.sql.ast.spi.SqlAppender appender, TemporalAccessor temporalAccessor, TemporalType precision, TimeZone jdbcTimeZone)
void
appendDateTimeLiteral(org.hibernate.sql.ast.spi.SqlAppender appender, Calendar calendar, TemporalType precision, TimeZone jdbcTimeZone)
void
appendDateTimeLiteral(org.hibernate.sql.ast.spi.SqlAppender appender, Date date, TemporalType precision, TimeZone jdbcTimeZone)
org.hibernate.exception.spi.SQLExceptionConversionDelegate
buildSQLExceptionConversionDelegate()
boolean
canCreateSchema()
protected String
columnType(int sqlTypeCode)
void
contributeTypes(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)
String
currentDate()
String
currentTime()
String
currentTimestamp()
static org.hibernate.dialect.Replacer
datetimeFormat(String format)
org.hibernate.ScrollMode
defaultScrollMode()
boolean
doesReadCommittedCauseWritersToBlockReaders()
boolean
doesRepeatableReadCauseReadersToBlockWriters()
boolean
dropConstraints()
String
extractPattern(org.hibernate.query.sqm.TemporalUnit unit)
Theextract()
function returnsTemporalUnit.DAY_OF_WEEK
numbered from 0 to 6.String
getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey)
String
getAddPrimaryKeyConstraintString(String constraintName)
String
getDropForeignKeyString()
String
getForUpdateString()
org.hibernate.dialect.identity.IdentityColumnSupport
getIdentityColumnSupport()
int
getInExpressionCountLimit()
org.hibernate.dialect.pagination.LimitHandler
getLimitHandler()
int
getMaxVarbinaryLength()
org.hibernate.dialect.NationalizationSupport
getNationalizationSupport()
String
getNoColumnsInsertString()
org.hibernate.query.sqm.NullOrdering
getNullOrdering()
String
getSelectGUIDString()
org.hibernate.sql.ast.SqlAstTranslatorFactory
getSqlAstTranslatorFactory()
org.hibernate.dialect.unique.UniqueDelegate
getUniqueDelegate()
org.hibernate.exception.spi.ViolatedConstraintNameExtractor
getViolatedConstraintNameExtractor()
boolean
hasAlterTable()
void
initializeFunctionRegistry(org.hibernate.query.spi.QueryEngine queryEngine)
boolean
qualifyIndexName()
boolean
supportsCommentOn()
boolean
supportsIfExistsBeforeTableName()
boolean
supportsLockTimeouts()
protected boolean
supportsMathFunctions()
boolean
supportsNullPrecedence()
boolean
supportsOuterJoinForUpdate()
boolean
supportsTupleDistinctCounts()
boolean
supportsWindowFunctions()
String
timestampaddPattern(org.hibernate.query.sqm.TemporalUnit unit, TemporalType temporalType, org.hibernate.query.sqm.IntervalType intervalType)
String
timestampdiffPattern(org.hibernate.query.sqm.TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)
String
translateExtractField(org.hibernate.query.sqm.TemporalUnit unit)
String
trimPattern(org.hibernate.query.sqm.TrimSpec specification, char character)
-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendBinaryLiteral, appendBooleanValueString, appendIntervalLiteral, appendLiteral, appendLockHint, applyLocksToSql, augmentPhysicalTableTypes, augmentRecognizedTableTypes, buildIdentifierHelper, canCreateCatalog, castPattern, castType, closeQuote, currentLocalTime, currentLocalTimestamp, currentTimestampWithTimeZone, equivalentTypes, escapeComment, forceLobAsLastValue, generatedAs, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getBooleanCheckCondition, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCurrentSchemaCommand, getCurrentTimestampSelectString, getDefaultBatchLoadSizingStrategy, getDefaultDecimalPrecision, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultProperties, getDefaultStatementBatchSize, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDoublePrecision, getDropCatalogCommand, getDropSchemaCommand, getDropTableString, getEnumCheckCondition, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getFloatPrecision, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFractionalSecondPrecisionInNanos, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIndexExporter, getKeywords, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getMaxIdentifierLength, getMaxNVarcharLength, getMaxVarcharLength, getNameQualifierSupport, getNativeIdentifierGeneratorStrategy, getNullColumnString, getNullColumnString, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSequenceExporter, getSequenceInformationExtractor, getSequenceSupport, getSizeStrategy, getSqmTranslatorFactory, getSupportedTemporaryTableKind, getTableComment, getTableExporter, getTableTypeString, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableCreateCommand, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeZoneSupport, getUniqueKeyExporter, getVersion, getWriteLockString, getWriteLockString, getWriteRowLockStrategy, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, inlineLiteral, isAnsiNullOn, isCurrentTimestampSelectStringCallable, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLockTimeoutParameterized, openQuote, prependComment, quote, registerColumnTypes, registerDefaultKeywords, registerKeyword, registerKeywords, registerResultSetOutParameter, registerResultSetOutParameter, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeDescriptor, resolveSqlTypeLength, supportsBindAsCallableArgument, supportsBitType, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCurrentTimestampSelection, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFractionalTimestampArithmetic, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsJdbcConnectionLobCreation, supportsLateral, supportsLobValueChangePropagation, supportsNamedParameters, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsOffsetInSubquery, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsParametersInInsertSelect, supportsPartitionBy, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsSkipLocked, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnionInSubquery, supportsValuesList, supportsValuesListForInsert, supportsWait, toBooleanValueString, toString, transformSelectString, translateDurationField, useFollowOnLocking, useInputStreamToInsertBlob
-
-
-
-
Method Detail
-
columnType
protected String columnType(int sqlTypeCode)
- Overrides:
columnType
in classorg.hibernate.dialect.Dialect
-
getMaxVarbinaryLength
public int getMaxVarbinaryLength()
- Overrides:
getMaxVarbinaryLength
in classorg.hibernate.dialect.Dialect
-
getUniqueDelegate
public org.hibernate.dialect.unique.UniqueDelegate getUniqueDelegate()
- Overrides:
getUniqueDelegate
in classorg.hibernate.dialect.Dialect
-
extractPattern
public String extractPattern(org.hibernate.query.sqm.TemporalUnit unit)
Theextract()
function returnsTemporalUnit.DAY_OF_WEEK
numbered from 0 to 6. This isn't consistent with what most other databases do, so here we adjust the result by generating(extract(dow,arg)+1))
.- Overrides:
extractPattern
in classorg.hibernate.dialect.Dialect
-
timestampaddPattern
public String timestampaddPattern(org.hibernate.query.sqm.TemporalUnit unit, TemporalType temporalType, org.hibernate.query.sqm.IntervalType intervalType)
- Overrides:
timestampaddPattern
in classorg.hibernate.dialect.Dialect
-
timestampdiffPattern
public String timestampdiffPattern(org.hibernate.query.sqm.TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)
- Overrides:
timestampdiffPattern
in classorg.hibernate.dialect.Dialect
-
initializeFunctionRegistry
public void initializeFunctionRegistry(org.hibernate.query.spi.QueryEngine queryEngine)
- Overrides:
initializeFunctionRegistry
in classorg.hibernate.dialect.Dialect
-
trimPattern
public String trimPattern(org.hibernate.query.sqm.TrimSpec specification, char character)
- Overrides:
trimPattern
in classorg.hibernate.dialect.Dialect
-
supportsMathFunctions
protected boolean supportsMathFunctions()
-
contributeTypes
public void contributeTypes(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)
- Overrides:
contributeTypes
in classorg.hibernate.dialect.Dialect
-
getLimitHandler
public org.hibernate.dialect.pagination.LimitHandler getLimitHandler()
- Overrides:
getLimitHandler
in classorg.hibernate.dialect.Dialect
-
supportsLockTimeouts
public boolean supportsLockTimeouts()
- Overrides:
supportsLockTimeouts
in classorg.hibernate.dialect.Dialect
-
getForUpdateString
public String getForUpdateString()
- Overrides:
getForUpdateString
in classorg.hibernate.dialect.Dialect
-
supportsOuterJoinForUpdate
public boolean supportsOuterJoinForUpdate()
- Overrides:
supportsOuterJoinForUpdate
in classorg.hibernate.dialect.Dialect
-
supportsNullPrecedence
public boolean supportsNullPrecedence()
- Overrides:
supportsNullPrecedence
in classorg.hibernate.dialect.Dialect
-
getNullOrdering
public org.hibernate.query.sqm.NullOrdering getNullOrdering()
- Overrides:
getNullOrdering
in classorg.hibernate.dialect.Dialect
-
getSqlAstTranslatorFactory
public org.hibernate.sql.ast.SqlAstTranslatorFactory getSqlAstTranslatorFactory()
- Overrides:
getSqlAstTranslatorFactory
in classorg.hibernate.dialect.Dialect
-
getViolatedConstraintNameExtractor
public org.hibernate.exception.spi.ViolatedConstraintNameExtractor getViolatedConstraintNameExtractor()
- Specified by:
getViolatedConstraintNameExtractor
in interfaceorg.hibernate.exception.spi.ConversionContext
- Overrides:
getViolatedConstraintNameExtractor
in classorg.hibernate.dialect.Dialect
-
buildSQLExceptionConversionDelegate
public org.hibernate.exception.spi.SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
- Overrides:
buildSQLExceptionConversionDelegate
in classorg.hibernate.dialect.Dialect
-
canCreateSchema
public boolean canCreateSchema()
- Overrides:
canCreateSchema
in classorg.hibernate.dialect.Dialect
-
hasAlterTable
public boolean hasAlterTable()
- Overrides:
hasAlterTable
in classorg.hibernate.dialect.Dialect
-
dropConstraints
public boolean dropConstraints()
- Overrides:
dropConstraints
in classorg.hibernate.dialect.Dialect
-
qualifyIndexName
public boolean qualifyIndexName()
- Overrides:
qualifyIndexName
in classorg.hibernate.dialect.Dialect
-
getDropForeignKeyString
public String getDropForeignKeyString()
- Overrides:
getDropForeignKeyString
in classorg.hibernate.dialect.Dialect
-
getAddForeignKeyConstraintString
public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey)
- Overrides:
getAddForeignKeyConstraintString
in classorg.hibernate.dialect.Dialect
-
getAddPrimaryKeyConstraintString
public String getAddPrimaryKeyConstraintString(String constraintName)
- Overrides:
getAddPrimaryKeyConstraintString
in classorg.hibernate.dialect.Dialect
-
supportsCommentOn
public boolean supportsCommentOn()
- Overrides:
supportsCommentOn
in classorg.hibernate.dialect.Dialect
-
supportsIfExistsBeforeTableName
public boolean supportsIfExistsBeforeTableName()
- Overrides:
supportsIfExistsBeforeTableName
in classorg.hibernate.dialect.Dialect
-
doesReadCommittedCauseWritersToBlockReaders
public boolean doesReadCommittedCauseWritersToBlockReaders()
- Overrides:
doesReadCommittedCauseWritersToBlockReaders
in classorg.hibernate.dialect.Dialect
-
doesRepeatableReadCauseReadersToBlockWriters
public boolean doesRepeatableReadCauseReadersToBlockWriters()
- Overrides:
doesRepeatableReadCauseReadersToBlockWriters
in classorg.hibernate.dialect.Dialect
-
supportsTupleDistinctCounts
public boolean supportsTupleDistinctCounts()
- Overrides:
supportsTupleDistinctCounts
in classorg.hibernate.dialect.Dialect
-
getInExpressionCountLimit
public int getInExpressionCountLimit()
- Overrides:
getInExpressionCountLimit
in classorg.hibernate.dialect.Dialect
-
supportsWindowFunctions
public boolean supportsWindowFunctions()
- Overrides:
supportsWindowFunctions
in classorg.hibernate.dialect.Dialect
-
getIdentityColumnSupport
public org.hibernate.dialect.identity.IdentityColumnSupport getIdentityColumnSupport()
- Overrides:
getIdentityColumnSupport
in classorg.hibernate.dialect.Dialect
-
getSelectGUIDString
public String getSelectGUIDString()
- Overrides:
getSelectGUIDString
in classorg.hibernate.dialect.Dialect
-
defaultScrollMode
public org.hibernate.ScrollMode defaultScrollMode()
- Overrides:
defaultScrollMode
in classorg.hibernate.dialect.Dialect
-
getNoColumnsInsertString
public String getNoColumnsInsertString()
- Overrides:
getNoColumnsInsertString
in classorg.hibernate.dialect.Dialect
-
getNationalizationSupport
public org.hibernate.dialect.NationalizationSupport getNationalizationSupport()
- Overrides:
getNationalizationSupport
in classorg.hibernate.dialect.Dialect
-
currentDate
public String currentDate()
- Overrides:
currentDate
in classorg.hibernate.dialect.Dialect
-
currentTime
public String currentTime()
- Overrides:
currentTime
in classorg.hibernate.dialect.Dialect
-
currentTimestamp
public String currentTimestamp()
- Overrides:
currentTimestamp
in classorg.hibernate.dialect.Dialect
-
appendDatetimeFormat
public void appendDatetimeFormat(org.hibernate.sql.ast.spi.SqlAppender appender, String format)
- Overrides:
appendDatetimeFormat
in classorg.hibernate.dialect.Dialect
-
datetimeFormat
public static org.hibernate.dialect.Replacer datetimeFormat(String format)
-
translateExtractField
public String translateExtractField(org.hibernate.query.sqm.TemporalUnit unit)
- Overrides:
translateExtractField
in classorg.hibernate.dialect.Dialect
-
appendDateTimeLiteral
public void appendDateTimeLiteral(org.hibernate.sql.ast.spi.SqlAppender appender, TemporalAccessor temporalAccessor, TemporalType precision, TimeZone jdbcTimeZone)
- Overrides:
appendDateTimeLiteral
in classorg.hibernate.dialect.Dialect
-
appendDateTimeLiteral
public void appendDateTimeLiteral(org.hibernate.sql.ast.spi.SqlAppender appender, Date date, TemporalType precision, TimeZone jdbcTimeZone)
- Overrides:
appendDateTimeLiteral
in classorg.hibernate.dialect.Dialect
-
appendDateTimeLiteral
public void appendDateTimeLiteral(org.hibernate.sql.ast.spi.SqlAppender appender, Calendar calendar, TemporalType precision, TimeZone jdbcTimeZone)
- Overrides:
appendDateTimeLiteral
in classorg.hibernate.dialect.Dialect
-
-