0.6.9 • Published 6 years ago
@rappopo/dab-knex v0.6.9
@rappopo/dab-knex
A Rappopo DAB implementation for Knex
Installation
Simply invoke this command in your project folder:
$ npm install --save @rappopo/dab-knex
Don't forget to also install the needed client library, e.g (if you choose to use sqlite3):
$ npm install sqlite3
And within your script:
const DabKnex = require('@rappopo/dab-knex')
const dab = new DabKnex({
client: 'sqlite3',
connection: {
filename: '/tmp/mydb.sqlite3'
}
})
// prepare collections
dab.createCollection({ name: 'test' })
.then(result => {
return dab.bulkCreate(data, { collection: 'test' })
})
...
// lets dab!
dab.findOne('my-doc', 'test').then(function(doc) { ... })
Options
client
: your Knex's client database library
connection
: your Knex's connection settings
Features
- find
- findOne
- create
- update
- remove
- bulkCreate
- bulkUpdate
- bulkRemove
- copyFrom
- copyTo
- createCollection
- renameCollection
- removeCollection
Donation
License
0.6.9
6 years ago
0.6.8
7 years ago
0.6.7
7 years ago
0.6.6
7 years ago
0.6.5
7 years ago
0.6.4
7 years ago
0.6.3
7 years ago
0.6.2
7 years ago
0.6.1
7 years ago
0.5.1
8 years ago
0.5.0
8 years ago
0.4.0
8 years ago
0.3.0
8 years ago
0.2.3
8 years ago
0.2.2
8 years ago
0.2.1
8 years ago
0.2.0
8 years ago
0.1.2
8 years ago
0.1.1
8 years ago
0.1.0
8 years ago
0.0.7
8 years ago
0.0.6
8 years ago
0.0.5
8 years ago
0.0.4
8 years ago
0.0.3
8 years ago
0.0.2
8 years ago
0.0.1
8 years ago