Top "Knex.js" questions

Knex.

Get count result with knex.js / bookshelf.js

I'm trying to perform a simple count with knex (since it seems to not be supported by bookshelf yet). The …

bookshelf.js knex.js
Knex NodeJS and inserting into the database

I am new to nodejs and was trying to set up an API server, here is my first attempt. I …

mysql node.js knex.js
Storing a Node.js Date in a Knex dateTime()/MySQL DATETIME field

I'm having some trouble finding a date format that is common to Node.js, knex, and MySQL (via Bookshelf). I …

javascript mysql node.js knex.js
how to do select * from using knex in javascript?

I have a function like this: function get_projects() { var project_names=[]; knex('projects').select('name').then(function (a) { project_…

javascript node.js knex.js
Knex.js: Create table and insert data

Given that I have a Knex.js script like this: exports.up = function(knex, Promise) { return knex.schema.createTable('persons', …

node.js knex.js
How to do knex.js migrations?

I'm still not sure how to do my migrations with knex. Here is what I have so far. It works …

javascript knex.js
Batch update in knex

I'd like to perform a batch update using Knex.js For example: 'UPDATE foo SET [theValues] WHERE idFoo = 1' 'UPDATE …

javascript knex.js
Knexjs If not exist insert else update

How can this code be optimized? I don't want to call where 2 times... Is it possible to have better query …

knex.js
Can I conditionally add a where() clause to my knex query?

I want to add a where() clause in my query, but conditionally. Specifically, I want it added only if a …

javascript node.js knex.js
Knex.js multiple orderBy() columns

Is it possible to do multiple orderBy() columns? knex .select() .table('products') .orderBy('id', 'asc') The orderBy() chainable only takes …

node.js knex.js