type
Request
Collection schema, predicates, pagination, locale, projection, and lock controls.
Properties
| Property | Type | Description |
|---|---|---|
Collection | schema.Collection | Resolved target schema. |
Collections | map[schema.StableID]schema.Collection | Schemas available for relationship operations. |
ID | string | Target document ID. |
Filter | *query.Node | Caller-owned filter predicate. |
Access | *query.Node | Authorization predicate applied atomically with Filter. |
Page | int | One-based result page. |
Limit | int | Maximum documents per page. |
SkipTotal | bool | SkipTotal reads a list page without counting every match. Adapters execute no count, read at most Limit+1 rows at the page's offset, return at most Limit, and set Page.HasNextPage from the extra row; Page.Total is nil. Predicates, sorting, locales, heads and population are unchanged. |
Sort | []query.Sort | Stable ordering. |
IndexWindow | *IndexWindow | Optional bounded unique-index range used by ListWindow. |
Select | []query.Path | Selected stored fields. |
Populate | []query.Population | Relationship population requests. |
PopulationAccess | map[schema.StableID]*query.Node | The PopulationAccess value. |
PopulationPublishedOnly | map[schema.StableID]bool | PopulationPublishedOnly selects each target's head independently. An entry overrides PublishedOnly for that target; omitted entries inherit it. |
PopulationBudget | *PopulationBudget | PopulationBudget is shared by every recursive population read that contributes to one response. Official adapters initialize a default when callers omit it so direct store use cannot bypass the materialization cap. |
PublishedOnly | bool | Restrict versioned reads to published documents. |
Deletion | DeletionMode | Active or trashed selection. |
ExpectedRevision | int | Optimistic concurrency revision. |
Locales | []schema.LocaleCode | Locales is the complete configured locale order used to decode canonical localized storage. LocaleChain starts with the requested locale and then contains effective fallbacks used by atomic filtering and sorting. |
LocaleChain | []schema.LocaleCode | Requested locale followed by effective fallbacks. |
AllLocales | bool | Select every locale. |
Lock | LockMode | Required row-lock strength. |
Full signature
type Request struct {
Collection schema.Collection
Collections map[schema.StableID]schema.Collection
ID string
Filter *query.Node
Access *query.Node
Page int
Limit int
// SkipTotal reads a list page without counting every match. Adapters
// execute no count, read at most Limit+1 rows at the page's offset, return
// at most Limit, and set Page.HasNextPage from the extra row; Page.Total
// is nil. Predicates, sorting, locales, heads and population are unchanged.
SkipTotal bool
Sort []query.Sort
// IndexWindow is set only for a count-free range read over one direct,
// unique, indexed text field. Adapters must not broaden this range into a
// count or offset query.
IndexWindow *IndexWindow
// Select is nil for all authored fields. A non-nil empty slice returns only
// document metadata.
Select []query.Path
Populate []query.Population
PopulationAccess map[schema.StableID]*query.Node
// PopulationPublishedOnly selects each target's head independently. An entry
// overrides PublishedOnly for that target; omitted entries inherit it.
PopulationPublishedOnly map[schema.StableID]bool
// PopulationBudget is shared by every recursive population read that
// contributes to one response. Official adapters initialize a default when
// callers omit it so direct store use cannot bypass the materialization cap.
PopulationBudget *PopulationBudget
// PublishedOnly selects the live snapshot for this collection. Populated
// targets inherit it unless PopulationPublishedOnly supplies their selection.
// Unversioned collections ignore it.
PublishedOnly bool
Deletion DeletionMode
ExpectedRevision int
// Locales is the complete configured locale order used to decode canonical
// localized storage. LocaleChain starts with the requested locale and then
// contains effective fallbacks used by atomic filtering and sorting.
Locales []schema.LocaleCode
LocaleChain []schema.LocaleCode
AllLocales bool
// Lock identifies the row lock required by a semantic read. Ordinary reads
// use LockNone; relationship validation uses LockReference to keep an
// accepted target from changing or being deleted before the enclosing write
// commits. Coordinated framework mutations use LockMutation and acquire all
// participants in deterministic reference order.
Lock LockMode
}Methods
Request.CurrentRequest()CurrentRequest is the read that supplies an update's Current: the request's document, collection, access and filter predicates, deletion mode and locales, read whole from the working head with LockMutation. Update checks an expected revision itself.