|
|
@ -489,10 +489,11 @@ Datastore.prototype.remove = function () { |
|
|
|
this.executor.push({ this: this, fn: this._remove, arguments: arguments }); |
|
|
|
this.executor.push({ this: this, fn: this._remove, arguments: arguments }); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
var db = new Datastore({ inMemoryOnly: true }) |
|
|
|
var db = new Datastore({ inMemoryOnly: true }) |
|
|
|
|
|
|
|
|
|
|
|
//db.ensureIndex({ fieldName: 'tag' });
|
|
|
|
db.ensureIndex({ fieldName: 'tag' }); |
|
|
|
|
|
|
|
|
|
|
|
db.insert({ tag: ['a', 'b', 'c'] }, function () { |
|
|
|
db.insert({ tag: ['a', 'b', 'c'] }, function () { |
|
|
|
db.find({ tag: 'b' }, function (err, item) { |
|
|
|
db.find({ tag: 'b' }, function (err, item) { |
|
|
|