Documentation
¶
Overview ¶
Package memory implements every flexitype repository port in process memory: no database, no migrations. It powers the browser playground and gives embedding consumers a zero-dependency test double with the same semantics as the PostgreSQL implementation (soft archiving, hierarchies, pagination, FQL). Writes apply to the shared maps immediately, but the memory transactor honours the commit-hook contract (activity, events) AND keeps a per-transaction undo journal, so a rollback reverses exactly the keys that transaction wrote — leaving a concurrently interleaved transaction's committed writes intact, matching PostgreSQL atomicity.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeSetEraserFor ¶ added in v1.3.0
func ChangeSetEraserFor(s changeset.Store) erasure.ResidualEraser
ChangeSetEraserFor exposes the residual eraser for a store built by NewChangeSetStore, whose concrete type is unexported.
func NewChangeSetStore ¶
NewChangeSetStore builds an in-memory change-set store.
func NewMatchStore ¶
NewMatchStore builds an in-memory matching-rule store.
func NewRevisionStore ¶
NewRevisionStore builds an in-memory entity-revision store.
func NewSavedViewStore ¶
NewSavedViewStore builds an in-memory saved-view store.
func NewUnitFamilyStore ¶
NewUnitFamilyStore builds an in-memory unit-family store.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the shared in-memory state every repository views.
func (*Store) ActivityLog ¶
ActivityLog returns the in-memory audit log.
func (*Store) NewActivityEraser ¶ added in v1.3.0
func (s *Store) NewActivityEraser() erasure.ResidualEraser
NewActivityEraser builds the in-memory audit-log residual eraser.
func (*Store) Repositories ¶
func (s *Store) Repositories() application.Repositories
Repositories returns the full repository set over this store, including the in-process FQL executor.
func (*Store) SearchStore ¶
func (s *Store) SearchStore() search.DocumentStore
SearchStore returns the in-memory search projection store.
func (*Store) Transactor ¶
func (s *Store) Transactor() db.Transactor
Transactor returns a transactor honouring the pre/post/rollback hook contract. On rollback it replays the transaction's undo journal — restoring exactly the keys that transaction wrote — so a unit of work that writes then fails leaves no partial data (matching PostgreSQL's atomicity) WITHOUT disturbing the writes any other in-flight transaction has committed.