mirror of
https://github.com/xfarrow/blink
synced 2025-06-27 09:03:02 +02:00
Change endpoint from persons to people
This commit is contained in:
55
backend/apis/nodejs/node_modules/knex/lib/schema/internal/helpers.js
generated
vendored
Normal file
55
backend/apis/nodejs/node_modules/knex/lib/schema/internal/helpers.js
generated
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
const tail = require('lodash/tail');
|
||||
const { isString } = require('../../util/is');
|
||||
|
||||
// Push a new query onto the compiled "sequence" stack,
|
||||
// creating a new formatter, returning the compiler.
|
||||
function pushQuery(query) {
|
||||
if (!query) return;
|
||||
if (isString(query)) {
|
||||
query = { sql: query };
|
||||
}
|
||||
if (!query.bindings) {
|
||||
query.bindings = this.bindingsHolder.bindings;
|
||||
}
|
||||
this.sequence.push(query);
|
||||
|
||||
this.formatter = this.client.formatter(this._commonBuilder);
|
||||
this.bindings = [];
|
||||
this.formatter.bindings = this.bindings;
|
||||
}
|
||||
|
||||
// Used in cases where we need to push some additional column specific statements.
|
||||
function pushAdditional(fn) {
|
||||
const child = new this.constructor(
|
||||
this.client,
|
||||
this.tableCompiler,
|
||||
this.columnBuilder
|
||||
);
|
||||
fn.call(child, tail(arguments));
|
||||
this.sequence.additional = (this.sequence.additional || []).concat(
|
||||
child.sequence
|
||||
);
|
||||
}
|
||||
|
||||
// Unshift a new query onto the compiled "sequence" stack,
|
||||
// creating a new formatter, returning the compiler.
|
||||
function unshiftQuery(query) {
|
||||
if (!query) return;
|
||||
if (isString(query)) {
|
||||
query = { sql: query };
|
||||
}
|
||||
if (!query.bindings) {
|
||||
query.bindings = this.bindingsHolder.bindings;
|
||||
}
|
||||
this.sequence.unshift(query);
|
||||
|
||||
this.formatter = this.client.formatter(this._commonBuilder);
|
||||
this.bindings = [];
|
||||
this.formatter.bindings = this.bindings;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
pushAdditional,
|
||||
pushQuery,
|
||||
unshiftQuery,
|
||||
};
|
Reference in New Issue
Block a user