Version: 4.3

Class: PostgreSqlPlatform

Hierarchy

  • AbstractSqlPlatform

    PostgreSqlPlatform

Properties

config

Protected config: Configuration

Inherited from AbstractSqlPlatform.config

Defined in packages/core/dist/platforms/Platform.d.ts:9


exceptionConverter

Protected Readonly exceptionConverter: PostgreSqlExceptionConverter = new PostgreSqlExceptionConverter()

Overrides AbstractSqlPlatform.exceptionConverter

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:10


schemaHelper

Protected Readonly schemaHelper: PostgreSqlSchemaHelper = new PostgreSqlSchemaHelper()

Overrides void

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:9


timezone

Protected Optional timezone: string

Inherited from AbstractSqlPlatform.timezone

Defined in packages/core/dist/platforms/Platform.d.ts:10

Methods

allowsMultiInsert

allowsMultiInsert(): boolean

Inherited from AbstractSqlPlatform.allowsMultiInsert

Defined in packages/core/dist/platforms/Platform.d.ts:23

Returns: boolean


allowsUniqueBatchUpdates

allowsUniqueBatchUpdates(): boolean

Overrides AbstractSqlPlatform.allowsUniqueBatchUpdates

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:25

Postgres will complain if we try to batch update uniquely constrained property (moving the value from one entity to another). This flag will result in postponing 1:1 updates (removing them from the batched query).

see https://stackoverflow.com/questions/5403437/atomic-multi-row-update-with-a-unique-constraint

Returns: boolean


convertsJsonAutomatically

convertsJsonAutomatically(marshall?: boolean): boolean

Inherited from AbstractSqlPlatform.convertsJsonAutomatically

Defined in packages/core/dist/platforms/Platform.d.ts:64

Parameters:

NameType
marshall?boolean

Returns: boolean


denormalizePrimaryKey

denormalizePrimaryKey(data: IPrimaryKey): IPrimaryKey

Inherited from AbstractSqlPlatform.denormalizePrimaryKey

Defined in packages/core/dist/platforms/Platform.d.ts:40

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

Parameters:

NameType
dataIPrimaryKey

Returns: IPrimaryKey


formatQuery

formatQuery(sql: string, params: readonly any[]): string

Inherited from MySqlPlatform.formatQuery

Defined in packages/knex/dist/AbstractSqlPlatform.d.ts:10

Parameters:

NameType
sqlstring
paramsreadonly any[]

Returns: string


getArrayDeclarationSQL

getArrayDeclarationSQL(): string

Overrides AbstractSqlPlatform.getArrayDeclarationSQL

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:45

Returns: string


getBigIntTypeDeclarationSQL

getBigIntTypeDeclarationSQL(): string

Inherited from AbstractSqlPlatform.getBigIntTypeDeclarationSQL

Defined in packages/core/dist/platforms/Platform.d.ts:57

Returns: string


getBlobDeclarationSQL

getBlobDeclarationSQL(): string

Overrides AbstractSqlPlatform.getBlobDeclarationSQL

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:53

Returns: string


getCurrentTimestampSQL

getCurrentTimestampSQL(length: number): string

Overrides AbstractSqlPlatform.getCurrentTimestampSQL

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:29

Parameters:

NameType
lengthnumber

Returns: string


getDateTypeDeclarationSQL

getDateTypeDeclarationSQL(length: number): string

Inherited from AbstractSqlPlatform.getDateTypeDeclarationSQL

Defined in packages/core/dist/platforms/Platform.d.ts:50

Parameters:

NameType
lengthnumber

Returns: string


getDefaultCharset

getDefaultCharset(): string

Inherited from AbstractSqlPlatform.getDefaultCharset

Defined in packages/core/dist/platforms/Platform.d.ts:66

Returns: string


getExceptionConverter

getExceptionConverter(): ExceptionConverter

Inherited from AbstractSqlPlatform.getExceptionConverter

Defined in packages/core/dist/platforms/Platform.d.ts:67

Returns: ExceptionConverter


getJsonDeclarationSQL

getJsonDeclarationSQL(): string

Overrides AbstractSqlPlatform.getJsonDeclarationSQL

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:57

Returns: string


getNamingStrategy

getNamingStrategy(): object

Inherited from AbstractSqlPlatform.getNamingStrategy

Defined in packages/core/dist/platforms/Platform.d.ts:14

Returns: object

NameType
constructor() => NamingStrategy

getRegExpOperator

getRegExpOperator(): string

Overrides AbstractSqlPlatform.getRegExpOperator

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:37

Returns: string


getRepositoryClass

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

Inherited from MySqlPlatform.getRepositoryClass

Overrides void

Defined in packages/knex/dist/AbstractSqlPlatform.d.ts:6

Type parameters:

Name
T

Returns: Constructor<EntityRepository<T>>


getSchemaGenerator

getSchemaGenerator(em: EntityManager): SchemaGenerator

Inherited from MySqlPlatform.getSchemaGenerator

Overrides MongoPlatform.getSchemaGenerator

Defined in packages/knex/dist/AbstractSqlPlatform.d.ts:8

Parameters:

NameType
emEntityManager

Returns: SchemaGenerator


getSchemaHelper

getSchemaHelper(): SchemaHelper | undefined

Inherited from MySqlPlatform.getSchemaHelper

Overrides MongoPlatform.getSchemaHelper

Defined in packages/knex/dist/AbstractSqlPlatform.d.ts:7

Returns: SchemaHelper | undefined


getSearchJsonPropertySQL

getSearchJsonPropertySQL(path: string): string

Inherited from AbstractSqlPlatform.getSearchJsonPropertySQL

Defined in packages/core/dist/platforms/Platform.d.ts:63

Parameters:

NameType
pathstring

Returns: string


getSerializedPrimaryKeyField

getSerializedPrimaryKeyField(field: string): string

Inherited from AbstractSqlPlatform.getSerializedPrimaryKeyField

Defined in packages/core/dist/platforms/Platform.d.ts:44

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(): string

Overrides AbstractSqlPlatform.getTimeTypeDeclarationSQL

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:33

Returns: string


isBigIntProperty

isBigIntProperty(prop: EntityProperty): boolean

Overrides AbstractSqlPlatform.isBigIntProperty

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:41

Parameters:

NameType
propEntityProperty

Returns: boolean


marshallArray

marshallArray(values: string[]): string

Overrides AbstractSqlPlatform.marshallArray

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:49

Parameters:

NameType
valuesstring[]

Returns: string


normalizePrimaryKey

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

Inherited from AbstractSqlPlatform.normalizePrimaryKey

Defined in packages/core/dist/platforms/Platform.d.ts:36

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

Inherited from AbstractSqlPlatform.processDateProperty

Defined in packages/core/dist/platforms/Platform.d.ts:69

Parameters:

NameType
valueunknown

Returns: string | number | Date


quoteIdentifier

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

Overrides AbstractSqlPlatform.quoteIdentifier

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:61

Parameters:

NameTypeDefault value
idstring-
quotestring"""

Returns: string


quoteValue

quoteValue(value: any): string

Overrides MySqlPlatform.quoteValue

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:65

Parameters:

NameType
valueany

Returns: string


quoteVersionValue

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

Inherited from AbstractSqlPlatform.quoteVersionValue

Defined in packages/core/dist/platforms/Platform.d.ts:53

Parameters:

NameType
valueDate | number
propEntityProperty

Returns: Date | string | number


requiresNullableForAlteringColumn

requiresNullableForAlteringColumn(): boolean

Inherited from AbstractSqlPlatform.requiresNullableForAlteringColumn

Defined in packages/core/dist/platforms/Platform.d.ts:22

Returns: boolean


requiresValuesKeyword

requiresValuesKeyword(): boolean

Inherited from AbstractSqlPlatform.requiresValuesKeyword

Defined in packages/core/dist/platforms/Platform.d.ts:54

Returns: boolean


setConfig

setConfig(config: Configuration): void

Inherited from AbstractSqlPlatform.setConfig

Defined in packages/core/dist/platforms/Platform.d.ts:71

Parameters:

NameType
configConfiguration

Returns: void


supportsTransactions

supportsTransactions(): boolean

Inherited from AbstractSqlPlatform.supportsTransactions

Defined in packages/core/dist/platforms/Platform.d.ts:12

Returns: boolean


unmarshallArray

unmarshallArray(value: string): string[]

Inherited from AbstractSqlPlatform.unmarshallArray

Defined in packages/core/dist/platforms/Platform.d.ts:60

Parameters:

NameType
valuestring

Returns: string[]


usesBatchInserts

usesBatchInserts(): boolean

Inherited from AbstractSqlPlatform.usesBatchInserts

Defined in packages/core/dist/platforms/Platform.d.ts:27

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

Returns: boolean


usesBatchUpdates

usesBatchUpdates(): boolean

Inherited from AbstractSqlPlatform.usesBatchUpdates

Defined in packages/core/dist/platforms/Platform.d.ts:31

Whether or not the driver supports updating many records at once

Returns: boolean


usesCascadeStatement

usesCascadeStatement(): boolean

Overrides AbstractSqlPlatform.usesCascadeStatement

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:16

Returns: boolean


usesDefaultKeyword

usesDefaultKeyword(): boolean

Inherited from AbstractSqlPlatform.usesDefaultKeyword

Defined in packages/core/dist/platforms/Platform.d.ts:32

Returns: boolean


usesDifferentSerializedPrimaryKey

usesDifferentSerializedPrimaryKey(): boolean

Inherited from AbstractSqlPlatform.usesDifferentSerializedPrimaryKey

Defined in packages/core/dist/platforms/Platform.d.ts:45

Returns: boolean


usesImplicitTransactions

usesImplicitTransactions(): boolean

Inherited from AbstractSqlPlatform.usesImplicitTransactions

Defined in packages/core/dist/platforms/Platform.d.ts:13

Returns: boolean


usesPivotTable

usesPivotTable(): boolean

Inherited from MySqlPlatform.usesPivotTable

Overrides MongoPlatform.usesPivotTable

Defined in packages/knex/dist/AbstractSqlPlatform.d.ts:5

Returns: boolean


usesReturningStatement

usesReturningStatement(): boolean

Overrides AbstractSqlPlatform.usesReturningStatement

Defined in packages/postgresql/src/PostgreSqlPlatform.ts:12

Returns: boolean

Last updated on by Martin Adámek