abstractAbstractSqlPlatform
Hierarchy
- Platform
- AbstractSqlPlatform
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 AbstractSqlPlatform
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
inheritedconvertsJsonAutomatically
Returns boolean
inheriteddenormalizePrimaryKey
Parameters
data: IPrimaryKeyValue
Returns IPrimaryKeyValue
escape
Parameters
value: any
Returns string
inheritedextractSimpleType
Parameters
type: string
Returns string
inheritedformatQuery
Parameters
sql: string
params: readonly any[]
Returns string
generateCustomOrder
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
inheritedgetBooleanTypeDeclarationSQL
Returns string
inheritedgetCharTypeDeclarationSQL
Parameters
column: { length?: number }
optionallength: number
Returns string
inheritedgetConfig
inheritedgetCurrentTimestampSQL
Returns the SQL specific for the platform to get the current timestamp
Parameters
optionallength: number
Returns string
inheritedgetDateTimeTypeDeclarationSQL
Parameters
column: { length?: number }
optionallength: 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>
inheritedgetDefaultPrimaryName
Parameters
tableName: string
columns: string[]
Returns string
inheritedgetDefaultSchemaName
Returns undefined | string
inheritedgetDefaultVarcharLength
Returns number
inheritedgetDefaultVersionLength
Returns number
inheritedgetDoubleDeclarationSQL
Returns string
inheritedgetEnumTypeDeclarationSQL
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
inheritedgetFloatDeclarationSQL
Returns string
inheritedgetFullTextIndexExpression
Parameters
indexName: string
schemaName: undefined | string
tableName: string
columns: SimpleColumnMeta[]
Returns string
inheritedgetFullTextWhereClause
Parameters
prop: EntityProperty<any, any>
Returns string
inheritedgetIndexName
Returns the default name of index for the given columns
Parameters
tableName: string
columns: string[]
type: primary | index | unique | foreign | sequence
Returns string
inheritedgetIntegerTypeDeclarationSQL
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
getJsonIndexDefinition
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
getRepositoryClass
Returns Constructor<EntityRepository<T>>
getSchemaGenerator
Parameters
driver: IDatabaseDriver<Connection>
optionalem: EntityManager<IDatabaseDriver<Connection>>
Returns SqlSchemaGenerator
getSchemaHelper
Returns undefined | SchemaHelper
getSearchJsonPropertyKey
Parameters
path: string[]
type: string
aliased: boolean
optionalvalue: unknown
Returns string
getSearchJsonPropertySQL
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
inheritedgetSmallIntTypeDeclarationSQL
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
inheritedgetTinyIntTypeDeclarationSQL
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
inheritedgetVarcharTypeDeclarationSQL
Parameters
column: { length?: number }
optionallength: number
Returns string
indexForeignKeys
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
isRaw
Parameters
value: any
Returns boolean
lookupExtensions
Allows registering extensions of the driver automatically (e.g.
SchemaGenerator
extension in SQL drivers).Parameters
Returns void
inheritedmarshallArray
Parameters
values: string[]
Returns string
inheritednormalizeColumnType
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
inheritedprocessDateProperty
Parameters
value: unknown
Returns string | number | Date
inheritedquoteIdentifier
Parameters
id: string
quote: string = '`'
Returns string
quoteValue
Parameters
value: any
Returns string
inheritedquoteVersionValue
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
inheritedsupportsDownMigrations
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
supportsSchemas
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
inheritedusesDefaultKeyword
Returns boolean
inheritedusesDifferentSerializedPrimaryKey
Returns boolean
inheritedusesImplicitTransactions
Returns boolean
inheritedusesOutputStatement
Returns boolean
usesPivotTable
Returns boolean
inheritedusesReturningStatement
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)