Skip to content

Latest commit

 

History

History
125 lines (85 loc) · 2.91 KB

MILESTONES.md

File metadata and controls

125 lines (85 loc) · 2.91 KB

4.0.0 Branch

Immutable Querys DONE

When a query is created and mango-functions are done on it, it should return a new RxQuery each time without transforming the old one.

Currently:

const query1 = myCol.find().sort('name');
const query2 = query1.limit(2);

console.log(query1 == query2);
// true

Wanted:

const query1 = myCol.find().sort('name');
const query2 = query1.limit(2);

console.log(query1 == query2);
// false

Query-Cache DONE

  • Requires Immutable Querys

When 2 equal RxQuery's are created, RxDB should ensure they are the equal object. To do this, querys should be saved in a WeakMap and if exists, the query should be taken from it.

Currently:

const query1 = myCol.find().sort('name');
const query2 = myCol.find().sort('name');

console.log(query1 == query2);
// false

Wanted:

const query1 = myCol.find().sort('name');
const query2 = myCol.find().sort('name');

console.log(query1 == query2);
// true

ChangeDetection on RxQuerys DONE

  • Requires Query-Cache

When a ChangeEvent is fired on the collection, the query should detect if it is necessary to re-exec() or if the changeEvent does not affect the querys result.

Wanted:

const sub = myCol.find().sort('name').$;

myDocument.age = 4;
await myDocument.save();
// query should not re-exec since a change in age does not affect the result
// but the query$ should refire the documents again

myDocument.name = 'foobar';
await myDocument.save();
// query should re-exec since a change in age does affect the result

conflict-resolution

Pouchdb requires the developer to solve conflicts manually. A solution is to introduct a new keyword to the RxSchema conflictStrategy Here it is describe what should happen when a document-conflict happens. There should be the following default-strategies: first-insert-wins last-insert-wins lexical-ordering of the documents-hash It should also be possible to define custom resolution-strategies.

3.0.0 DONE

Things that will be implemented into version 3.0.0.

When v3.0.0 is done, all features which require breaking changes, will be implemented. This means you can then use RxDB in production without the fear breaking your clients database-state.

migration-strategies BREAKING

DONE

ORM

DONE

ORM-like function assignment.

  const col = await myDatabase.collection({
    name: 'heroes',
    methods: {
      doSomething: function(){
        console.log('AAAH!');
      }
    }
  });

  // laster
  const doc = await col.findOne().exec();
  doc.doSomething();
  // > 'AAAH!'

relations-populate [BREAKING]

DONE

RxCollection.upsert(), RxCollection.removeifexists()

DONE