Skip to content
This repository was archived by the owner on Mar 4, 2019. It is now read-only.
This repository was archived by the owner on Mar 4, 2019. It is now read-only.

findDoc() setAttribute() destroy() to allow table name specified as 1st param #329

@bguiz

Description

@bguiz

saveDoc() allows two forms:

From root db object:

db.saveDoc("doggies", {name : "Fido", age : 10}, (err, doc) => { /* ... */});

From "name spaced" db object:

db.doggies.saveDoc({name : "Fido", age : 10}, (err, doc) => { /* ... */});

However, with findDoc() setAttribute() destroy(), this lib only allows the latter "name spaced" variety. The implementation detail of this relies on this being used under the hood, and that means that I need to do Function.prototype.bind() ion my code base.

It would be great if the other document functions also support the former variety, and return an error if the table does not exist yet.

Possible?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions