Skip to main content

MigrationStoreParameters

@webda/core


Class: MigrationStoreParameters

Defined in: packages/core/src/stores/migrationstore.service.ts:126

Configuration parameters for MigrationStore

Extends​

Constructors​

Constructor​

new MigrationStoreParameters(): MigrationStoreParameters

Returns​

MigrationStoreParameters

Inherited from​

StoreParameters.constructor

Properties​

aggregationFallback?​

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

Defined in: packages/core/src/stores/store.ts:349

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

Default​

"warn"

Inherited from​

StoreParameters.aggregationFallback


autoStart?​

optional autoStart?: boolean

Defined in: packages/core/src/stores/migrationstore.service.ts:152

Automatically start or resume the migration in the background on init() when elected cluster leader

Default​

true

batchSize?​

optional batchSize?: number

Defined in: packages/core/src/stores/migrationstore.service.ts:140

Number of items to read and copy per batch during background backfill

Default​

500

explicitModels?​

optional explicitModels?: boolean

Defined in: packages/core/src/stores/migrationstore.service.ts:169

Internal

Whether models was explicitly configured on the MigrationStore parameters


leaseDuration?​

optional leaseDuration?: number

Defined in: packages/core/src/stores/migrationstore.service.ts:146

Duration in ms of the distributed Registry lease held by the active migration runner

Default​

60000

maxGroups?​

optional maxGroups?: number

Defined in: packages/core/src/stores/store.ts:356

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

Minimum​

1

Default​

10000

Inherited from​

StoreParameters.maxGroups


models?​

optional models?: string[]

Defined in: packages/core/src/stores/store.ts:313

Models managed by this Store.

Default​

["Webda/RegistryEntry"]

Inherited from​

StoreParameters.models


noCache?​

optional noCache?: boolean

Defined in: packages/core/src/stores/store.ts:376

Disable default memory cache

Inherited from​

StoreParameters.noCache


slowQueryLogLevel?​

optional slowQueryLogLevel?: WorkerLogLevel

Defined in: packages/core/src/stores/store.ts:336

Log level used for slow queries

Default​

"WARN"

Inherited from​

StoreParameters.slowQueryLogLevel


slowQueryMaxLength?​

optional slowQueryMaxLength?: number

Defined in: packages/core/src/stores/store.ts:342

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

Default​

1024

Inherited from​

StoreParameters.slowQueryMaxLength


slowQueryThreshold?​

optional slowQueryThreshold?: number

Defined in: packages/core/src/stores/store.ts:330

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

Default​

30000

Inherited from​

StoreParameters.slowQueryThreshold


source​

source: string

Defined in: packages/core/src/stores/migrationstore.service.ts:130

Name of the original (source) Store service to migrate from


statusRefreshInterval?​

optional statusRefreshInterval?: number

Defined in: packages/core/src/stores/migrationstore.service.ts:164

Interval in ms after which non-leader instances refresh the migration status from the Registry

Default​

5000

strict?​

optional strict?: boolean

Defined in: packages/core/src/stores/store.ts:323

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​

StoreParameters.strict


target​

target: string

Defined in: packages/core/src/stores/migrationstore.service.ts:134

Name of the destination (target) Store service to migrate to


type​

type: string

Defined in: packages/core/src/services/serviceparameters.ts:10

Type of the service

Inherited from​

StoreParameters.type


typeCheck?​

optional typeCheck?: object

Defined in: packages/core/src/stores/store.ts:360

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

enabled?​

optional enabled?: boolean

Whether enabled is enabled

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​

StoreParameters.typeCheck


verify?​

optional verify?: boolean

Defined in: packages/core/src/stores/migrationstore.service.ts:158

Run a verification pass comparing source items against target before marking the migration COMPLETED

Default​

true

Methods​

load()​

load(params?): this

Defined in: packages/core/src/stores/migrationstore.service.ts:176

Load parameters and apply defaults

Parameters​

params?​

Record<string, unknown> = {}

raw configuration object

Returns​

this

this for chaining

Overrides​

StoreParameters.load


update()​

update(params?, delta): this

Defined in: packages/core/src/application/parameters.ts:33

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​

StoreParameters.update


with()​

with(callback): this

Defined in: packages/core/src/application/parameters.ts:63

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​

StoreParameters.with