Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

T http91

I may be slow to respond.
Block or report user

Report or block http91

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
http91 / count.js
Created Feb 8, 2016 — forked from jordansexton/count.js
Bookshelf.js/Knex.js innerJoin withRelated
View count.js
var Promise = require('bluebird'),
User = require('./user'),
knex, query;
knex = User.prototype._builder(User.prototype.tableName);
query = function (q) {
.innerJoin('orders', function () {
this.on('', '=', 'orders.user_id')
You can’t perform that action at this time.