useVirtualQuery.
Arguments and row types flow through the generated API. The hook retains one query
identity, follows its execution, and releases it when its arguments change or the
component unmounts. Refresh explicitly starts a new query.
Choose the answer you need
A complete answer that exceeds its bounds fails instead of returning a partial
answer. Browse does not compute a population-wide total or sort. New dataset
publications do not change either result. Current read and disclosure rules still
apply to every read.
Declare the input
An installed dataset can be exposed as a virtual table. Import its existingdefineDataset declaration; deployment administration owns catalog binding and
credentials. The dataset must have a published version and managed retention.
bijection/schema.ts
ctx.db.
Dataset queries currently support present scalar string, integer, finite float,
boolean and byte fields, including nullable fields. Project unsupported optional or nested
fields out of the query. Complete queries can combine dataset inputs with bounded
local inputs; combining dataset inputs with live SQL inputs is refused.
Declare the query
ImportdefineVirtualQuery from the generated server module so the result type is
resolved against your schema. The client supplies arguments; the declaration owns
the expression and its bounds.
bijection/analytics.ts
result: "complete" for a complete answer. maxRows and maxBytes bound that
answer; exceeding either refuses the result. Queries expire rather than silently
starting again.
Read it in React
pageSize can request a
smaller page. Browse replaces the displayed page, keeping client memory bounded. A filtered page
can be empty while hasMore is true. Complete-result paging accumulates the bounded
answer. Pass "skip" instead of arguments to suspend the hook. Integers remain
bigint throughout the flow.
Open a snapshot row
Browse pages return oneSnapshotRowReference per row. result.readRow(reference)
reopens that exact row under current authorization; the browser query client’s
corresponding method is execution.row(reference). A reference becomes unavailable
when its query is released or expires. It grants no authority by itself.
A native table export may also supply reference.currentObject. This is a separate
reference to the current document. Read it through the ordinary object API, which
checks current access and can return a changed value or a deleted object. Never
pass the snapshot reference itself to a mutation or treat its key as a current ID.
Explore presents these as separate snapshot details and an Open current object
link when the object is exposed by the application.