Version: 4.2

Class: Platform

Hierarchy#

  • Platform

Properties#

config#

Protected config: Configuration

Defined in packages/core/src/platforms/Platform.ts:11


exceptionConverter#

Protected Readonly exceptionConverter: ExceptionConverter = new ExceptionConverter()

Defined in packages/core/src/platforms/Platform.ts:10


timezone#

Protected Optional timezone: string

Defined in packages/core/src/platforms/Platform.ts:12

Methods#

allowsMultiInsert#

allowsMultiInsert(): boolean

Defined in packages/core/src/platforms/Platform.ts:46

Returns: boolean


convertsJsonAutomatically#

convertsJsonAutomatically(marshall?: boolean): boolean

Defined in packages/core/src/platforms/Platform.ts:152

Parameters:#

NameTypeDefault value
marshallbooleanfalse

Returns: boolean


denormalizePrimaryKey#

denormalizePrimaryKey(data: IPrimaryKey): IPrimaryKey

Defined in packages/core/src/platforms/Platform.ts:78

Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId)

Parameters:#

NameType
dataIPrimaryKey

Returns: IPrimaryKey


getArrayDeclarationSQL#

getArrayDeclarationSQL(): string

Defined in packages/core/src/platforms/Platform.ts:128

Returns: string


getBigIntTypeDeclarationSQL#

getBigIntTypeDeclarationSQL(): string

Defined in packages/core/src/platforms/Platform.ts:124

Returns: string


getBlobDeclarationSQL#

getBlobDeclarationSQL(): string

Defined in packages/core/src/platforms/Platform.ts:140

Returns: string


getCurrentTimestampSQL#

getCurrentTimestampSQL(length: number): string

Defined in packages/core/src/platforms/Platform.ts:96

Returns the SQL specific for the platform to get the current timestamp

Parameters:#

NameType
lengthnumber

Returns: string


getDateTypeDeclarationSQL#

getDateTypeDeclarationSQL(length: number): string

Defined in packages/core/src/platforms/Platform.ts:100

Parameters:#

NameType
lengthnumber

Returns: string


getDefaultCharset#

getDefaultCharset(): string

Defined in packages/core/src/platforms/Platform.ts:160

Returns: string


getExceptionConverter#

getExceptionConverter(): ExceptionConverter

Defined in packages/core/src/platforms/Platform.ts:164

Returns: ExceptionConverter


getJsonDeclarationSQL#

getJsonDeclarationSQL(): string

Defined in packages/core/src/platforms/Platform.ts:144

Returns: string


getNamingStrategy#

getNamingStrategy(): object

Defined in packages/core/src/platforms/Platform.ts:26

Returns: object

NameType
constructor() => NamingStrategy

getRegExpOperator#

getRegExpOperator(): string

Defined in packages/core/src/platforms/Platform.ts:108

Returns: string


getRepositoryClass#

getRepositoryClass<T>(): Constructor<EntityRepository<T>>

Defined in packages/core/src/platforms/Platform.ts:156

Type parameters:#

Name
T

Returns: Constructor<EntityRepository<T>>


getSchemaGenerator#

getSchemaGenerator(em: EntityManager): ISchemaGenerator

Defined in packages/core/src/platforms/Platform.ts:168

Parameters:#

NameType
emEntityManager

Returns: ISchemaGenerator


getSchemaHelper#

getSchemaHelper(): { getTypeDefinition: (prop: EntityProperty, types?: Dictionary<string[]>, lengths?: Dictionary<number>, allowZero?: boolean) => string } | undefined

Defined in packages/core/src/platforms/Platform.ts:38

Returns: { getTypeDefinition: (prop: EntityProperty, types?: Dictionary<string[]>, lengths?: Dictionary<number>, allowZero?: boolean) => string } | undefined


getSearchJsonPropertySQL#

getSearchJsonPropertySQL(path: string): string

Defined in packages/core/src/platforms/Platform.ts:148

Parameters:#

NameType
pathstring

Returns: string


getSerializedPrimaryKeyField#

getSerializedPrimaryKeyField(field: string): string

Defined in packages/core/src/platforms/Platform.ts:85

Used when serializing via toObject and toJSON methods, allows to use different PK field name (like id instead of _id)

Parameters:#

NameType
fieldstring

Returns: string


getTimeTypeDeclarationSQL#

getTimeTypeDeclarationSQL(length: number): string

Defined in packages/core/src/platforms/Platform.ts:104

Parameters:#

NameType
lengthnumber

Returns: string


isBigIntProperty#

isBigIntProperty(prop: EntityProperty): boolean

Defined in packages/core/src/platforms/Platform.ts:120

Parameters:#

NameType
propEntityProperty

Returns: boolean


marshallArray#

marshallArray(values: string[]): string

Defined in packages/core/src/platforms/Platform.ts:132

Parameters:#

NameType
valuesstring[]

Returns: string


normalizePrimaryKey#

normalizePrimaryKey<T>(data: Primary<T> | IPrimaryKey): T

Defined in packages/core/src/platforms/Platform.ts:71

Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string)

Type parameters:#

NameTypeDefault
Tnumber | stringnumber \

Parameters:#

NameType
dataPrimary<T> | IPrimaryKey

Returns: T


processDateProperty#

processDateProperty(value: unknown): string | number | Date

Defined in packages/core/src/platforms/Platform.ts:172

Parameters:#

NameType
valueunknown

Returns: string | number | Date


quoteIdentifier#

quoteIdentifier(id: string, quote?: string): string

Defined in packages/core/src/platforms/Platform.ts:176

Parameters:#

NameTypeDefault value
idstring-
quotestring"`"

Returns: string


quoteVersionValue#

quoteVersionValue(value: Date | number, prop: EntityProperty): Date | string | number

Defined in packages/core/src/platforms/Platform.ts:112

Parameters:#

NameType
valueDate | number
propEntityProperty

Returns: Date | string | number


requiresNullableForAlteringColumn#

requiresNullableForAlteringColumn(): boolean

Defined in packages/core/src/platforms/Platform.ts:42

Returns: boolean


requiresValuesKeyword#

requiresValuesKeyword(): boolean

Defined in packages/core/src/platforms/Platform.ts:116

Returns: boolean


setConfig#

setConfig(config: Configuration): void

Defined in packages/core/src/platforms/Platform.ts:180

Parameters:#

NameType
configConfiguration

Returns: void


supportsTransactions#

supportsTransactions(): boolean

Defined in packages/core/src/platforms/Platform.ts:18

Returns: boolean


unmarshallArray#

unmarshallArray(value: string): string[]

Defined in packages/core/src/platforms/Platform.ts:136

Parameters:#

NameType
valuestring

Returns: string[]


usesBatchInserts#

usesBatchInserts(): boolean

Defined in packages/core/src/platforms/Platform.ts:53

Whether or not the driver supports retuning list of created PKs back when multi-inserting

Returns: boolean


usesBatchUpdates#

usesBatchUpdates(): boolean

Defined in packages/core/src/platforms/Platform.ts:60

Whether or not the driver supports updating many records at once

Returns: boolean


usesCascadeStatement#

usesCascadeStatement(): boolean

Defined in packages/core/src/platforms/Platform.ts:34

Returns: boolean


usesDefaultKeyword#

usesDefaultKeyword(): boolean

Defined in packages/core/src/platforms/Platform.ts:64

Returns: boolean


usesDifferentSerializedPrimaryKey#

usesDifferentSerializedPrimaryKey(): boolean

Defined in packages/core/src/platforms/Platform.ts:89

Returns: boolean


usesImplicitTransactions#

usesImplicitTransactions(): boolean

Defined in packages/core/src/platforms/Platform.ts:22

Returns: boolean


usesPivotTable#

usesPivotTable(): boolean

Defined in packages/core/src/platforms/Platform.ts:14

Returns: boolean


usesReturningStatement#

usesReturningStatement(): boolean

Defined in packages/core/src/platforms/Platform.ts:30

Returns: boolean

Last updated on by Renovate Bot