objection
Version:
An SQL-friendly ORM for Node.js
20 lines (16 loc) • 431 B
JavaScript
export default class QueryBuilderContextBase {
constructor(userContext) {
this.userContext = userContext;
this.skipUndefined = false;
this.options = {};
this.knex = null;
}
clone() {
const ctx = new this.constructor();
ctx.userContext = this.userContext;
ctx.skipUndefined = this.skipUndefined;
ctx.options = Object.assign({}, this.options);
ctx.knex = this.knex;
return ctx;
}
}