Skip to main content
server.BijectionQueryCtx

Type parameters

Hierarchy

Properties

sources

• sources: Sources

storage

• storage: BijectionStorageReader A utility for reading files in storage. Use ctx.storage.getUrl(storageId) to get a URL for a stored file.

Overrides

GenericQueryCtx.storage

db

• db: GenericDatabaseReader<DataModel> A utility for reading data in the database. Use ctx.db.get(table, id) to fetch a single document by ID, or ctx.db.query("tableName") to query multiple documents with filtering and ordering. Queries are read-only, no write methods are available.

Inherited from

GenericQueryCtx.db

auth

• auth: Auth Information about the currently authenticated user. Call await ctx.auth.getUserIdentity() to get the current user’s identity, or null if the user is not authenticated.

Inherited from

GenericQueryCtx.auth

runQuery

• runQuery: <Query>(query: Query, …args: ArgsAndOptions<Query, { transactionLimits?: TransactionLimits }>) => Promise<FunctionReturnType<Query>>

Type declaration

▸ <Query>(query, ...args): Promise<FunctionReturnType<Query>> Call a query function within the same transaction. The query runs within the same read snapshot. Requires a FunctionReference (e.g., api.myModule.myQuery or internal.myModule.myQuery). NOTE: Often you can extract shared logic into a helper function instead. runQuery incurs overhead of running argument and return value validation, and creating a new isolated JS context.
Type parameters
Parameters
Returns
Promise<FunctionReturnType<Query>>

Inherited from

GenericQueryCtx.runQuery

meta

• meta: QueryMeta

Inherited from

GenericQueryCtx.meta