operator $in not working?

Open
#5 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
backend, databases

Research direction

Start by running the provided level-queryengine and jsonquery-engine reproduction, comparing the query with Id: 1 against the query using $in: [1]. Trace the query path that handles these two forms; done means the $in query emits the expected matching data before the end event.

Written by the indexing model from the issue text.

Description

var db, jsonqueryEngine, levelQuery, levelup, pairs;

levelQuery = require('level-queryengine');

jsonqueryEngine = require('jsonquery-engine');

pairs = require('pairs');

levelup = require('levelup');

db = levelQuery(levelup("./db", {
  valueEncoding: 'json'
}));

db.query.use(jsonqueryEngine());

db.ensureIndex('Id');

then if i execute:

dbl.query( { Id: 1 } ).on( "data", function(data){ console.log( "got data", data); } ).on( "end", function(){console.log( "end" )});

i get one result on "data"

but if i execute:

dbl.query( { Id: { $in: [1] } } ).on( "data", function(data){ console.log( "got data", data); } ).on( "end", function(){console.log( "end" )});

only the "end" event is being triggered.

any ideas?

Dominant language
JavaScript
Stars
55
Forks
5
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.

More from eugeneware/jsonquery-engine

All issues in eugeneware/jsonquery-engine

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.