SQLiteRelationalParameters
Class: SQLiteRelationalParameters
Defined in: sqlite/src/sqliterelationalstore.service.ts:19
Parameters of the relational store: those of SQLiteStore plus the schema layout and lifecycle
Extends
Implements
RelationalLayoutParameters
Constructors
Constructor
new SQLiteRelationalParameters():
SQLiteRelationalParameters
Returns
SQLiteRelationalParameters
Inherited from
SQLiteStoreParameters.constructor
Properties
aggregationFallback?
optionalaggregationFallback?:"allow"|"warn"|"deny"
Defined in: core/lib/stores/store.d.ts:281
What to do when an aggregation on this store cannot run natively and must stream every matching object through memory
Default
"warn"
Inherited from
SQLiteStoreParameters.aggregationFallback
allowIncompatible?
optionalallowIncompatible?:string[]
Defined in: sqlite/src/sqliterelationalstore.service.ts:68
Elements whose blocking changes against a live version are accepted (<table>, <table>.<column>, <model>
or <model>.<attribute>): the BLOCK becomes a WARN and the version records it in forced
Default
[]
Implementation of
RelationalLayoutParameters.allowIncompatible
appVersion?
optionalappVersion?:string
Defined in: sqlite/src/sqliterelationalstore.service.ts:62
Version of the application recorded in the Webda/SchemaVersion registry
Default
the version of package.json
Implementation of
RelationalLayoutParameters.appVersion
autoCreateTable?
optionalautoCreateTable?:boolean
Defined in: sql/lib/store.d.ts:22
Auto create tables if they do not exist
Default
true
Inherited from
SQLiteStoreParameters.autoCreateTable
busyTimeout?
optionalbusyTimeout?:number
Defined in: sqlite/src/sqlitestore.service.ts:23
PRAGMA busy_timeout in ms
Default
5000
Inherited from
SQLiteStoreParameters.busyTimeout
columnNaming?
optionalcolumnNaming?:"preserve"|"snake_case"
Defined in: sqlite/src/sqliterelationalstore.service.ts:35
preserve keeps the field names as column names (quoted camelCase), snake_case converts them
Default
"preserve"
Implementation of
RelationalLayoutParameters.columnNaming
database?
optionaldatabase?:SQLDatabase
Defined in: sql/lib/store.d.ts:17
Database
Inherited from
SQLiteStoreParameters.database
extraColumn?
optionalextraColumn?:string|false
Defined in: sqlite/src/sqliterelationalstore.service.ts:40
JSON column keeping the properties the model schema does not declare, false to refuse them
Default
"_extra"
Implementation of
RelationalLayoutParameters.extraColumn
foreignKeys?
optionalforeignKeys?:boolean
Defined in: sqlite/src/sqliterelationalstore.service.ts:45
Declare the foreign key constraints between the tables of the store
Default
true
Implementation of
RelationalLayoutParameters.foreignKeys
foreignKeysToJsonb?
optionalforeignKeysToJsonb?:boolean
Defined in: sqlite/src/sqliterelationalstore.service.ts:51
Also declare a foreign key to the uuid column of the JSON table of a model served by a SQLiteStore (the
Registry) on the same database with a table per model; the JSON table is created at init()
Default
false
Implementation of
RelationalLayoutParameters.foreignKeysToJsonb
maxGroups?
optionalmaxGroups?:number
Defined in: core/lib/stores/store.d.ts:288
Maximum number of groups an aggregation may produce without LIMIT (or in memory)
Minimum
1
Default
10000
Inherited from
SQLiteStoreParameters.maxGroups
models?
optionalmodels?:string[]
Defined in: core/lib/stores/store.d.ts:246
Models managed by this Store.
Default
["Webda/RegistryEntry"]
Inherited from
noCache?
optionalnoCache?:boolean
Defined in: core/lib/stores/store.d.ts:308
Disable default memory cache
Inherited from
numericAsDecimal?
optionalnumericAsDecimal?:boolean
Defined in: sqlite/src/sqliterelationalstore.service.ts:56
Declare JSON number fields as DECIMAL instead of REAL
Default
false
Implementation of
RelationalLayoutParameters.numericAsDecimal
persistence?
optionalpersistence?: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
Inherited from
SQLiteStoreParameters.persistence
pragmas?
optionalpragmas?:Record<string,string|number>
Defined in: sqlite/src/sqlitestore.service.ts:27
Extra PRAGMAs run on open, e.g. { cache_size: -64000 }
Inherited from
schemaSync?
optionalschemaSync?:SchemaSyncMode
Defined in: sqlite/src/sqliterelationalstore.service.ts:30
What init() does with the database schema
none: nothingcreate: create the missing tables, with their indexes and inline foreign keysalter:create, plus add the missing columns and indexes of the existing tables (SQLite cannot add a foreign key to an existing table: it is reported)validate: write nothing, fail when anything is missing or differs
Default
"create"
Implementation of
RelationalLayoutParameters.schemaSync
slowQueryLogLevel?
optionalslowQueryLogLevel?:WorkerLogLevel
Defined in: core/lib/stores/store.d.ts:268
Log level used for slow queries
Default
"WARN"
Inherited from
SQLiteStoreParameters.slowQueryLogLevel
slowQueryMaxLength?
optionalslowQueryMaxLength?:number
Defined in: core/lib/stores/store.d.ts:274
Maximum length of the query string written to logs / events (longer queries are truncated)
Default
1024
Inherited from
SQLiteStoreParameters.slowQueryMaxLength
slowQueryThreshold?
optionalslowQueryThreshold?:number
Defined in: core/lib/stores/store.d.ts:262
Duration in ms above which a query is considered slow. Set to 0 to disable slow query detection.
Default
30000
Inherited from
SQLiteStoreParameters.slowQueryThreshold
strict?
optionalstrict?:boolean
Defined in: core/lib/stores/store.d.ts:255
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
table?
optionaltable?:string
Defined in: sql/lib/store.d.ts:13
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 "/" → "_").
Implementation of
RelationalLayoutParameters.table
Inherited from
tables?
optionaltables?:object
Defined in: sql/lib/store.d.ts:27
Per-model table name overrides. Maps a model identifier (e.g. "Webda/User") to a custom table name.
Index Signature
[modelIdentifier: string]: string
Implementation of
RelationalLayoutParameters.tables
Inherited from
transaction?
optionaltransaction?:SQLTransactionMode
Defined in: sql/lib/store.d.ts:38
Wrap all statements of an operation in a single transaction
- "none": autocommit per statement
- "operation": BEGIN on the first statement of an operation, COMMIT when the operation succeeds, ROLLBACK when
it fails. Nested operations join the outermost one;
transaction: falseon an operation opts it out.
Default
"none"
Inherited from
SQLiteStoreParameters.transaction
type
type:
string
Defined in: core/lib/services/serviceparameters.d.ts:9
Type of the service
Inherited from
typeCheck?
optionaltypeCheck?:object
Defined in: core/lib/stores/store.d.ts:292
Startup check of the stored types: one WARN listing the legacy, untyped and unknown types found
enabled?
optionalenabled?:boolean
Whether enabled is enabled
Default
true
maxRows?
optionalmaxRows?:number
Rows scanned at most by stores without a native count; beyond, the counts are "at least"
Default
10000
Inherited from
SQLiteStoreParameters.typeCheck
versionHeartbeat?
optionalversionHeartbeat?:number
Defined in: sqlite/src/sqliterelationalstore.service.ts:73
Seconds between two heartbeats of the version in the registry, 0 for none
Default
60
Implementation of
RelationalLayoutParameters.versionHeartbeat
versionTtl?
optionalversionTtl?:number
Defined in: sqlite/src/sqliterelationalstore.service.ts:78
Seconds after its last heartbeat a version still counts as live
Default
600
Implementation of
RelationalLayoutParameters.versionTtl
Methods
load()
load(
params):this
Defined in: sqlite/src/sqliterelationalstore.service.ts:85
Parameters
params
any
raw parameters
Returns
this
this
Overrides
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
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