Skip to main content

PostgresParameters

@webda/postgres


Class: PostgresParameters

Defined in: postgres/src/postgresstore.service.ts:23

Extends​

Constructors​

Constructor​

new PostgresParameters(): PostgresParameters

Returns​

PostgresParameters

Inherited from​

SQLStoreParameters.constructor

Properties​

autoCreateTable?​

optional autoCreateTable?: boolean

Defined in: postgres/src/postgresstore.service.ts:36

Auto create table if not exists

Default​

true

database​

database: SQLDatabase

Defined in: postgres/src/sqlstore.ts:13

Inherited from​

SQLStoreParameters.database


defaultModel?​

optional defaultModel?: boolean

Defined in: core/lib/stores/store.d.ts:218

When __type model not found, use the model If strict is setup this parameter is not used

Default​

true

Inherited from​

SQLStoreParameters.defaultModel


forceModel?​

optional forceModel?: boolean

Defined in: core/lib/stores/store.d.ts:224

If set, Store will ignore the __type

Default​

false

Inherited from​

SQLStoreParameters.forceModel


modelAliases?​

optional modelAliases?: object

Defined in: core/lib/stores/store.d.ts:234

Model Aliases to allow easier rename of Model

Index Signature​

[key: string]: string

Inherited from​

SQLStoreParameters.modelAliases


models?​

optional models?: string[]

Defined in: core/lib/stores/store.d.ts:202

Models managed by this Store.

Default​

["Webda/RegistryEntry"]

Inherited from​

SQLStoreParameters.models


noCache?​

optional noCache?: boolean

Defined in: core/lib/stores/store.d.ts:240

Disable default memory cache

Inherited from​

SQLStoreParameters.noCache


postgresqlServer?​

optional postgresqlServer?: ClientConfig | PoolConfig

Defined in: postgres/src/postgresstore.service.ts:31

By default use environment variables


slowQueryThreshold​

slowQueryThreshold: number

Defined in: core/lib/stores/store.d.ts:230

Slow query threshold

Default​

30000

Inherited from​

SQLStoreParameters.slowQueryThreshold


strict?​

optional strict?: boolean

Defined in: core/lib/stores/store.d.ts:211

Allow to load object that does not have the type data

If set to true, then the Store will only managed the defined _model and no model extending this one

Default​

false

Inherited from​

SQLStoreParameters.strict


table​

table: string

Defined in: postgres/src/sqlstore.ts:12

Inherited from​

SQLStoreParameters.table


tables?​

optional tables?: object

Defined in: postgres/src/postgresstore.service.ts:58

Per-model table name overrides. Maps a model identifier (e.g. "Webda/User") to a custom table name. When not specified, defaults are: primary model → table, others → identifier lowercased with "/" → "_".

Index Signature​

[modelIdentifier: string]: string


type​

type: string

Defined in: core/lib/services/serviceparameters.d.ts:8

Type of the service

Inherited from​

SQLStoreParameters.type


usePool?​

optional usePool?: boolean

Defined in: postgres/src/postgresstore.service.ts:27

Default​

false

viewPrefix?​

optional viewPrefix?: string

Defined in: postgres/src/postgresstore.service.ts:45

View name prefix

Default​

""

Pattern​

/^[a-zA-Z_][a-zA-Z0-9_]*$/

Examples​

"app_"
"v_"
"view_"

views?​

optional views?: string[]

Defined in: postgres/src/postgresstore.service.ts:51

Regexp patterns of model identifiers to include when generating views

Default​

[".*"]

Methods​

load()​

load(params): this

Defined in: postgres/src/postgresstore.service.ts:65

Parameters​

params​

any

raw parameters

Returns​

this

this

Overrides​

SQLStoreParameters.load


update()​

update(params, delta): this

Defined in: core/lib/services/serviceparameters.d.ts:25

Update parameters and call watchers if a parameter was changed

Parameters​

params​

any

the service parameters

delta​

any

the delta

Returns​

this

this for chaining

Inherited from​

SQLStoreParameters.update


with()​

with(callback): this

Defined in: core/lib/services/serviceparameters.d.ts:31

Watch for changes on the parameters and call watchers when a parameter is changed

Parameters​

callback​

(params) => void

the callback function

Returns​

this

this for chaining

Inherited from​

SQLStoreParameters.with