Skip to main content

SQLiteStoreParameters

@webda/sqlite


Class: SQLiteStoreParameters

Defined in: sqlite/src/sqlitestore.service.ts:13

Parameters of SQLiteStore: the SQLStore tables plus the shared SQLite connection parameters

Extends​

  • SQLStoreParameters

Implements​

Constructors​

Constructor​

new SQLiteStoreParameters(): SQLiteStoreParameters

Returns​

SQLiteStoreParameters

Inherited from​

SQLStoreParameters.constructor

Properties​

aggregationFallback?​

optional aggregationFallback?: "allow" | "warn" | "deny"

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

What to do when an aggregation on this store cannot run natively and must stream every matching object through memory

Default​

"warn"

Inherited from​

SQLStoreParameters.aggregationFallback


autoCreateTable?​

optional autoCreateTable?: boolean

Defined in: sql/lib/store.d.ts:17

Auto create tables if they do not exist

Default​

true

Inherited from​

SQLStoreParameters.autoCreateTable


busyTimeout?​

optional busyTimeout?: number

Defined in: sqlite/src/sqlitestore.service.ts:23

PRAGMA busy_timeout in ms

Default​

5000

Implementation of​

SQLiteConnectionParameters.busyTimeout


database?​

optional database?: SQLDatabase

Defined in: sql/lib/store.d.ts:12

Services giving the same database name share one handle: one file, or one in-memory database inside the process (e.g. store + queue + pubsub in a test)

Default​

{ name: <service name> } in memory, { name: <resolved path> } with persistence

Implementation of​

SQLiteConnectionParameters.database

Inherited from​

SQLStoreParameters.database


maxGroups?​

optional maxGroups?: number

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

Maximum number of groups an aggregation may produce without LIMIT (or in memory)

Minimum​

1

Default​

10000

Inherited from​

SQLStoreParameters.maxGroups


models?​

optional models?: string[]

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

Models managed by this Store.

Default​

["Webda/RegistryEntry"]

Inherited from​

SQLStoreParameters.models


noCache?​

optional noCache?: boolean

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

Disable default memory cache

Inherited from​

SQLStoreParameters.noCache


persistence?​

optional persistence?: SQLitePersistence

Defined in: sqlite/src/sqlitestore.service.ts:18

Omitted: in-memory database, lost on stop() (like MemoryStore without persistence) Set: file database, every committed write is durable

Implementation of​

SQLiteConnectionParameters.persistence


pragmas?​

optional pragmas?: Record<string, string | number>

Defined in: sqlite/src/sqlitestore.service.ts:27

Extra PRAGMAs run on open, e.g. { cache_size: -64000 }

Implementation of​

SQLiteConnectionParameters.pragmas


slowQueryLogLevel?​

optional slowQueryLogLevel?: WorkerLogLevel

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

Log level used for slow queries

Default​

"WARN"

Inherited from​

SQLStoreParameters.slowQueryLogLevel


slowQueryMaxLength?​

optional slowQueryMaxLength?: number

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

Maximum length of the query string written to logs / events (longer queries are truncated)

Default​

1024

Inherited from​

SQLStoreParameters.slowQueryMaxLength


slowQueryThreshold?​

optional slowQueryThreshold?: number

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

Duration in ms above which a query is considered slow. Set to 0 to disable slow query detection.

Default​

30000

Inherited from​

SQLStoreParameters.slowQueryThreshold


strict?​

optional strict?: boolean

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

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?​

optional table?: string

Defined in: sql/lib/store.d.ts:11

The table of every model of the store, subclasses and models routed to this store as fallback included (the Webda 3 layout). Without it each model gets its own table (its identifier lowercased with "/" → "_").

Inherited from​

SQLStoreParameters.table


tables?​

optional tables?: object

Defined in: sql/lib/store.d.ts:22

Per-model table name overrides. Maps a model identifier (e.g. "Webda/User") to a custom table name.

Index Signature​

[modelIdentifier: string]: string

Inherited from​

SQLStoreParameters.tables


type​

type: string

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

Type of the service

Inherited from​

SQLStoreParameters.type


typeCheck?​

optional typeCheck?: object

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

Startup check of the stored types: one WARN listing the legacy, untyped and unknown types found

enabled?​

optional enabled?: boolean

Default​
true

maxRows?​

optional maxRows?: number

Rows scanned at most by stores without a native count; beyond, the counts are "at least"

Default​
10000

Inherited from​

SQLStoreParameters.typeCheck

Methods​

load()​

load(params): this

Defined in: sqlite/src/sqlitestore.service.ts:34

Parameters​

params​

any

raw parameters

Returns​

this

this

Overrides​

SQLStoreParameters.load


update()​

update(params, delta): this

Defined in: core/lib/application/parameters.d.ts:21

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/application/parameters.d.ts:27

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