InjectLiveQueryResult

Interface: InjectLiveQueryResult<TContext>

Defined in: index.ts:30

The result of calling injectLiveQuery. Contains reactive signals for the query state and data.

Type Parameters

TContext

TContext extends Context

Properties

collection

ts
collection: Signal<
  | Collection<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }, string | number, {
}, StandardSchemaV1<unknown, unknown>, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>
| null>;
collection: Signal<
  | Collection<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }, string | number, {
}, StandardSchemaV1<unknown, unknown>, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>
| null>;

Defined in: index.ts:36

A signal containing the underlying collection instance (null for disabled queries)


data

ts
data: Signal<InferResultType<TContext>>;
data: Signal<InferResultType<TContext>>;

Defined in: index.ts:34

A signal containing the results as an array, or single result for findOne queries


isCleanedUp

ts
isCleanedUp: Signal<boolean>;
isCleanedUp: Signal<boolean>;

Defined in: index.ts:52

A signal indicating whether the collection has been cleaned up


isError

ts
isError: Signal<boolean>;
isError: Signal<boolean>;

Defined in: index.ts:50

A signal indicating whether the collection has an error


isIdle

ts
isIdle: Signal<boolean>;
isIdle: Signal<boolean>;

Defined in: index.ts:48

A signal indicating whether the collection is idle


isLoading

ts
isLoading: Signal<boolean>;
isLoading: Signal<boolean>;

Defined in: index.ts:44

A signal indicating whether the collection is currently loading


isReady

ts
isReady: Signal<boolean>;
isReady: Signal<boolean>;

Defined in: index.ts:46

A signal indicating whether the collection is ready


state

ts
state: Signal<Map<string | number, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>>;
state: Signal<Map<string | number, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>>;

Defined in: index.ts:32

A signal containing the complete state map of results keyed by their ID


status

ts
status: Signal<CollectionStatus | "disabled">;
status: Signal<CollectionStatus | "disabled">;

Defined in: index.ts:42

A signal containing the current status of the collection