Skip to main content
server.BijectionActionCtx

Type parameters

Hierarchy

Properties

sources

• sources: ActionSources

storage

• storage: BijectionStorageActionWriter A utility for reading and writing files in storage.

Overrides

GenericActionCtx.storage

scheduler

• scheduler: Scheduler A utility for scheduling Bijection functions to run in the future.

Inherited from

GenericActionCtx.scheduler

auth

• auth: Auth Information about the currently authenticated user.

Inherited from

GenericActionCtx.auth

meta

• meta: ActionMeta

Inherited from

GenericActionCtx.meta

Methods

runQuery

▸ runQuery<Query>(query, ...args): Promise<FunctionReturnType<Query>> Run the Bijection query with the given name and arguments. Each runQuery call is a separate read transaction. Consider using an internalQuery to prevent users from calling the query directly. Example

Type parameters

Parameters

Returns

Promise<FunctionReturnType<Query>> A promise of the query’s result.

Inherited from

GenericActionCtx.runQuery

runMutation

▸ runMutation<Mutation>(mutation, ...args): Promise<FunctionReturnType<Mutation>> Run the Bijection mutation with the given name and arguments. Each runMutation call is a separate write transaction. Consider using an internalMutation to prevent users from calling it directly. Example

Type parameters

Parameters

Returns

Promise<FunctionReturnType<Mutation>> A promise of the mutation’s result.

Inherited from

GenericActionCtx.runMutation

runAction

▸ runAction<Action>(action, ...args): Promise<FunctionReturnType<Action>> Run the Bijection action with the given name and arguments. Important: Only use runAction when you need to cross runtimes (e.g., calling a "use node" action from the default Bijection runtime). For code in the same runtime, extract shared logic into a plain TypeScript helper function instead, runAction has significant overhead (separate function call, separate resource allocation). Consider using an internalAction to prevent users from calling the action directly.

Type parameters

Parameters

Returns

Promise<FunctionReturnType<Action>> A promise of the action’s result.

Inherited from

GenericActionCtx.runAction

vectorSearch

▸ vectorSearch<TableName, IndexName>(tableName, indexName, query): Promise<{ _id: GenericId<TableName> ; _score: number }[]> Run a vector search on the given table and index.

Type parameters

Parameters

Returns

Promise<{ _id: GenericId<TableName> ; _score: number }[]> A promise of IDs and scores for the documents with the nearest vectors

Inherited from

GenericActionCtx.vectorSearch