MCPcopy Index your code
hub / github.com/Vincit/objection.js / emptyInstance

Method emptyInstance

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

Source from the content-addressed store, hash-verified

357 }
358
359 emptyInstance() {
360 const builder = new this.constructor(this.modelClass());
361
362 builder._findOperationFactory = this._findOperationFactory;
363 builder._insertOperationFactory = this._insertOperationFactory;
364 builder._updateOperationFactory = this._updateOperationFactory;
365 builder._patchOperationFactory = this._patchOperationFactory;
366 builder._relateOperationFactory = this._relateOperationFactory;
367 builder._unrelateOperationFactory = this._unrelateOperationFactory;
368 builder._deleteOperationFactory = this._deleteOperationFactory;
369 builder._relatedQueryFor = this._relatedQueryFor;
370
371 return builder;
372 }
373
374 clearWithGraph() {
375 this.clear(EagerOperation);

Callers 2

cloneMethod · 0.95
onAfter2Method · 0.80

Calls 1

modelClassMethod · 0.45

Tested by

no test coverage detected