abstractBaseSqlitePlatform
Hierarchy
- AbstractSqlPlatform
- BaseSqlitePlatform
Index
Constructors
Methods
- allowsComparingTuples
- allowsMultiInsert
- cloneEmbeddable
- convertDateToJSValue
- convertIntervalToDatabaseValue
- convertIntervalToJSValue
- convertJsonToDatabaseValue
- convertJsonToJSValue
- convertsJsonAutomatically
- denormalizePrimaryKey
- escape
- extractSimpleType
- formatQuery
- generateCustomOrder
- getArrayDeclarationSQL
- getBigIntTypeDeclarationSQL
- getBlobDeclarationSQL
- getBooleanTypeDeclarationSQL
- getCharTypeDeclarationSQL
- getConfig
- getCurrentTimestampSQL
- getDateTimeTypeDeclarationSQL
- getDateTypeDeclarationSQL
- getDecimalTypeDeclarationSQL
- getDefaultCharLength
- getDefaultCharset
- getDefaultDateTimeLength
- getDefaultMappedType
- getDefaultPrimaryName
- getDefaultSchemaName
- getDefaultVarcharLength
- getDefaultVersionLength
- getDoubleDeclarationSQL
- getEnumTypeDeclarationSQL
- getExceptionConverter
- getExtension
- getFloatDeclarationSQL
- getFullTextIndexExpression
- getFullTextWhereClause
- getIndexName
- getIntegerTypeDeclarationSQL
- getIntervalTypeDeclarationSQL
- getJsonDeclarationSQL
- getJsonIndexDefinition
- getMappedType
- getMediumIntTypeDeclarationSQL
- getNamingStrategy
- getRegExpOperator
- getRegExpValue
- getRepositoryClass
- getSchemaGenerator
- getSchemaHelper
- getSearchJsonPropertyKey
- getSearchJsonPropertySQL
- getSerializedPrimaryKeyField
- getSmallIntTypeDeclarationSQL
- getTextTypeDeclarationSQL
- getTimeTypeDeclarationSQL
- getTimezone
- getTinyIntTypeDeclarationSQL
- getUuidTypeDeclarationSQL
- getVarcharTypeDeclarationSQL
- indexForeignKeys
- isAllowedTopLevelOperator
- isBigIntProperty
- isNumericColumn
- isNumericProperty
- isPopulated
- isRaw
- lookupExtensions
- marshallArray
- normalizeColumnType
- normalizePrimaryKey
- parseDate
- processDateProperty
- quoteIdentifier
- quoteValue
- quoteVersionValue
- setConfig
- shouldHaveColumn
- supportsCreatingFullTextIndex
- supportsCustomPrimaryKeyNames
- supportsDownMigrations
- supportsMultipleCascadePaths
- supportsMultipleStatements
- supportsNativeEnums
- supportsSchemas
- supportsTransactions
- supportsUnsigned
- unmarshallArray
- usesBatchInserts
- usesBatchUpdates
- usesCascadeStatement
- usesDefaultKeyword
- usesDifferentSerializedPrimaryKey
- usesImplicitTransactions
- usesOutputStatement
- usesPivotTable
- usesReturningStatement
- validateMetadata
Constructors
constructor
Returns BaseSqlitePlatform
Methods
inheritedallowsComparingTuples
Returns boolean
inheritedallowsMultiInsert
Returns boolean
inheritedcloneEmbeddable
Parameters
data: T
Returns T
inheritedconvertDateToJSValue
Parameters
value: string | Date
Returns string
inheritedconvertIntervalToDatabaseValue
Parameters
value: unknown
Returns unknown
inheritedconvertIntervalToJSValue
Parameters
value: string
Returns unknown
inheritedconvertJsonToDatabaseValue
Parameters
value: unknown
optionalcontext: TransformContext
Returns unknown
inheritedconvertJsonToJSValue
Parameters
value: unknown
prop: EntityProperty<any, any>
Returns unknown
convertsJsonAutomatically
Returns boolean
inheriteddenormalizePrimaryKey
Parameters
data: IPrimaryKeyValue
Returns IPrimaryKeyValue
inheritedescape
Parameters
value: any
Returns string
inheritedextractSimpleType
Parameters
type: string
Returns string
inheritedformatQuery
Parameters
sql: string
params: readonly any[]
Returns string
inheritedgenerateCustomOrder
Generates a custom order by statement given a set of in order values, eg. ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END)
Parameters
escapedColumn: string
values: unknown[]
Returns string
inheritedgetArrayDeclarationSQL
Returns string
inheritedgetBigIntTypeDeclarationSQL
Parameters
column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
optionalautoincrement: boolean
optionallength: number
optionalunsigned: boolean
Returns string
inheritedgetBlobDeclarationSQL
Returns string
getBooleanTypeDeclarationSQL
Returns string
getCharTypeDeclarationSQL
Parameters
column: { length?: number }
optionallength: number
Returns string
inheritedgetConfig
getCurrentTimestampSQL
Returns the SQL specific for the platform to get the current timestamp
Parameters
length: number
Returns string
getDateTimeTypeDeclarationSQL
Parameters
column: { length: number }
length: number
Returns string
inheritedgetDateTypeDeclarationSQL
Parameters
optionallength: number
Returns string
inheritedgetDecimalTypeDeclarationSQL
Parameters
column: { precision?: number; scale?: number }
optionalprecision: number
optionalscale: number
Returns string
inheritedgetDefaultCharLength
Returns number
inheritedgetDefaultCharset
Returns string
inheritedgetDefaultDateTimeLength
Returns number
inheritedgetDefaultMappedType
Parameters
type: string
Returns Type<unknown, unknown>
getDefaultPrimaryName
Parameters
tableName: string
columns: string[]
Returns string
inheritedgetDefaultSchemaName
Returns undefined | string
inheritedgetDefaultVarcharLength
Returns number
inheritedgetDefaultVersionLength
Returns number
inheritedgetDoubleDeclarationSQL
Returns string
getEnumTypeDeclarationSQL
Parameters
column: { autoincrement?: boolean; fieldNames: string[]; items?: unknown[]; length?: number; unsigned?: boolean }
optionalautoincrement: boolean
fieldNames: string[]
optionalitems: unknown[]
optionallength: number
optionalunsigned: boolean
Returns string
inheritedgetExceptionConverter
Returns ExceptionConverter
inheritedgetExtension
Parameters
extensionName: string
extensionKey: string
moduleName: string
em: EntityManager<IDatabaseDriver<Connection>>
Returns T
getFloatDeclarationSQL
Returns string
inheritedgetFullTextIndexExpression
Parameters
indexName: string
schemaName: undefined | string
tableName: string
columns: SimpleColumnMeta[]
Returns string
getFullTextWhereClause
Returns string
getIndexName
Returns the default name of index for the given columns
Parameters
tableName: string
columns: string[]
type: primary | index | unique | foreign | sequence
Returns string
getIntegerTypeDeclarationSQL
Parameters
column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
optionalautoincrement: boolean
optionallength: number
optionalunsigned: boolean
Returns string
inheritedgetIntervalTypeDeclarationSQL
Parameters
column: { length?: number }
optionallength: number
Returns string
inheritedgetJsonDeclarationSQL
Returns string
inheritedgetJsonIndexDefinition
Parameters
index: IndexDef
Returns string[]
inheritedgetMappedType
Parameters
type: string
Returns Type<unknown, unknown>
inheritedgetMediumIntTypeDeclarationSQL
Parameters
column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
optionalautoincrement: boolean
optionallength: number
optionalunsigned: boolean
Returns string
inheritedgetNamingStrategy
Returns new () => NamingStrategy
Returns NamingStrategy
inheritedgetRegExpOperator
Parameters
optionalval: unknown
optionalflags: string
Returns string
inheritedgetRegExpValue
Parameters
val: RegExp
Returns { $flags?: string; $re: string }
optional$flags?: string
$re: string
inheritedgetRepositoryClass
Returns Constructor<EntityRepository<T>>
inheritedgetSchemaGenerator
Parameters
driver: IDatabaseDriver<Connection>
optionalem: EntityManager<IDatabaseDriver<Connection>>
Returns SqlSchemaGenerator
inheritedgetSchemaHelper
Returns undefined | SchemaHelper
inheritedgetSearchJsonPropertyKey
Parameters
path: string[]
type: string
aliased: boolean
optionalvalue: unknown
Returns string
inheritedgetSearchJsonPropertySQL
Parameters
path: string
type: string
aliased: boolean
Returns string
inheritedgetSerializedPrimaryKeyField
Used when serializing via toObject and toJSON methods, allows to use different PK field name (like
id
instead of_id
)Parameters
field: string
Returns string
getSmallIntTypeDeclarationSQL
Parameters
column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
optionalautoincrement: boolean
optionallength: number
optionalunsigned: boolean
Returns string
inheritedgetTextTypeDeclarationSQL
Parameters
_column: { length?: number }
optionallength: number
Returns string
inheritedgetTimeTypeDeclarationSQL
Parameters
optionallength: number
Returns string
inheritedgetTimezone
Returns undefined | string
getTinyIntTypeDeclarationSQL
Parameters
column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
optionalautoincrement: boolean
optionallength: number
optionalunsigned: boolean
Returns string
inheritedgetUuidTypeDeclarationSQL
Parameters
column: { length?: number }
optionallength: number
Returns string
getVarcharTypeDeclarationSQL
Parameters
column: { length?: number }
optionallength: number
Returns string
inheritedindexForeignKeys
Returns boolean
inheritedisAllowedTopLevelOperator
Parameters
operator: string
Returns boolean
inheritedisBigIntProperty
Parameters
prop: EntityProperty<any, any>
Returns boolean
inheritedisNumericColumn
Parameters
mappedType: Type<unknown, unknown>
Returns boolean
inheritedisNumericProperty
Parameters
prop: EntityProperty<any, any>
ignoreCustomType: boolean = false
Returns boolean
inheritedisPopulated
Parameters
key: string
populate: boolean | PopulateOptions<T>[]
Returns boolean
inheritedisRaw
Parameters
value: any
Returns boolean
inheritedlookupExtensions
Allows registering extensions of the driver automatically (e.g.
SchemaGenerator
extension in SQL drivers).Parameters
Returns void
inheritedmarshallArray
Parameters
values: string[]
Returns string
normalizeColumnType
This should be used only to compare types, it can strip some information like the length.
Parameters
type: string
options: { length?: number; precision?: number; scale?: number } = {}
optionallength: number
optionalprecision: number
optionalscale: number
Returns string
inheritednormalizePrimaryKey
Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string)
Parameters
data: IPrimaryKeyValue | Primary<T>
Returns T
inheritedparseDate
Parameters
value: string | number
Returns Date
processDateProperty
This is used to narrow the value of Date properties as they will be stored as timestamps in sqlite. We use this method to convert Dates to timestamps when computing the changeset, so we have the right data type in the payload as well as in original entity data. Without that, we would end up with diffs including all Date properties, as we would be comparing Date object with timestamp.
Parameters
value: unknown
Returns string | number | Date
inheritedquoteIdentifier
Parameters
id: string
quote: string = '`'
Returns string
quoteValue
Parameters
value: any
Returns string
quoteVersionValue
Parameters
value: number | Date
prop: EntityProperty<any, any>
Returns string | number | Date
inheritedsetConfig
Parameters
Returns void
inheritedshouldHaveColumn
Parameters
prop: EntityProperty<T, any>
populate: boolean | PopulateOptions<T>[]
optionalexclude: string[]
includeFormulas: boolean = true
Returns boolean
inheritedsupportsCreatingFullTextIndex
Returns boolean
inheritedsupportsCustomPrimaryKeyNames
Returns boolean
supportsDownMigrations
Currently not supported due to how knex does complex sqlite diffing (always based on current schema)
Returns boolean
inheritedsupportsMultipleCascadePaths
Returns boolean
inheritedsupportsMultipleStatements
Returns boolean
inheritedsupportsNativeEnums
for postgres native enums
Returns boolean
inheritedsupportsSchemas
Returns boolean
inheritedsupportsTransactions
Returns boolean
inheritedsupportsUnsigned
Returns boolean
inheritedunmarshallArray
Parameters
value: string
Returns string[]
inheritedusesBatchInserts
Whether or not the driver supports retuning list of created PKs back when multi-inserting
Returns boolean
inheritedusesBatchUpdates
Whether or not the driver supports updating many records at once
Returns boolean
inheritedusesCascadeStatement
Returns boolean
usesDefaultKeyword
Returns boolean
inheritedusesDifferentSerializedPrimaryKey
Returns boolean
inheritedusesImplicitTransactions
Returns boolean
inheritedusesOutputStatement
Returns boolean
inheritedusesPivotTable
Returns boolean
usesReturningStatement
Returns boolean
inheritedvalidateMetadata
Parameters
meta: EntityMetadata<any>
Returns void
Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId)