interface
Transaction
type Transaction interface {
Create(context.Context, CreateRequest) (Document, error)
Find(context.Context, Request) (Document, error)
List(context.Context, Request) (Page, error)
ResolveFilteredSelection(context.Context, FilteredSelectionRequest) (FilteredSelection, error)
Update(context.Context, UpdateRequest) (Document, error)
Trash(context.Context, Request) (Document, error)
Restore(context.Context, Request) (Document, error)
Delete(context.Context, Request) (Document, error)
// ApplyReferenceDelete atomically plans incoming current-document
// references, rejects when any restrict policy matches, and otherwise
// nullifies/removes those values. Version snapshots remain immutable.
ApplyReferenceDelete(context.Context, ReferenceDeleteRequest) error
// DeleteDocumentState idempotently removes framework-owned database state
// where the document is either the target or the owning principal.
DeleteDocumentState(context.Context, DocumentReference) error
Commit(context.Context) error
Rollback(context.Context) error
}Atomic document reads and mutations.
Createfunc(context.Context, CreateRequest) (Document, error)- The Create value.
ResolveFilteredSelectionfunc(context.Context, FilteredSelectionRequest) (FilteredSelection, error)- The ResolveFilteredSelection value.
Updatefunc(context.Context, UpdateRequest) (Document, error)- The Update value.
ApplyReferenceDeletefunc(context.Context, ReferenceDeleteRequest) error- ApplyReferenceDelete atomically plans incoming current-document references, rejects when any restrict policy matches, and otherwise nullifies/removes those values. Version snapshots remain immutable.
DeleteDocumentStatefunc(context.Context, DocumentReference) error- DeleteDocumentState idempotently removes framework-owned database state where the document is either the target or the owning principal.
Commitfunc(context.Context) error- The Commit value.
Rollbackfunc(context.Context) error- The Rollback value.