Class: Source<QueryOptions, TransformOptions, QueryBuilder, TransformBuilder>
Base class for sources.
Type parameters​
Name | Type |
---|---|
QueryOptions | extends RequestOptions = RequestOptions |
TransformOptions | extends RequestOptions = RequestOptions |
QueryBuilder | unknown |
TransformBuilder | unknown |
Hierarchy​
Evented
Performer
↳
Source
Constructors​
constructor​
• new Source<QueryOptions
, TransformOptions
, QueryBuilder
, TransformBuilder
>(settings?
)
Type parameters​
Name | Type |
---|---|
QueryOptions | extends RequestOptions = RequestOptions |
TransformOptions | extends RequestOptions = RequestOptions |
QueryBuilder | unknown |
TransformBuilder | unknown |
Parameters​
Name | Type |
---|---|
settings | SourceSettings <QueryOptions , TransformOptions , QueryBuilder , TransformBuilder > |
Inherited from​
Evented.constructor
Defined in​
packages/@orbit/data/src/source.ts:77
Accessors​
activated​
• get
activated(): Promise
<void
>
Returns​
Promise
<void
>
Defined in​
packages/@orbit/data/src/source.ts:224
bucket​
• get
bucket(): undefined
| Bucket
<unknown
>
Returns​
undefined
| Bucket
<unknown
>
Defined in​
packages/@orbit/data/src/source.ts:130
defaultQueryOptions​
• get
defaultQueryOptions(): undefined
| DefaultRequestOptions
<QueryOptions
>
Returns​
undefined
| DefaultRequestOptions
<QueryOptions
>
Defined in​
packages/@orbit/data/src/source.ts:154
• set
defaultQueryOptions(options
): void
Parameters​
Name | Type |
---|---|
options | undefined | DefaultRequestOptions <QueryOptions > |
Returns​
void
Defined in​
packages/@orbit/data/src/source.ts:158
defaultTransformOptions​
• get
defaultTransformOptions(): undefined
| DefaultRequestOptions
<TransformOptions
>
Returns​
undefined
| DefaultRequestOptions
<TransformOptions
>
Defined in​
packages/@orbit/data/src/source.ts:164
• set
defaultTransformOptions(options
): void
Parameters​
Name | Type |
---|---|
options | undefined | DefaultRequestOptions <TransformOptions > |
Returns​
void
Defined in​
packages/@orbit/data/src/source.ts:170
name​
• get
name(): undefined
| string
Returns​
undefined
| string
Defined in​
packages/@orbit/data/src/source.ts:126
queryBuilder​
• get
queryBuilder(): undefined
| QueryBuilder
Returns​
undefined
| QueryBuilder
Defined in​
packages/@orbit/data/src/source.ts:146
requestQueue​
• get
requestQueue(): TaskQueue
<string
, unknown
, unknown
, unknown
>
Returns​
TaskQueue
<string
, unknown
, unknown
, unknown
>
Defined in​
packages/@orbit/data/src/source.ts:138
syncQueue​
• get
syncQueue(): TaskQueue
<string
, unknown
, unknown
, unknown
>
Returns​
TaskQueue
<string
, unknown
, unknown
, unknown
>
Defined in​
packages/@orbit/data/src/source.ts:142
transformBuilder​
• get
transformBuilder(): undefined
| TransformBuilder
Returns​
undefined
| TransformBuilder
Defined in​
packages/@orbit/data/src/source.ts:150
transformLog​
• get
transformLog(): Log
Returns​
Log
Defined in​
packages/@orbit/data/src/source.ts:134
Methods​
activate​
â–¸ activate(): Promise
<void
>
Returns​
Promise
<void
>
Defined in​
packages/@orbit/data/src/source.ts:231
deactivate​
â–¸ deactivate(): Promise
<void
>
Returns​
Promise
<void
>
Defined in​
packages/@orbit/data/src/source.ts:238
emit​
â–¸ emit(event
, ...args
): void
Parameters​
Name | Type |
---|---|
event | Event |
...args | unknown [] |
Returns​
void
Inherited from​
Evented.emit
Defined in​
packages/@orbit/core/dist/modules/evented.d.ts:23
getQueryOptions​
â–¸ getQueryOptions(query
, expression?
): undefined
| QueryOptions
Parameters​
Name | Type |
---|---|
query | Query <QueryExpression > |
expression? | QueryExpression |
Returns​
undefined
| QueryOptions
Defined in​
packages/@orbit/data/src/source.ts:176
getTransformOptions​
â–¸ getTransformOptions(transform
, operation?
): undefined
| TransformOptions
Parameters​
Name | Type |
---|---|
transform | Transform <Operation > |
operation? | Operation |
Returns​
undefined
| TransformOptions
Defined in​
packages/@orbit/data/src/source.ts:190
listeners​
â–¸ listeners(event
): Listener
[]
Parameters​
Name | Type |
---|---|
event | Event |
Returns​
Listener
[]
Inherited from​
Evented.listeners
Defined in​
packages/@orbit/core/dist/modules/evented.d.ts:24
off​
â–¸ off(event
, listener?
): void
Parameters​
Name | Type |
---|---|
event | Event |
listener? | Listener |
Returns​
void
Inherited from​
Evented.off
Defined in​
packages/@orbit/core/dist/modules/evented.d.ts:21
on​
â–¸ on(event
, listener
): () => void
Parameters​
Name | Type |
---|---|
event | Event |
listener | Listener |
Returns​
fn
â–¸ (): void
Returns​
void
Inherited from​
Evented.on
Defined in​
packages/@orbit/core/dist/modules/evented.d.ts:20
one​
â–¸ one(event
, listener
): () => void
Parameters​
Name | Type |
---|---|
event | Event |
listener | Listener |
Returns​
fn
â–¸ (): void
Returns​
void
Inherited from​
Evented.one
Defined in​
packages/@orbit/core/dist/modules/evented.d.ts:22
perform​
â–¸ perform(task
): Promise
<unknown
>
Parameters​
Name | Type |
---|---|
task | Task <string , unknown , unknown > |
Returns​
Promise
<unknown
>
Inherited from​
Performer.perform
Defined in​
packages/@orbit/data/src/source.ts:205
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​
Name | Type |
---|---|
transforms | Transform <Operation >[] |
Returns​
Promise
<void
>
Defined in​
packages/@orbit/data/src/source.ts:254
upgrade​
â–¸ upgrade(): Promise
<void
>
Upgrade source as part of a schema upgrade.
Returns​
Promise
<void
>