How to use the knex/lib/builder.Builder function in knex

To help you get started, we’ve selected a few knex examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bookshelf / bookshelf / test / integration / helpers / logger.js View on Github external
var cwd           = process.cwd();
var isDev         = parseInt(process.env.BOOKSHELF_DEV, 10);

var _             = require('lodash');

var Ctors = {};

var Common          = require('knex/lib/common').Common;

Ctors.Raw           = require('knex/lib/raw').Raw;
Ctors.Builder       = require('knex/lib/builder').Builder;
Ctors.SchemaBuilder = require('knex/lib/schemabuilder').SchemaBuilder;

Ctors.Model         = require('../../../dialects/sql/model').Model;
Ctors.Collection    = require('../../../dialects/sql/collection').Collection;

var fs            = require('fs');
var objectdump    = require('objectdump');

// This is where all of the info from the query calls goes...
var output     = {};
var comparable = {};
var counters   = {};

exports.setLib = function(context) {

  var logMe = function(logWhat) {
github bookshelf / bookshelf / test / integration / model.js View on Github external
it('returns the Knex builder when no arguments are passed', function() {
        equal((model.query() instanceof require('knex/lib/builder').Builder), true);
      });