share / share/sharedb-mingo-memory
Consider refactor to cast between snapshot and doc like sharedb-mongo
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5
- Forks
- 9
- Avg merge
- 3h 1m
- Merged PRs (30d)
- 3
Description
Filing @nateps's comment from a PR to keep track of it:
At first glance, I think it might be better to cast the format in which we store the docs rather than cast the query. This is how sharedb-mongo works, so I think it would be easier to make it more consistent. We might also be able to share code by creating another module that this and sharedb-mongo depend on or by at least copy-pasting and cross referencing the code.
Switching to snapshot/doc casting may make it easier to have filtering be fully consistent with sharedb-mongo.
In sharedb-mongo, query filters on special Share properties look like {'_v': {$lte: 10}}. https://github.com/share/sharedb-mingo-memory/pull/3 added sharedb-mingo-memory support for filtering on all such special properties except Share metadata. An example of such a metadata query is {'_m.mtime': {$gte: 100}}. I added a currently-skipped test for that.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the skipped metadata-query test in test/query.js and the referenced sharedb-mongo implementation, then review PR #3 to understand the current casting approach. The refactor should make snapshot/doc casting consistent with sharedb-mongo and enable the _m.mtime query test to pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb
- Domain
- database
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100