Skip to main content
Version: 0.17

Class: RecordSource<QO, TO, QB, TB>

Abstract base class for record-based sources.

Type parameters​

NameType
QOextends RequestOptions = RecordSourceQueryOptions
TOextends RequestOptions = RequestOptions
QBRecordQueryBuilder
TBRecordTransformBuilder

Hierarchy​

  • Source<QO, TO, QB, TB>

    ↳ RecordSource

Constructors​

constructor​

• new RecordSource<QO, TO, QB, TB>(settings)

Type parameters​

NameType
QOextends RequestOptions = RecordSourceQueryOptions
TOextends RequestOptions = RequestOptions
QBRecordQueryBuilder<string, RecordIdentity>
TBRecordTransformBuilder<string, RecordIdentity, UninitializedRecord>

Parameters​

NameType
settingsRecordSourceSettings<QO, TO, QB, TB>

Overrides​

Source<QO, TO, QB, TB\>.constructor

Defined in​

packages/@orbit/records/src/record-source.ts:93

Accessors​

activated​

• get activated(): Promise<void>

Returns​

Promise<void>

Inherited from​

Source.activated

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:54


bucket​

• get bucket(): undefined | Bucket<unknown>

Returns​

undefined | Bucket<unknown>

Inherited from​

Source.bucket

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:37


defaultQueryOptions​

• get defaultQueryOptions(): undefined | DefaultRequestOptions<QueryOptions>

Returns​

undefined | DefaultRequestOptions<QueryOptions>

Inherited from​

Source.defaultQueryOptions

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:43

• set defaultQueryOptions(options): void

Parameters​

NameType
optionsundefined | DefaultRequestOptions<QueryOptions>

Returns​

void

Inherited from​

Source.defaultQueryOptions

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:44


defaultTransformOptions​

• get defaultTransformOptions(): undefined | DefaultRequestOptions<TransformOptions>

Returns​

undefined | DefaultRequestOptions<TransformOptions>

Inherited from​

Source.defaultTransformOptions

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:45

• set defaultTransformOptions(options): void

Parameters​

NameType
optionsundefined | DefaultRequestOptions<TransformOptions>

Returns​

void

Inherited from​

Source.defaultTransformOptions

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:46


keyMap​

• get keyMap(): undefined | RecordKeyMap

Returns​

undefined | RecordKeyMap

Defined in​

packages/@orbit/records/src/record-source.ts:171


name​

• get name(): undefined | string

Returns​

undefined | string

Inherited from​

Source.name

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:36


queryBuilder​

• get queryBuilder(): QB

Returns​

QB

Overrides​

Source.queryBuilder

Defined in​

packages/@orbit/records/src/record-source.ts:181


requestQueue​

• get requestQueue(): TaskQueue<string, unknown, unknown, unknown>

Returns​

TaskQueue<string, unknown, unknown, unknown>

Inherited from​

Source.requestQueue

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:39


schema​

• get schema(): RecordSchema

Returns​

RecordSchema

Defined in​

packages/@orbit/records/src/record-source.ts:167


syncQueue​

• get syncQueue(): TaskQueue<string, unknown, unknown, unknown>

Returns​

TaskQueue<string, unknown, unknown, unknown>

Inherited from​

Source.syncQueue

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:40


transformBuilder​

• get transformBuilder(): TB

Returns​

TB

Overrides​

Source.transformBuilder

Defined in​

packages/@orbit/records/src/record-source.ts:185


transformLog​

• get transformLog(): Log

Returns​

Log

Inherited from​

Source.transformLog

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:38


validatorFor​

• get validatorFor(): undefined | ValidatorForFn<StandardValidator | StandardRecordValidator>

Returns​

undefined | ValidatorForFn<StandardValidator | StandardRecordValidator>

Defined in​

packages/@orbit/records/src/record-source.ts:175

Methods​

activate​

â–¸ activate(): Promise<void>

Returns​

Promise<void>

Inherited from​

Source.activate

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:55


deactivate​

â–¸ deactivate(): Promise<void>

Returns​

Promise<void>

Inherited from​

Source.deactivate

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:56


emit​

â–¸ emit(event, ...args): void

Parameters​

NameType
eventEvent
...argsunknown[]

Returns​

void

Inherited from​

Source.emit

Defined in​

packages/@orbit/core/dist/modules/evented.d.ts:23


getQueryOptions​

â–¸ getQueryOptions(query, expression?): undefined | QO

Parameters​

NameType
queryQuery<QueryExpression>
expression?QueryExpression

Returns​

undefined | QO

Inherited from​

Source.getQueryOptions

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:47


getTransformOptions​

â–¸ getTransformOptions(transform, operation?): undefined | TO

Parameters​

NameType
transformTransform<Operation>
operation?Operation

Returns​

undefined | TO

Inherited from​

Source.getTransformOptions

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:48


listeners​

â–¸ listeners(event): Listener[]

Parameters​

NameType
eventEvent

Returns​

Listener[]

Inherited from​

Source.listeners

Defined in​

packages/@orbit/core/dist/modules/evented.d.ts:24


off​

â–¸ off(event, listener?): void

Parameters​

NameType
eventEvent
listener?Listener

Returns​

void

Inherited from​

Source.off

Defined in​

packages/@orbit/core/dist/modules/evented.d.ts:21


on​

â–¸ on(event, listener): () => void

Parameters​

NameType
eventEvent
listenerListener

Returns​

fn

â–¸ (): void

Returns​

void

Inherited from​

Source.on

Defined in​

packages/@orbit/core/dist/modules/evented.d.ts:20


one​

â–¸ one(event, listener): () => void

Parameters​

NameType
eventEvent
listenerListener

Returns​

fn

â–¸ (): void

Returns​

void

Inherited from​

Source.one

Defined in​

packages/@orbit/core/dist/modules/evented.d.ts:22


perform​

â–¸ perform(task): Promise<unknown>

Parameters​

NameType
taskTask<string, unknown, unknown>

Returns​

Promise<unknown>

Inherited from​

Source.perform

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:49


transformed​

â–¸ transformed(transforms): Promise<void>

Notifies listeners that this source has been transformed by emitting the transform event.

Resolves when any promises returned to event listeners are resolved.

Also, adds an entry to the Source's transformLog for each transform.

Parameters​

NameType
transformsTransform<Operation>[]

Returns​

Promise<void>

Inherited from​

Source.transformed

Defined in​

packages/@orbit/data/dist/modules/source.d.ts:65


upgrade​

â–¸ upgrade(): Promise<void>

Upgrade source as part of a schema upgrade.

Returns​

Promise<void>

Overrides​

Source.upgrade

Defined in​

packages/@orbit/records/src/record-source.ts:192