Skip to content

Different access modes  #82

@medikoo

Description

@medikoo

Current access mode is sync. All properties are provided as they're kept in memory.
If value was not yet retrieved from database, it just resolves as undefined (or with default value from underlying prototype).

Additionally via getObservable we can get observable objects for given properties which emit events when value for property changes.

It'll be good to introduce different object representations

  • Sync: so one as it's now, where values for keys are resolves always with sync values.
  • Async: One that resolves at all times with Observable & Promise values. It will require custom promise implementation which is also an emitter, has resolved value mutable and resolves then callbacks sync way in settled state. That one could transparently work with persistent layer and resolve certain records on demand

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions