A SQL query builder that is flexible, portable, and fun to use!
A batteries-included, multi-dialect (MSSQL, MySQL, PostgreSQL, SQLite3, Oracle(including Oracle Wallet Authentication), WebSQL) query builder for Node.js and the Browser, featuring:
For support and questions, join the
#bookshelf channel on freenode IRC
For an Object Relational Mapper, see:
To see the SQL that Knex will generate for a given query, see: Knex Query Lab
We have several examples on the website. Here is the first one to get you started:
var knex =dialect: 'sqlite3'connection:filename: './data.db';// Create a tableknexschema// ...and another// Then query the table...// ...and using the insert id, insert into the other table.// Query both of the rows.// .map over the results// Finally, add a .catch handler for the promise chain;