medikoo / medikoo/dbjs

Different access modes

Open
#82 0 comments 0 reactions 1 assignee View on GitHub

@medikoo is already working on this.

Since Dec 6, 2017.

enhancement
Dominant language
JavaScript
Stars
27
Forks
4
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.