datx02/data-storage — pull request #3 by johanbrook (2014-02-06 00:03:56+00:00)
Title: Refactor database connection system

The old `getDb()` way of doing things isn't working out. This is especially ugly:

```js
return getDb.call(this).then(function(db) {
// do stuff with db
}
```

This patch deals with the scope of `this` better, and also adds a function `getStore` for quick, DRY retrieval of the main store object in the CRUD methods.