level-orm not putting rows in a sublevel?

Open
#1 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
databases

Research direction

Start by running npm test with rimraf commented out, then inspect data/testdb with superlevel createReadStream as described. Compare the observed keys with the expected sublevel format and trace the level-orm storage behavior, including its interoperability with level-query. Done means establishing whether the key layout is incorrect and identifying the affected behavior.

Written by the indexing model from the issue text.

Description

Hey @eugeneware,

I recently ran into an issue trying to extend this module and use it in combination with level-query. @maxogden pointed out that it didn't appear as though this module (level-orm) was storing the data in any sublevel.

Generating some test data with npm test (commenting out rimraf) and checking the raw leveldb seems to show values like this:

$ superlevel data/testdb createReadStream
{"key":"70c3bf7573657273c3bf68616e646c6539","value":"{\"handle\":\"handle9\",\"name\":\"name 9\"}"}

but we might expect to see something like

ÿusersÿ70c3bf6d657461646174c3bf31343134383533393330323032

I'm looking into it more now, but is there anything that comes to the top of your head why it might be doing this? (or are we wrong?)

I hope this might fix the problem as to the interoperability between level-orm and level-query, although i'm still relatively new to the internals of leveldb so some guidance is appreciated!

Dominant language
JavaScript
Stars
13
Forks
3
PR merge metrics
No merged PRs in 30d

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.

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.