Top "Knex.js" questions

Knex.

Multi row insert using Knex.js

Am trying to build an multi-row insert query using Knex.js My post request contains a variable which is formatted …

mysql node.js knex.js
knex: what is the appropriate way to create an array from results?

I have an endpoint that joins the user and user_emails table as a one-to-many relationship (postgresql). It look as …

javascript node.js postgresql knex.js
Knex.js - How To Update a Field With An Expression

How do we get Knex to create the following SQL statement: UPDATE item SET qtyonhand = qtyonhand + 1 WHERE rowid = 8 We're currently …

mysql sql-update knex.js
Bookshelf.js, query on related table

I have a model similar to the following: var ScholarlyPaper = Bookshelf.Model.extend({ tableName: 'papers', paragraphs: function() { return this.hasMany(…

node.js bookshelf.js knex.js
Why doesn't Jest complete the async operation(s) in this Node test?

I have the following simple test setup: test('what did I do to deserve this', async () => { expect.assertions(1) const …

node.js jestjs knex.js
Knex.js Schema: Multicolumn Index

Is there a way to specify a multicolumn index in the Knex.js schema? Or must one drop to raw …

node.js knex.js
Use operators 'like` or 'greater than' in Knex query with object syntax

I'm using JSON objects to build Knex queries like this: {where: {id: '5'} How can I use the same …

bookshelf.js knex.js
Bookshelf.js/Knex.js is too "helpful" with UTC DATETIME columns

I have a MySQL table, and this table has a DATETIME column named datetime_utc. It is, as you might …

javascript mysql datetime bookshelf.js knex.js
How does knex handle default values in SQLite?

We currently use mysql / knex, and I'm adding SQLite as a database for testing purposes. I'm getting Knex:warning - …

sql sqlite knex.js
knex.js join two subqueries (nested queries)

I want to join two subqueries in knex.js and produce this sql result. SELECT '*' FROM ( SELECT `*` FROM `…

knex.js