all files / lib/waterline/adapter/ index.js

100% Statements 9/9
50% Branches 5/10
100% Functions 1/1
100% Lines 9/9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38              266×     266×       266×     266×     266×   266×                        
/**
 * Base Adapter Definition
 */
 
var _ = require('lodash');
 
var Adapter = module.exports = function(options) {
 
  // Ensure the connections are set
  this.connections = options.connections || {};
 
  // Ensure the dictionary is built
  this.dictionary = options.dictionary || {};
 
  // Set a Query instance to get access to top
  // level query functions
  this.query = options.query || {};
 
  // Set Collection Name
  this.collection = options.collection || '';
 
  // Set Model Identity
  this.identity = options.identity || '';
 
  return this;
};
 
_.extend(
  Adapter.prototype,
  require('./dql'),
  require('./ddl'),
  require('./compoundQueries'),
  require('./aggregateQueries'),
  require('./setupTeardown'),
  require('./sync'),
  require('./stream')
);