#
Class: AbstractSqlPlatformknex.AbstractSqlPlatform
#
Hierarchy↳ AbstractSqlPlatform
#
Constructors#
constructor+ new AbstractSqlPlatform(): AbstractSqlPlatform
Returns: AbstractSqlPlatform
Inherited from: Platform
#
Properties#
config• Protected
config: Configuration<IDatabaseDriver<Connection>>
Inherited from: Platform.config
Defined in: packages/core/src/platforms/Platform.ts:11
#
exceptionConverter• Protected
Readonly
exceptionConverter: ExceptionConverter
Inherited from: Platform.exceptionConverter
Defined in: packages/core/src/platforms/Platform.ts:10
#
schemaHelper• Protected
Optional
Readonly
schemaHelper: undefined | SchemaHelper
Defined in: packages/knex/src/AbstractSqlPlatform.ts:8
#
timezone• Protected
Optional
timezone: undefined | string
Inherited from: Platform.timezone
Defined in: packages/core/src/platforms/Platform.ts:12
#
Methods#
allowsComparingTuplesâ–¸ allowsComparingTuples(): boolean
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:120
#
allowsMultiInsertâ–¸ allowsMultiInsert(): boolean
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:46
#
allowsUniqueBatchUpdatesâ–¸ allowsUniqueBatchUpdates(): boolean
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:124
#
convertsJsonAutomaticallyâ–¸ convertsJsonAutomatically(marshall?
: boolean): boolean
#
Parameters:Name | Type | Default value |
---|---|---|
marshall | boolean | false |
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:168
#
denormalizePrimaryKeyâ–¸ denormalizePrimaryKey(data
: IPrimaryKeyValue): IPrimaryKeyValue
Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId)
#
Parameters:Name | Type |
---|---|
data | IPrimaryKeyValue |
Returns: IPrimaryKeyValue
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:78
#
formatQueryâ–¸ formatQuery(sql
: string, params
: readonly any[]): string
#
Parameters:Name | Type |
---|---|
sql | string |
params | readonly any[] |
Returns: string
Defined in: packages/knex/src/AbstractSqlPlatform.ts:36
#
getArrayDeclarationSQLâ–¸ getArrayDeclarationSQL(): string
Returns: string
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:140
#
getBigIntTypeDeclarationSQLâ–¸ getBigIntTypeDeclarationSQL(): string
Returns: string
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:136
#
getBlobDeclarationSQLâ–¸ getBlobDeclarationSQL(): string
Returns: string
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:156
#
getCurrentTimestampSQLâ–¸ getCurrentTimestampSQL(length
: number): string
Returns the SQL specific for the platform to get the current timestamp
#
Parameters:Name | Type |
---|---|
length | number |
Returns: string
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:96
#
getDateTypeDeclarationSQLâ–¸ getDateTypeDeclarationSQL(length
: number): string
#
Parameters:Name | Type |
---|---|
length | number |
Returns: string
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:100
#
getDefaultCharsetâ–¸ getDefaultCharset(): string
Returns: string
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:176
#
getExceptionConverterâ–¸ getExceptionConverter(): ExceptionConverter
Returns: ExceptionConverter
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:180
#
getJsonDeclarationSQLâ–¸ getJsonDeclarationSQL(): string
Returns: string
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:160
#
getNamingStrategyâ–¸ getNamingStrategy(): function
Returns: function
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:26
#
getRegExpOperatorâ–¸ getRegExpOperator(): string
Returns: string
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:108
#
getRepositoryClassâ–¸ getRepositoryClass<T>(): Constructor<EntityRepository<T>>
#
Type parameters:Name |
---|
T |
Returns: Constructor<EntityRepository<T>>
Overrides: Platform
Defined in: packages/knex/src/AbstractSqlPlatform.ts:14
#
getSchemaGeneratorâ–¸ getSchemaGenerator(em
: EntityManager<IDatabaseDriver<Connection>>): SchemaGenerator
#
Parameters:Name | Type |
---|---|
em | EntityManager<IDatabaseDriver<Connection>> |
Returns: SchemaGenerator
Overrides: Platform
Defined in: packages/knex/src/AbstractSqlPlatform.ts:22
#
getSchemaHelperâ–¸ getSchemaHelper(): undefined | SchemaHelper
Returns: undefined | SchemaHelper
Overrides: Platform
Defined in: packages/knex/src/AbstractSqlPlatform.ts:18
#
getSearchJsonPropertySQLâ–¸ getSearchJsonPropertySQL(path
: string): string
#
Parameters:Name | Type |
---|---|
path | string |
Returns: string
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:164
#
getSerializedPrimaryKeyFieldâ–¸ getSerializedPrimaryKeyField(field
: string): string
Used when serializing via toObject and toJSON methods, allows to use different PK field name (like id
instead of _id
)
#
Parameters:Name | Type |
---|---|
field | string |
Returns: string
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:85
#
getTimeTypeDeclarationSQLâ–¸ getTimeTypeDeclarationSQL(length
: number): string
#
Parameters:Name | Type |
---|---|
length | number |
Returns: string
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:104
#
isBigIntPropertyâ–¸ isBigIntProperty(prop
: EntityProperty<any>): boolean
#
Parameters:Name | Type |
---|---|
prop | EntityProperty<any> |
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:128
#
isRawâ–¸ isRaw(value
: any): boolean
#
Parameters:Name | Type |
---|---|
value | any |
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:132
#
marshallArrayâ–¸ marshallArray(values
: string[]): string
#
Parameters:Name | Type |
---|---|
values | string[] |
Returns: string
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:144
#
normalizePrimaryKeyâ–¸ normalizePrimaryKey<T>(data
: string | number | bigint | Date | { toHexString
: () => string } | Primary<T>): T
Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string)
#
Type parameters:Name | Type | Default |
---|---|---|
T | string | number | string \ |
#
Parameters:Name | Type |
---|---|
data | string | number | bigint | Date | { toHexString : () => string } | Primary<T> |
Returns: T
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:71
#
processDatePropertyâ–¸ processDateProperty(value
: unknown): string | number | Date
#
Parameters:Name | Type |
---|---|
value | unknown |
Returns: string | number | Date
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:188
#
quoteIdentifierâ–¸ quoteIdentifier(id
: string, quote?
: string): string
#
Parameters:Name | Type | Default value |
---|---|---|
id | string | - |
quote | string | '`' |
Returns: string
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:192
#
quoteValueâ–¸ quoteValue(value
: any): string
#
Parameters:Name | Type |
---|---|
value | any |
Returns: string
Defined in: packages/knex/src/AbstractSqlPlatform.ts:26
#
quoteVersionValueâ–¸ quoteVersionValue(value
: number | Date, prop
: EntityProperty<any>): string | number | Date
#
Parameters:Name | Type |
---|---|
value | number | Date |
prop | EntityProperty<any> |
Returns: string | number | Date
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:112
#
requiresNullableForAlteringColumnâ–¸ requiresNullableForAlteringColumn(): boolean
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:42
#
requiresValuesKeywordâ–¸ requiresValuesKeyword(): boolean
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:116
#
setConfigâ–¸ setConfig(config
: Configuration<IDatabaseDriver<Connection>>): void
#
Parameters:Name | Type |
---|---|
config | Configuration<IDatabaseDriver<Connection>> |
Returns: void
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:196
#
supportsTransactionsâ–¸ supportsTransactions(): boolean
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:18
#
unmarshallArrayâ–¸ unmarshallArray(value
: string): string[]
#
Parameters:Name | Type |
---|---|
value | string |
Returns: string[]
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:148
#
usesBatchInsertsâ–¸ usesBatchInserts(): boolean
Whether or not the driver supports retuning list of created PKs back when multi-inserting
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:53
#
usesBatchUpdatesâ–¸ usesBatchUpdates(): boolean
Whether or not the driver supports updating many records at once
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:60
#
usesCascadeStatementâ–¸ usesCascadeStatement(): boolean
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:34
#
usesDefaultKeywordâ–¸ usesDefaultKeyword(): boolean
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:64
#
usesDifferentSerializedPrimaryKeyâ–¸ usesDifferentSerializedPrimaryKey(): boolean
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:89
#
usesImplicitTransactionsâ–¸ usesImplicitTransactions(): boolean
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:22
#
usesPivotTableâ–¸ usesPivotTable(): boolean
Returns: boolean
Overrides: Platform
Defined in: packages/knex/src/AbstractSqlPlatform.ts:10
#
usesReturningStatementâ–¸ usesReturningStatement(): boolean
Returns: boolean
Inherited from: Platform
Defined in: packages/core/src/platforms/Platform.ts:30