type

Request

Collection schema, predicates, pagination, locale, projection, and lock controls.

Properties

PropertyTypeDescription
Collectionschema.CollectionResolved target schema.
Collectionsmap[schema.StableID]schema.CollectionSchemas available for relationship operations.
IDstringTarget document ID.
Filter*query.NodeCaller-owned filter predicate.
Access*query.NodeAuthorization predicate applied atomically with Filter.
PageintOne-based result page.
LimitintMaximum documents per page.
SkipTotalboolSkipTotal 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.SortStable ordering.
IndexWindow*IndexWindowOptional bounded unique-index range used by ListWindow.
Select[]query.PathSelected stored fields.
Populate[]query.PopulationRelationship population requests.
PopulationAccessmap[schema.StableID]*query.NodeThe PopulationAccess value.
PopulationPublishedOnlymap[schema.StableID]boolPopulationPublishedOnly selects each target's head independently. An entry overrides PublishedOnly for that target; omitted entries inherit it.
PopulationBudget*PopulationBudgetPopulationBudget 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.
PublishedOnlyboolRestrict versioned reads to published documents.
DeletionDeletionModeActive or trashed selection.
ExpectedRevisionintOptimistic concurrency revision.
Locales[]schema.LocaleCodeLocales 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.LocaleCodeRequested locale followed by effective fallbacks.
AllLocalesboolSelect every locale.
LockLockModeRequired 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 }

Source store/store.go:61

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.