Remove useless pointer keeping

pull/2/head
Louis Chatriot 12 years ago
parent 36a3a58fbc
commit 50dffefaae
  1. 1
      lib/datastore.js
  2. 2
      lib/indexes.js

@ -91,7 +91,6 @@ Datastore.prototype.ensureIndex = function (options, cb) {
if (!options.fieldName) { return callback({ missingFieldName: true }); }
if (this.indexes[options.fieldName]) { return callback(); }
options.datastore = this;
this.indexes[options.fieldName] = new Index(options);
try {

@ -15,13 +15,11 @@ function checkValueEquality (a, b) {
/**
* Create a new index
* @param {String} options.fieldName On which field should the index apply (can use dot notation to index on sub fields)
* @param {Datastore} options.datastore Datastore on which the index is created
* @param {Boolean} options.unique Optional, enforce a unique constraint (default: false)
* @param {Boolean} options.sparse Optional, allow a sparse index (we can have documents for which fieldName is undefined) (default: false)
*/
function Index (options) {
this.fieldName = options.fieldName;
this.datastore = options.datastore;
this.unique = options.unique || false;
this.sparse = options.sparse || false;

Loading…
Cancel
Save