MCPcopy
hub / github.com/Vincit/objection.js / clone

Method clone

lib/queryBuilder/QueryBuilder.js:340–357  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

338 }
339
340 clone() {
341 const builder = this.emptyInstance();
342
343 // Call the super class's clone implementation.
344 this.baseCloneInto(builder);
345
346 builder._resultModelClass = this._resultModelClass;
347
348 builder._explicitRejectValue = this._explicitRejectValue;
349 builder._explicitResolveValue = this._explicitResolveValue;
350 builder._modifiers = { ...this._modifiers };
351
352 builder._allowedGraphExpression = this._allowedGraphExpression;
353 builder._findOperationOptions = this._findOperationOptions;
354 builder._relatedQueryFor = this._relatedQueryFor;
355
356 return builder;
357 }
358
359 emptyInstance() {
360 const builder = new this.constructor(this.modelClass());

Callers 4

hasWheresMethod · 0.95
resultSizeMethod · 0.95
toKnexQueryMethod · 0.95
executeMethod · 0.95

Calls 2

emptyInstanceMethod · 0.95
baseCloneIntoMethod · 0.80

Tested by

no test coverage detected