Type parameters
Hierarchy
-
GenericActionCtx<DataModel> ↳BijectionActionCtx
Properties
sources
• sources:ActionSources
storage
• storage:BijectionStorageActionWriter
A utility for reading and writing files in storage.
Overrides
GenericActionCtx.storagescheduler
• scheduler:Scheduler
A utility for scheduling Bijection functions to run in the future.
Inherited from
GenericActionCtx.schedulerauth
• auth:Auth
Information about the currently authenticated user.
Inherited from
GenericActionCtx.authmeta
• meta:ActionMeta
Inherited from
GenericActionCtx.metaMethods
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.runQueryrunMutation
▸ 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.runMutationrunAction
▸ 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.runActionvectorSearch
▸ 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