Is it possible to find multiple value (like sql IN keyword) in YDN-DB?
//simple scenario
"SELECT * FROM categories WHERE code IN ('AB','CD','EF','GH','IJ','KL');"
var code = "'AB','CD','EF','GH','IJ','KL'";
var key_range = ydn.db.KeyRange.only(code);
cacheDb.values('categories','code',key_range).then(function(record){
console.log(record);
},function(e){
console.log(e);
});
You can use multi query approach, as described in recently updated tutorial.
Basically, you will create iterator for each element of IN clause and join (union) the result, as follow:
Then use
scan
method: