Update README.md

pull/2/head
Louis Chatriot 12 years ago
parent 9f636f8ca2
commit e5d6642e4e
  1. 5
      README.md

@ -301,11 +301,14 @@ d.insert({ name: 'nedb' }, function (err) {
d.insert({ name: 'nedb' }, function (err) { d.insert({ name: 'nedb' }, function (err) {
// err is { errorType: 'uniqueViolated' // err is { errorType: 'uniqueViolated'
// , key: 'name' // , key: 'name'
// , message: 'Unique constraint violated for key nedb' } // , message: 'Unique constraint violated for key name' }
}); });
}); });
``` ```
**Note: ** the ensureIndex creates the index synchronously, so it's best to use it at application startup. It's quite fast so it doesn't increase startup time much.
## Performance ## Performance
### Speed ### Speed

Loading…
Cancel
Save