Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataWithID ¶ added in v0.2.30
type DataWithID[K comparable, D any] struct { WithID[K] Data D // we can't use *D here as consumer might want to pass an interface value instead of a pointer }
func NewDataWithID ¶ added in v0.2.30
func NewDataWithID[K comparable, D any](id K, key *dal.Key, data D) DataWithID[K, D]
type WithID ¶
type WithID[K comparable] struct { ID K `json:"id"` // Unique id of the record in collection FullID string `json:"fullID,omitempty"` // Custom id of the record fully unique across all DB collections Key *dal.Key `json:"-"` Record dal.Record `json:"-"` }
WithID is a record with a strongly typed ID
type WithRecordChanges ¶ added in v0.14.0
type WithRecordChanges struct { RecordsToUpdate []*Updates RecordsToDelete []*dal.Key // contains filtered or unexported fields }
func (*WithRecordChanges) ApplyChanges ¶ added in v0.14.0
func (v *WithRecordChanges) ApplyChanges(ctx context.Context, tx dal.ReadwriteTransaction, excludeKeys ...*dal.Key) (err error)
func (*WithRecordChanges) QueueForInsert ¶ added in v0.14.0
func (v *WithRecordChanges) QueueForInsert(records ...dal.Record)
func (*WithRecordChanges) RecordsToInsert ¶ added in v0.14.0
func (v *WithRecordChanges) RecordsToInsert() (records []dal.Record)
Click to show internal directories.
Click to hide internal directories.