Socket
Socket
Sign inDemoInstall

objection

Package Overview
Dependencies
Maintainers
2
Versions
200
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

objection - npm Package Compare versions

Comparing version 0.5.0-rc.2 to 0.5.0-rc.3

21

lib/queryBuilder/operations/WrappingQueryBuilderOperation.js

@@ -49,3 +49,3 @@ 'use strict';

WrappingQueryBuilderOperation.prototype.call = function call(builder, args) {
if (!wrapArgs(args, builder.knex(), this.opt)) {
if (!wrapArgs(args, builder.knex())) {
return false;

@@ -64,5 +64,5 @@ }

function wrapArgs(args, knex, opt) {
function wrapArgs(args, knex) {
for (var i = 0, l = args.length; i < l; ++i) {
if (!opt.acceptUndefinedArgs && _lodash2.default.isUndefined(args[i])) {
if (_lodash2.default.isUndefined(args[i])) {
// None of the query builder methods should accept undefined. Do nothing if

@@ -91,3 +91,2 @@ // one of the arguments is undefined. This enables us to do things like

var knexQueryBuilder = this;
// Wrap knex query builder into a QueryBuilderBase so that we can use

@@ -97,15 +96,3 @@ // our extended query builder in nested queries.

if (arguments.length > 1) {
var args = new Array(arguments.length);
args[0] = wrappedQueryBuilder;
for (var i = 1, l = arguments.length; i < l; ++i) {
args[i] = arguments[i];
}
func.apply(wrappedQueryBuilder, args);
} else {
func.call(wrappedQueryBuilder, wrappedQueryBuilder);
}
func.call(wrappedQueryBuilder, wrappedQueryBuilder);
wrappedQueryBuilder.buildInto(knexQueryBuilder);

@@ -112,0 +99,0 @@ } else {

32

lib/queryBuilder/QueryBuilderBase.js

@@ -28,2 +28,6 @@ 'use strict';

var _deprecated = require('../utils/decorators/deprecated');
var _deprecated2 = _interopRequireDefault(_deprecated);
var _QueryBuilderContextBase = require('./QueryBuilderContextBase');

@@ -105,3 +109,3 @@

var QueryBuilderBase = (_dec = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec2 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec3 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec4 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default, 'delete'), _dec5 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec6 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec7 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec8 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec9 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec10 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec11 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec12 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec13 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec14 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec15 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec16 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec17 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec18 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec19 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec20 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec21 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec22 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec23 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec24 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec25 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec26 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec27 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec28 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec29 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec30 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec31 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec32 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec33 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec34 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec35 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec36 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec37 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec38 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec39 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec40 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec41 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec42 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec43 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec44 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec45 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec46 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec47 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec48 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec49 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec50 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec51 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec52 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec53 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec54 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec55 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec56 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec57 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec58 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec59 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec60 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec61 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec62 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec63 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec64 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec65 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec66 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec67 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec68 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec69 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec70 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec71 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec72 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec73 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec74 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec75 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec76 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec77 = (0, _queryBuilderOperation2.default)([_KnexOperation2.default, { acceptUndefinedArgs: true }]), _dec78 = (0, _queryBuilderOperation2.default)([_WhereRefOperation2.default, { bool: 'and' }]), _dec79 = (0, _queryBuilderOperation2.default)([_WhereRefOperation2.default, { bool: 'or' }]), _dec80 = (0, _queryBuilderOperation2.default)(_WhereCompositeOperation2.default), _dec81 = (0, _queryBuilderOperation2.default)({
var QueryBuilderBase = (_dec = (0, _deprecated2.default)({ removedIn: '0.7.0', useInstead: 'modify' }), _dec2 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec3 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec4 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec5 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default, 'delete'), _dec6 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec7 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec8 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec9 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec10 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec11 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec12 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec13 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec14 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec15 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec16 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec17 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec18 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec19 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec20 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec21 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec22 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec23 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec24 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec25 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec26 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec27 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec28 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec29 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec30 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec31 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec32 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec33 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec34 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec35 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec36 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec37 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec38 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec39 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec40 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec41 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec42 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec43 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec44 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec45 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec46 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec47 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec48 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec49 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec50 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec51 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec52 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec53 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec54 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec55 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec56 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec57 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec58 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec59 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec60 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec61 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec62 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec63 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec64 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec65 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec66 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec67 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec68 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec69 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec70 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec71 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec72 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec73 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec74 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec75 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec76 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec77 = (0, _queryBuilderOperation2.default)(_KnexOperation2.default), _dec78 = (0, _queryBuilderOperation2.default)([_WhereRefOperation2.default, { bool: 'and' }]), _dec79 = (0, _queryBuilderOperation2.default)([_WhereRefOperation2.default, { bool: 'or' }]), _dec80 = (0, _queryBuilderOperation2.default)(_WhereCompositeOperation2.default), _dec81 = (0, _queryBuilderOperation2.default)({
default: _WhereInCompositeOperation2.default,

@@ -194,3 +198,20 @@ sqlite3: _WhereInCompositeSqliteOperation2.default

func.call(this, this);
return this;
};
/**
* @param {function} func
* @returns {QueryBuilderBase}
*/
QueryBuilderBase.prototype.modify = function modify(func) {
if (arguments.length === 1) {
func.call(this, this);
} else {
var args = _lodash2.default.toArray(arguments);
args[0] = this;
func.apply(this, args);
}
return this;

@@ -876,9 +897,2 @@ };

QueryBuilderBase.prototype.modify = function modify() {};
/**
* @returns {QueryBuilderBase}
*/
QueryBuilderBase.prototype.whereRef = function whereRef(lhs, op, rhs) {};

@@ -1144,3 +1158,3 @@

return QueryBuilderBase;
}(), (_applyDecoratedDescriptor(_class.prototype, 'insert', [_dec], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'insert'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'update', [_dec2], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'update'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'delete', [_dec3], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'delete'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'del', [_dec4], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'del'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'select', [_dec5], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'select'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'forUpdate', [_dec6], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'forUpdate'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'forShare', [_dec7], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'forShare'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'as', [_dec8], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'as'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'columns', [_dec9], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'columns'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'column', [_dec10], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'column'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'from', [_dec11], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'from'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'fromJS', [_dec12], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'fromJS'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'into', [_dec13], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'into'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'withSchema', [_dec14], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'withSchema'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'table', [_dec15], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'table'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'distinct', [_dec16], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'distinct'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'join', [_dec17], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'join'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'joinRaw', [_dec18], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'joinRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'innerJoin', [_dec19], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'innerJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'leftJoin', [_dec20], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'leftJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'leftOuterJoin', [_dec21], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'leftOuterJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'rightJoin', [_dec22], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'rightJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'rightOuterJoin', [_dec23], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'rightOuterJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'outerJoin', [_dec24], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'outerJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'fullOuterJoin', [_dec25], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'fullOuterJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'crossJoin', [_dec26], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'crossJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'where', [_dec27], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'where'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'andWhere', [_dec28], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'andWhere'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhere', [_dec29], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhere'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereNot', [_dec30], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereNot'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereNot', [_dec31], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereNot'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereRaw', [_dec32], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereWrapped', [_dec33], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereWrapped'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'havingWrapped', [_dec34], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'havingWrapped'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereRaw', [_dec35], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereExists', [_dec36], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereExists'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereExists', [_dec37], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereExists'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereNotExists', [_dec38], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereNotExists'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereNotExists', [_dec39], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereNotExists'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereIn', [_dec40], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereIn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereIn', [_dec41], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereIn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereNotIn', [_dec42], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereNotIn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereNotIn', [_dec43], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereNotIn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereNull', [_dec44], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereNull'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereNull', [_dec45], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereNull'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereNotNull', [_dec46], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereNotNull'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereNotNull', [_dec47], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereNotNull'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereBetween', [_dec48], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereBetween'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereNotBetween', [_dec49], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereNotBetween'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereBetween', [_dec50], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereBetween'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereNotBetween', [_dec51], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereNotBetween'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'groupBy', [_dec52], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'groupBy'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'groupByRaw', [_dec53], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'groupByRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orderBy', [_dec54], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orderBy'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orderByRaw', [_dec55], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orderByRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'union', [_dec56], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'union'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'unionAll', [_dec57], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'unionAll'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'having', [_dec58], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'having'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'havingRaw', [_dec59], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'havingRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orHaving', [_dec60], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orHaving'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orHavingRaw', [_dec61], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orHavingRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'offset', [_dec62], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'offset'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'limit', [_dec63], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'limit'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'count', [_dec64], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'count'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'countDistinct', [_dec65], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'countDistinct'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'min', [_dec66], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'min'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'max', [_dec67], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'max'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'sum', [_dec68], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'sum'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'avg', [_dec69], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'avg'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'avgDistinct', [_dec70], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'avgDistinct'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'debug', [_dec71], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'debug'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'returning', [_dec72], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'returning'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'truncate', [_dec73], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'truncate'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'connection', [_dec74], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'connection'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'options', [_dec75], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'options'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'columnInfo', [_dec76], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'columnInfo'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'modify', [_dec77], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'modify'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereRef', [_dec78], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereRef'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereRef', [_dec79], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereRef'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereComposite', [_dec80], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereComposite'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereInComposite', [_dec81], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereInComposite'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonEquals', [_dec82], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonEquals'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonEquals', [_dec83], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonEquals'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonNotEquals', [_dec84], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonNotEquals'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonNotEquals', [_dec85], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonNotEquals'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonSupersetOf', [_dec86], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonSupersetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonSupersetOf', [_dec87], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonSupersetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonNotSupersetOf', [_dec88], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonNotSupersetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonNotSupersetOf', [_dec89], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonNotSupersetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonSubsetOf', [_dec90], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonSubsetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonSubsetOf', [_dec91], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonSubsetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonNotSubsetOf', [_dec92], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonNotSubsetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonNotSubsetOf', [_dec93], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonNotSubsetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonNotArray', [_dec94], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonNotArray'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonNotArray', [_dec95], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonNotArray'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonNotObject', [_dec96], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonNotObject'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonNotObject', [_dec97], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonNotObject'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonHasAny', [_dec98], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonHasAny'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonHasAny', [_dec99], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonHasAny'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonHasAll', [_dec100], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonHasAll'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonHasAll', [_dec101], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonHasAll'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonField', [_dec102], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonField'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonField', [_dec103], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonField'), _class.prototype)), _class));
}(), (_applyDecoratedDescriptor(_class.prototype, 'call', [_dec], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'call'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'insert', [_dec2], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'insert'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'update', [_dec3], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'update'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'delete', [_dec4], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'delete'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'del', [_dec5], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'del'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'select', [_dec6], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'select'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'forUpdate', [_dec7], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'forUpdate'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'forShare', [_dec8], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'forShare'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'as', [_dec9], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'as'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'columns', [_dec10], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'columns'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'column', [_dec11], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'column'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'from', [_dec12], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'from'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'fromJS', [_dec13], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'fromJS'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'into', [_dec14], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'into'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'withSchema', [_dec15], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'withSchema'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'table', [_dec16], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'table'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'distinct', [_dec17], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'distinct'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'join', [_dec18], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'join'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'joinRaw', [_dec19], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'joinRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'innerJoin', [_dec20], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'innerJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'leftJoin', [_dec21], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'leftJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'leftOuterJoin', [_dec22], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'leftOuterJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'rightJoin', [_dec23], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'rightJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'rightOuterJoin', [_dec24], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'rightOuterJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'outerJoin', [_dec25], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'outerJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'fullOuterJoin', [_dec26], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'fullOuterJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'crossJoin', [_dec27], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'crossJoin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'where', [_dec28], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'where'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'andWhere', [_dec29], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'andWhere'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhere', [_dec30], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhere'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereNot', [_dec31], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereNot'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereNot', [_dec32], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereNot'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereRaw', [_dec33], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereWrapped', [_dec34], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereWrapped'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'havingWrapped', [_dec35], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'havingWrapped'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereRaw', [_dec36], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereExists', [_dec37], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereExists'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereExists', [_dec38], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereExists'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereNotExists', [_dec39], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereNotExists'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereNotExists', [_dec40], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereNotExists'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereIn', [_dec41], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereIn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereIn', [_dec42], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereIn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereNotIn', [_dec43], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereNotIn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereNotIn', [_dec44], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereNotIn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereNull', [_dec45], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereNull'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereNull', [_dec46], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereNull'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereNotNull', [_dec47], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereNotNull'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereNotNull', [_dec48], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereNotNull'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereBetween', [_dec49], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereBetween'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereNotBetween', [_dec50], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereNotBetween'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereBetween', [_dec51], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereBetween'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereNotBetween', [_dec52], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereNotBetween'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'groupBy', [_dec53], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'groupBy'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'groupByRaw', [_dec54], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'groupByRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orderBy', [_dec55], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orderBy'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orderByRaw', [_dec56], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orderByRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'union', [_dec57], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'union'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'unionAll', [_dec58], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'unionAll'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'having', [_dec59], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'having'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'havingRaw', [_dec60], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'havingRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orHaving', [_dec61], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orHaving'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orHavingRaw', [_dec62], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orHavingRaw'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'offset', [_dec63], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'offset'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'limit', [_dec64], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'limit'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'count', [_dec65], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'count'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'countDistinct', [_dec66], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'countDistinct'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'min', [_dec67], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'min'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'max', [_dec68], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'max'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'sum', [_dec69], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'sum'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'avg', [_dec70], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'avg'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'avgDistinct', [_dec71], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'avgDistinct'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'debug', [_dec72], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'debug'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'returning', [_dec73], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'returning'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'truncate', [_dec74], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'truncate'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'connection', [_dec75], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'connection'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'options', [_dec76], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'options'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'columnInfo', [_dec77], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'columnInfo'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereRef', [_dec78], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereRef'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereRef', [_dec79], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereRef'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereComposite', [_dec80], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereComposite'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereInComposite', [_dec81], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereInComposite'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonEquals', [_dec82], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonEquals'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonEquals', [_dec83], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonEquals'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonNotEquals', [_dec84], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonNotEquals'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonNotEquals', [_dec85], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonNotEquals'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonSupersetOf', [_dec86], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonSupersetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonSupersetOf', [_dec87], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonSupersetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonNotSupersetOf', [_dec88], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonNotSupersetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonNotSupersetOf', [_dec89], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonNotSupersetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonSubsetOf', [_dec90], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonSubsetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonSubsetOf', [_dec91], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonSubsetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonNotSubsetOf', [_dec92], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonNotSubsetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonNotSubsetOf', [_dec93], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonNotSubsetOf'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonNotArray', [_dec94], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonNotArray'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonNotArray', [_dec95], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonNotArray'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonNotObject', [_dec96], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonNotObject'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonNotObject', [_dec97], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonNotObject'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonHasAny', [_dec98], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonHasAny'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonHasAny', [_dec99], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonHasAny'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonHasAll', [_dec100], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonHasAll'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonHasAll', [_dec101], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonHasAll'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'whereJsonField', [_dec102], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'whereJsonField'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'orWhereJsonField', [_dec103], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'orWhereJsonField'), _class.prototype)), _class));
exports.default = QueryBuilderBase;

@@ -65,3 +65,3 @@ 'use strict';

return this.relation.relatedModelClass.query().childQueryOf(builder).patch(patch).copyFrom(builder, /where/i).whereInComposite(this.relation.relatedModelClass.getFullIdColumn(), this.ids).call(this.relation.filter);
return this.relation.relatedModelClass.query().childQueryOf(builder).patch(patch).copyFrom(builder, /where/i).whereInComposite(this.relation.relatedModelClass.getFullIdColumn(), this.ids).modify(this.relation.filter);
};

@@ -68,0 +68,0 @@

@@ -52,3 +52,3 @@ 'use strict';

return this.relation.relatedModelClass.query().childQueryOf(builder).patch(patch).copyFrom(builder, /where/i).whereComposite(this.relation.fullRelatedCol(), this.owner.$values(this.relation.ownerProp)).call(this.relation.filter);
return this.relation.relatedModelClass.query().childQueryOf(builder).patch(patch).copyFrom(builder, /where/i).whereComposite(this.relation.fullRelatedCol(), this.owner.$values(this.relation.ownerProp)).modify(this.relation.filter);
};

@@ -55,0 +55,0 @@

@@ -45,3 +45,3 @@ 'use strict';

_DeleteOperation.prototype.onBeforeBuild.call(this, builder);
this.relation.selectForModify(builder, this.owner).call(this.relation.filter);
this.relation.selectForModify(builder, this.owner).modify(this.relation.filter);
};

@@ -48,0 +48,0 @@

@@ -45,3 +45,3 @@ 'use strict';

_DeleteOperation.prototype.onBeforeBuild.call(this, builder);
this.relation.selectForModifySqlite(builder, this.owner).call(this.relation.filter);
this.relation.selectForModifySqlite(builder, this.owner).modify(this.relation.filter);
};

@@ -48,0 +48,0 @@

@@ -366,3 +366,3 @@ 'use strict';

return builder.call(this.filter);
return builder.modify(this.filter);
};

@@ -406,3 +406,3 @@

});
}).call(this.filter);
}).modify(this.filter);
};

@@ -409,0 +409,0 @@

@@ -45,3 +45,3 @@ 'use strict';

ManyToManyUnrelateOperation.prototype.queryExecutor = function queryExecutor(builder) {
var selectRelatedColQuery = this.relation.relatedModelClass.query().childQueryOf(builder).copyFrom(builder, /where/i).select(this.relation.fullRelatedCol()).call(this.relation.filter);
var selectRelatedColQuery = this.relation.relatedModelClass.query().childQueryOf(builder).copyFrom(builder, /where/i).select(this.relation.fullRelatedCol()).modify(this.relation.filter);

@@ -48,0 +48,0 @@ return this.relation.joinTableModelClass.bindKnex(builder.knex()).query().childQueryOf(builder).delete().whereComposite(this.relation.fullJoinTableOwnerCol(), this.owner.$values(this.relation.ownerProp)).whereInComposite(this.relation.fullJoinTableRelatedCol(), selectRelatedColQuery).runAfter(_lodash2.default.constant({}));

@@ -57,3 +57,3 @@ 'use strict';

var selectRelatedQuery = this.relation.relatedModelClass.query().childQueryOf(builder).copyFrom(builder, /where/i).select(joinTableAliasRowId).call(this.relation.filter).whereComposite(this.relation.fullJoinTableOwnerCol(), ownerId).join(joinTableAsAlias, function (join) {
var selectRelatedQuery = this.relation.relatedModelClass.query().childQueryOf(builder).copyFrom(builder, /where/i).select(joinTableAliasRowId).modify(this.relation.filter).whereComposite(this.relation.fullJoinTableOwnerCol(), ownerId).join(joinTableAsAlias, function (join) {
_lodash2.default.each(_this2.relation.fullJoinTableRelatedCol(), function (joinTableRelatedCol, idx) {

@@ -60,0 +60,0 @@ join.on(joinTableRelatedCol, fullRelatedCol[idx]);

@@ -45,3 +45,3 @@ 'use strict';

_UpdateOperation.prototype.onBeforeBuild.call(this, builder);
this.relation.selectForModify(builder, this.owner).call(this.relation.filter);
this.relation.selectForModify(builder, this.owner).modify(this.relation.filter);
};

@@ -48,0 +48,0 @@

@@ -45,3 +45,3 @@ 'use strict';

_UpdateOperation.prototype.onBeforeBuild.call(this, builder);
this.relation.selectForModifySqlite(builder, this.owner).call(this.relation.filter);
this.relation.selectForModifySqlite(builder, this.owner).modify(this.relation.filter);
};

@@ -48,0 +48,0 @@

@@ -346,3 +346,3 @@ 'use strict';

return builder.call(this.filter);
return builder.modify(this.filter);
};

@@ -373,3 +373,3 @@

});
}).call(this.filter);
}).modify(this.filter);
};

@@ -376,0 +376,0 @@

@@ -6,7 +6,2 @@ 'use strict';

});
var _defineProperty = require('babel-runtime/core-js/object/define-property');
var _defineProperty2 = _interopRequireDefault(_defineProperty);
exports.getDialect = getDialect;

@@ -17,3 +12,2 @@ exports.isPostgres = isPostgres;

exports.isKnexQueryBuilder = isKnexQueryBuilder;
exports.overwriteForDatabase = overwriteForDatabase;

@@ -24,8 +18,10 @@ var _lodash = require('lodash');

var _builder = require('knex/lib/query/builder');
var _builder2 = _interopRequireDefault(_builder);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var OVERWRITE_FOR_DATABASE_KEY = '@overwriteForDatabase';
function getDialect(knex) {
return knex.client.dialect;
return knex && knex.client && knex.client.dialect || null;
}

@@ -46,62 +42,3 @@

function isKnexQueryBuilder(knexQueryBuilder) {
// TODO: Use something safer
return knexQueryBuilder && knexQueryBuilder.client && _lodash2.default.isString(knexQueryBuilder.client.dialect);
}
function overwriteForDatabase(input) {
// If there is no input or if the input is a function, we assume that the
// decorator was applied to a class instead of a method.
var isClassDecorator = _lodash2.default.isUndefined(input) || _lodash2.default.isFunction(input);
if (isClassDecorator) {
// In case of class decorator, the input should be a function that returns
// a knex instance that the method version can use.
var getKnex = input;
if (_lodash2.default.isUndefined(getKnex)) {
// The default getter attempts to call a function called `knex`.
getKnex = function getKnex(inst) {
return inst.knex();
};
}
return overwriteForDatabaseClass(getKnex);
} else {
return overwriteForDatabaseMethod(input);
}
}
function overwriteForDatabaseClass(getKnex) {
return function (constructor) {
if (constructor[OVERWRITE_FOR_DATABASE_KEY]) {
// Knex getter is already registered. Do nothing.
return;
}
(0, _defineProperty2.default)(constructor, OVERWRITE_FOR_DATABASE_KEY, {
enumerable: false,
writable: false,
value: { getKnex: getKnex }
});
};
}
function overwriteForDatabaseMethod(input) {
return function (target, property, descriptor) {
var methodNameByDialect = input;
var defaultImpl = descriptor.value;
descriptor.value = function () {
var knex = this.constructor[OVERWRITE_FOR_DATABASE_KEY].getKnex(this);
var dialect = getDialect(knex);
// Call the correct method based on the dialect.
if (dialect in methodNameByDialect) {
var methodName = methodNameByDialect[dialect];
return this[methodName].apply(this, arguments);
} else {
return defaultImpl.apply(this, arguments);
}
};
};
return knexQueryBuilder instanceof _builder2.default;
}
{
"name": "objection",
"version": "0.5.0-rc.2",
"version": "0.5.0-rc.3",
"description": "An SQL-friendly ORM for Node.js",

@@ -52,2 +52,5 @@ "main": "lib/objection.js",

},
"peerDependencies": {
"knex": ">= 0.8.0 < 0.11.0"
},
"devDependencies": {

@@ -54,0 +57,0 @@ "babel-core": "^6.3.17",

@@ -14,3 +14,3 @@ import _ from 'lodash';

call(builder, args) {
if (!wrapArgs(args, builder.knex(), this.opt)) {
if (!wrapArgs(args, builder.knex())) {
return false;

@@ -24,5 +24,5 @@ }

function wrapArgs(args, knex, opt) {
function wrapArgs(args, knex) {
for (let i = 0, l = args.length; i < l; ++i) {
if (!opt.acceptUndefinedArgs && _.isUndefined(args[i])) {
if (_.isUndefined(args[i])) {
// None of the query builder methods should accept undefined. Do nothing if

@@ -51,3 +51,2 @@ // one of the arguments is undefined. This enables us to do things like

const knexQueryBuilder = this;
// Wrap knex query builder into a QueryBuilderBase so that we can use

@@ -57,15 +56,3 @@ // our extended query builder in nested queries.

if (arguments.length > 1) {
const args = new Array(arguments.length);
args[0] = wrappedQueryBuilder;
for (let i = 1, l = arguments.length; i < l; ++i) {
args[i] = arguments[i];
}
func.apply(wrappedQueryBuilder, args);
} else {
func.call(wrappedQueryBuilder, wrappedQueryBuilder);
}
func.call(wrappedQueryBuilder, wrappedQueryBuilder);
wrappedQueryBuilder.buildInto(knexQueryBuilder);

@@ -72,0 +59,0 @@ } else {

import _ from 'lodash';
import queryBuilderOperation from './decorators/queryBuilderOperation';
import {inherits} from '../utils/classUtils';
import deprecated from '../utils/decorators/deprecated'

@@ -95,5 +96,21 @@ import QueryBuilderContextBase from './QueryBuilderContextBase';

*/
@deprecated({removedIn: '0.7.0', useInstead: 'modify'})
call(func) {
func.call(this, this);
return this;
}
/**
* @param {function} func
* @returns {QueryBuilderBase}
*/
modify(func) {
if (arguments.length === 1) {
func.call(this, this);
} else {
let args = _.toArray(arguments);
args[0] = this;
func.apply(this, args);
}
return this;

@@ -671,8 +688,2 @@ }

*/
@queryBuilderOperation([KnexOperation, {acceptUndefinedArgs: true}])
modify(...args) {}
/**
* @returns {QueryBuilderBase}
*/
@queryBuilderOperation([WhereRefOperation, {bool: 'and'}])

@@ -679,0 +690,0 @@ whereRef(lhs, op, rhs) {}

@@ -36,3 +36,3 @@ import _ from 'lodash';

.whereInComposite(this.relation.relatedModelClass.getFullIdColumn(), this.ids)
.call(this.relation.filter);
.modify(this.relation.filter);
}

@@ -39,0 +39,0 @@

@@ -28,3 +28,3 @@ import _ from 'lodash';

.whereComposite(this.relation.fullRelatedCol(), this.owner.$values(this.relation.ownerProp))
.call(this.relation.filter);
.modify(this.relation.filter);
}

@@ -31,0 +31,0 @@

@@ -15,4 +15,4 @@ import _ from 'lodash';

super.onBeforeBuild(builder);
this.relation.selectForModify(builder, this.owner).call(this.relation.filter);
this.relation.selectForModify(builder, this.owner).modify(this.relation.filter);
}
}

@@ -15,4 +15,4 @@ import _ from 'lodash';

super.onBeforeBuild(builder);
this.relation.selectForModifySqlite(builder, this.owner).call(this.relation.filter);
this.relation.selectForModifySqlite(builder, this.owner).modify(this.relation.filter);
}
}

@@ -229,3 +229,3 @@ import _ from 'lodash';

return builder.call(this.filter);
return builder.modify(this.filter);
}

@@ -264,3 +264,3 @@

})
.call(this.filter);
.modify(this.filter);
}

@@ -267,0 +267,0 @@

@@ -20,3 +20,3 @@ import _ from 'lodash';

.select(this.relation.fullRelatedCol())
.call(this.relation.filter);
.modify(this.relation.filter);

@@ -23,0 +23,0 @@ return this.relation.joinTableModelClass

@@ -30,3 +30,3 @@ import _ from 'lodash';

.select(joinTableAliasRowId)
.call(this.relation.filter)
.modify(this.relation.filter)
.whereComposite(this.relation.fullJoinTableOwnerCol(), ownerId)

@@ -33,0 +33,0 @@ .join(joinTableAsAlias, join => {

@@ -15,4 +15,4 @@ import _ from 'lodash';

super.onBeforeBuild(builder);
this.relation.selectForModify(builder, this.owner).call(this.relation.filter);
this.relation.selectForModify(builder, this.owner).modify(this.relation.filter);
}
}

@@ -15,4 +15,4 @@ import _ from 'lodash';

super.onBeforeBuild(builder);
this.relation.selectForModifySqlite(builder, this.owner).call(this.relation.filter);
this.relation.selectForModifySqlite(builder, this.owner).modify(this.relation.filter);
}
}

@@ -253,3 +253,3 @@ import _ from 'lodash';

return builder.call(this.filter);
return builder.modify(this.filter);
}

@@ -278,3 +278,3 @@

})
.call(this.filter);
.modify(this.filter);
}

@@ -281,0 +281,0 @@

import _ from 'lodash';
import KnexQueryBuilder from 'knex/lib/query/builder'
const OVERWRITE_FOR_DATABASE_KEY = `@overwriteForDatabase`;
export function getDialect(knex) {
return knex.client.dialect;
return (knex && knex.client && knex.client.dialect) || null;
}

@@ -22,62 +21,3 @@

export function isKnexQueryBuilder(knexQueryBuilder) {
// TODO: Use something safer
return knexQueryBuilder
&& knexQueryBuilder.client
&& _.isString(knexQueryBuilder.client.dialect);
return knexQueryBuilder instanceof KnexQueryBuilder;
}
export function overwriteForDatabase(input) {
// If there is no input or if the input is a function, we assume that the
// decorator was applied to a class instead of a method.
let isClassDecorator = _.isUndefined(input) || _.isFunction(input);
if (isClassDecorator) {
// In case of class decorator, the input should be a function that returns
// a knex instance that the method version can use.
let getKnex = input;
if (_.isUndefined(getKnex)) {
// The default getter attempts to call a function called `knex`.
getKnex = (inst) => inst.knex();
}
return overwriteForDatabaseClass(getKnex);
} else {
return overwriteForDatabaseMethod(input);
}
}
function overwriteForDatabaseClass(getKnex) {
return function (constructor) {
if (constructor[OVERWRITE_FOR_DATABASE_KEY]) {
// Knex getter is already registered. Do nothing.
return;
}
Object.defineProperty(constructor, OVERWRITE_FOR_DATABASE_KEY, {
enumerable: false,
writable: false,
value: { getKnex }
});
};
}
function overwriteForDatabaseMethod(input) {
return function (target, property, descriptor) {
const methodNameByDialect = input;
const defaultImpl = descriptor.value;
descriptor.value = function () {
let knex = this.constructor[OVERWRITE_FOR_DATABASE_KEY].getKnex(this);
let dialect = getDialect(knex);
// Call the correct method based on the dialect.
if (dialect in methodNameByDialect) {
let methodName = methodNameByDialect[dialect];
return this[methodName].apply(this, arguments);
} else {
return defaultImpl.apply(this, arguments);
}
};
};
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc