Documentation
¶
Index ¶
- type Ent
- type EntIterator
- type EntStorage
- func (s *EntStorage) Create(e Ent, fields ent.FieldSet) (id uint64, err error)
- func (s *EntStorage) Delete(e Ent, id uint64) error
- func (s *EntStorage) FindByIndex(entTypeName string, x *ent.EntIndex, key []byte, limit int, ...) ([]uint64, error)
- func (s *EntStorage) IterateEnts(proto Ent) ent.EntIterator
- func (s *EntStorage) IterateIds(entType string) ent.IdIterator
- func (s *EntStorage) LoadById(e Ent, id uint64) (version uint64, err error)
- func (s *EntStorage) LoadByIndex(e Ent, x *ent.EntIndex, key []byte, limit int, flags ent.LookupFlags) ([]Ent, error)
- func (s *EntStorage) Save(e Ent, fields ent.FieldSet) (nextVersion uint64, err error)
- type IdIterator
- type ScopedMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntIterator ¶ added in v0.2.8
type EntIterator struct { IdIterator // contains filtered or unexported fields }
func (*EntIterator) Err ¶ added in v0.2.8
func (it *EntIterator) Err() error
func (*EntIterator) Next ¶ added in v0.2.8
func (it *EntIterator) Next(e Ent) bool
type EntStorage ¶
type EntStorage struct {
// contains filtered or unexported fields
}
EntStorage is a generic, goroutine-safe storage implementation of ent.Storage which maintains ent data in memory, suitable for tests.
func NewEntStorage ¶
func NewEntStorage() *EntStorage
func (*EntStorage) FindByIndex ¶ added in v0.2.8
func (s *EntStorage) FindByIndex( entTypeName string, x *ent.EntIndex, key []byte, limit int, flags ent.LookupFlags, ) ([]uint64, error)
func (*EntStorage) IterateEnts ¶ added in v0.2.8
func (s *EntStorage) IterateEnts(proto Ent) ent.EntIterator
func (*EntStorage) IterateIds ¶ added in v0.2.8
func (s *EntStorage) IterateIds(entType string) ent.IdIterator
func (*EntStorage) LoadById ¶ added in v0.2.8
func (s *EntStorage) LoadById(e Ent, id uint64) (version uint64, err error)
func (*EntStorage) LoadByIndex ¶ added in v0.2.8
func (s *EntStorage) LoadByIndex( e Ent, x *ent.EntIndex, key []byte, limit int, flags ent.LookupFlags, ) ([]Ent, error)
type IdIterator ¶ added in v0.2.8
type IdIterator struct {
// contains filtered or unexported fields
}
func (*IdIterator) Err ¶ added in v0.2.8
func (it *IdIterator) Err() error
func (*IdIterator) Next ¶ added in v0.2.8
func (it *IdIterator) Next(id *uint64) bool
type ScopedMap ¶
type ScopedMap struct {
// contains filtered or unexported fields
}
ScopedMap is like a map[string][]byte but prototypal in behaviour; local read misses causes a parent ScopedMap to be tried, while writes are always local. Sort of like a hacky HAMT map.
func (*ScopedMap) ApplyToOuter ¶
func (s *ScopedMap) ApplyToOuter()
ApplyToOuter applies all entries (including deletes) of this scope to its outer scope. This effectively moves changes from this scope to the outer scope, clearing this scope.
Click to show internal directories.
Click to hide internal directories.