Skip to main content

Class: CompatibilityError

TypeScript 0.4.0 · Source commit cbff27b8a34e1384384018680e46c20d5c610cc9. Generated with reviewed comment corrections; see generation notes.


Defined in: errors.ts:112

CompatibilityError is thrown by Connection.connect() when the database's PostgreMQ schema has an mq major this client does not support (see SUPPORTED_MQ_MAJORS), reports no schema version, or has no discovery function (postgremq.info()) and needs an installation or upgrade. Mirrors the Go client's CompatibilityError / ErrIncompatibleSchema.

Pure client-side error (no SQLSTATE), so it carries no code; when discovery is missing, cause is the database error.

Extends​

  • Error

Constructors​

Constructor​

new CompatibilityError(details): CompatibilityError

Defined in: errors.ts:123

Parameters​

details​
cause?​

Error

schemaVersion?​

number

supportedMajors​

readonly number[]

Returns​

CompatibilityError

Overrides​

Error.constructor

Properties​

cause?​

readonly optional cause?: Error

Defined in: errors.ts:122

The database error when discovery is missing.


schemaVersion?​

readonly optional schemaVersion?: number

Defined in: errors.ts:118

The installed schema version (the last migration applied; formatSchemaVersion() gives its mq version); undefined when discovery is missing or reports none.


supportedMajors​

readonly supportedMajors: readonly number[]

Defined in: errors.ts:120

The mq majors this client supports.