type
BoundTypedCollection
type BoundTypedCollection[Document, Create, Update any] struct {
definition TypedCollection[Document, Create, Update]
local *LocalAPI
}Typed Create, Import, Find, List, Update, UpdateRevision, and Delete methods.
Create(ctx, input, actor)(Document, error)- Validate and create a typed document.
Import(ctx, input, options, actor)(Document, error)- Import a typed document while preserving migration metadata.
Find(ctx, id, actor)(Document, error)- Read and JSON-decode one document into the generated model.
List(ctx, options)(TypedPage[Document], error)- List and JSON-decode a typed page into generated models.
Update(ctx, id, input, actor)(Document, error)- Apply a typed partial update.
UpdateRevision(ctx, id, input, expectedRevision, actor)(Document, error)- Update only when the expected revision still matches.
Delete(ctx, id, actor)(Document, error)- Delete through the ordinary access-controlled operation pipeline.
Inputs and outputs cross the same operation engine as untyped LocalAPI. JSON conversion reports incompatible field types; unknown stored fields are ignored and absent model fields keep their Go zero values. The wrapper does not create a second runtime.
Methods
BoundTypedCollection.Create()Public method BoundTypedCollection.Create from github.com/riducms/ridu/core.
BoundTypedCollection.Delete()Public method BoundTypedCollection.Delete from github.com/riducms/ridu/core.
BoundTypedCollection.Find()Public method BoundTypedCollection.Find from github.com/riducms/ridu/core.
BoundTypedCollection.Import()Public method BoundTypedCollection.Import from github.com/riducms/ridu/core.
BoundTypedCollection.List()Public method BoundTypedCollection.List from github.com/riducms/ridu/core.
BoundTypedCollection.Update()Public method BoundTypedCollection.Update from github.com/riducms/ridu/core.
BoundTypedCollection.UpdateRevision()Public method BoundTypedCollection.UpdateRevision from github.com/riducms/ridu/core.