Knex
Initialization
var knex = require('knex')({
client: 'mysql',
connection: {
host : '127.0.0.1',
user : 'your_database_user',
password : 'your_database_password',
database : 'myapp_test'
}
});Usage
Select
await knex.select('title', 'author').from('books')
#Only first record
await knex.first('title', 'author').from('books')Insert
Query
Where
Order
Update
Count
Join
Last updated