Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var comb = require("comb"),
hitch = comb.hitch,
array = comb.array,
flatten = array.flatten,
compact = array.compact,
define = comb.define,
argsToArray = comb.argsToArray,
isString = comb.isString,
isEmpty = comb.isEmpty,
isNull = comb.isNull,
isBoolean = comb.isBoolean,
isNumber = comb.isNumber,
merge = comb.merge,
isArray = comb.isArray,
isObject = comb.isObject,
isFunction = comb.isFunction,
isUndefined = comb.isUndefined,
isHash = comb.isHash,
isInstanceOf = comb.isInstanceOf,
var mysql = require("mysql"),
comb = require("comb"),
hitch = comb.hitch,
asyncArray = comb.async.array,
define = comb.define,
merge = comb.merge,
string = comb.string,
argsToArray = comb.argsToArray,
format = string.format,
Promise = comb.Promise,
isString = comb.isString,
array = comb.array,
toArray = array.toArray,
isArray = comb.isArray,
isHash = comb.isHash,
when = comb.when,
isInstanceOf = comb.isInstanceOf,
isFunction = comb.isFunction,
isUndefinedOrNull = comb.isUndefinedOrNull,
isUndefined = comb.isUndefined,
isEmpty = comb.isEmpty,
QueryError = require("../errors").QueryError,
Dataset = require("../dataset"),
Database = require("../database"),
sql = require("../sql").sql,
DateTime = sql.DateTime,
Time = sql.Time,
Year = sql.Year,
var comb = require("comb"),
array = comb.array,
compact = array.compact,
flatten = array.flatten,
toArray = array.toArray,
net = require("net"),
isIP = net.isIP,
isIPv4 = net.isIPv4,
isIPv6 = net.isIPv6,
validator = require("validator"),
dateCmp = comb.date.compare,
isArray = comb.isArray,
combDeepEqual = comb.deepEqual,
combIsBoolean = comb.isBoolean,
isString = comb.isString,
combIsDefined = comb.isDefined,
combIsNull = comb.isNull,
ModelError = require("../errors.js").ModelError,
var comb = require("comb"),
define = comb.define,
isUndefined = comb.isUndefined,
isUndefinedOrNull = comb.isUndefinedOrNull,
isBoolean = comb.isBoolean,
isString = comb.isString,
isHash = comb.isHash,
when = comb.when,
isFunction = comb.isFunction,
isInstanceOf = comb.isInstanceOf,
Promise = comb.Promise,
PromiseList = comb.PromiseList,
array = comb.array,
toArray = array.toArray,
isArray = comb.isArray,
Middleware = comb.plugins.Middleware,
PatioError = require("../errors").PatioError;
var fetch = {
LAZY: "lazy",
EAGER: "eager"
};
/**
* @class
* Base class for all associations.
*
* <br>
var pg = require("pg"),
PgTypes = require("pg-types"),
QueryStream = require('pg-query-stream'),
comb = require("comb"),
asyncArray = comb.async.array,
string = comb.string,
isHash = comb.isHash,
argsToArray = comb.argsToArray,
pad = string.pad,
format = string.format,
when = comb.when,
array = comb.array,
toArray = array.toArray,
zip = array.zip,
flatten = array.flatten,
Promise = comb.Promise,
isUndefinedOrNull = comb.isUndefinedOrNull,
isUndefined = comb.isUndefined,
isString = comb.isString,
isArray = comb.isArray,
isEmpty = comb.isEmpty,
isBoolean = comb.isBoolean,
isObject = comb.isObject,
isFunction = comb.isFunction,
define = comb.define,
merge = comb.merge,
isDefined = comb.isDefined,
isInstanceOf = comb.isInstanceOf,
format = string.format,
SQL = require("../sql"),
sql = SQL.sql,
isUndefinedOrNull = comb.isUndefinedOrNull,
define = comb.define,
merge = comb.merge,
argsToArray = comb.argsToArray,
isString = comb.isString,
isHash = comb.isHash,
isArray = comb.isArray,
isObject = comb.isObject,
isFunction = comb.isFunction,
isBoolean = comb.isBoolean,
isEmpty = comb.isEmpty,
isInstanceOf = comb.isInstanceOf,
toArray = comb.array.toArray,
errors = require("../errors"),
QueryError = errors.QueryError;
/*
* This file contains dataset graphing related features. All methods return
* a copy of the dataset.
*/
//leave for later initialization
var Dataset;
//checks for a table alies if there isnt one throw an error.
var raiseAliasError = function (options) {
var isAlias = isUndefinedOrNull(options.tableAlias);
var comb = require("comb"),
toArray = comb.array.toArray,
isInstanceOf = comb.isInstanceOf,
isBoolean = comb.isBoolean,
when = comb.when,
isHash = comb.isHash,
isString = comb.isString,
sql = require("../sql.js").sql,
AliasedExpression = sql.AliasedExpression,
Identifier = sql.Identifier,
isConditionSpecifier = sql.Expression.isConditionSpecifier,
ModelError = require("../errors.js").ModelError;
/**
* @class This plugin exposes the ability to map columns on other tables to this Model.
*
* See {@link patio.plugins.ColumnMapper.mappedColumn} for more information.
var comb = require("comb"),
define = comb.define,
array = comb.array,
toArray = array.toArray,
intersect = array.intersect,
compact = array.compact,
string = comb.string,
format = string.format,
argsToArray = comb.argsToArray,
isInstanceOf = comb.isInstanceOf,
isArray = comb.isArray,
isNumber = comb.isNumber,
isDate = comb.isDate,
isNull = comb.isNull,
isBoolean = comb.isBoolean,
isFunction = comb.isFunction,
isUndefined = comb.isUndefined,
isObject = comb.isObject,
isHash = comb.isHash,
var comb = require("comb"),
define = comb.define,
isUndefined = comb.isUndefined,
isUndefinedOrNull = comb.isUndefinedOrNull,
isFunction = comb.isFunction,
isInstanceOf = comb.isInstanceOf,
sql = require("../sql").sql,
array = comb.array,
isBoolean = comb.isBoolean,
when = comb.when,
zip = array.zip,
Promise = comb.Promise,
PromiseList = comb.PromiseList,
OneToMany = require("./oneToMany"),
pluralize = comb.pluralize,
AssociationError = require("../errors").AssociationError;
var LOGGER = comb.logger("comb.associations.ManyToMany");
/**
* @class Class to define a manyToMany association.
*
* <br>
* <b>NOT to be instantiated directly</b>
* Its just documented for reference.
"use strict";
var comb = require("comb"),
asyncArray = comb.async.array,
isFunction = comb.isFunction,
argsToArray = comb.argsToArray,
array = comb.array,
isArray = comb.isArray,
isString = comb.isString,
isUndefined = comb.isUndefined,
isNumber = comb.isNumber,
toArray = comb.array.toArray,
hitch = comb.hitch,
format = comb.string.format,
Dataset = require("../dataset"),
Promise = comb.Promise,
PromiseList = comb.PromiseList,
errors = require("../errors"),
DatabaseError = errors.DatabaseError,
generators = require("./schemaGenerators"),
SchemaGenerator = generators.SchemaGenerator,
AlterTableGenerator = generators.AlterTableGenerator,
sql = require("../sql").sql,