christkv/node-mongodb-native — Issue #387: GridStore.exist with regexp on filename
Author: kaij
Created: 2011-10-30 19:25:50+00:00
State: open

Hello, I am using the GridStore exist function (gridstore.js) and was missing the possibility to add regexp queries on the filename. So I modified the test:

var query = (typeof fileIdObject == 'string' || Object.prototype.toString.call(fileIdObject) == '[object RegExp]' )
? {'filename':fileIdObject} : {'_id':fileIdObject};

Maybe this (or something similar) could be included in a future version?