Question

I am using ydn-db as the plugin

I have defined indexes (secondary key) and I want to check if I have any data matching for that index.

suppose I have column3 as the index and I have the value "1001" Is there a way I can get a count/data or something if column3 has the value 1001 in it?

Était-ce utile?

La solution

It should be as simple as:

var kr = ydn.db.KeyRange.only(1001);
db.count('store name', 'index name', kr)

Or using newer syntax:

db.from('store name').where('index name', '=', 1001).count().done(...
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top