MCPcopy Create free account
hub / github.com/loopbackio/loopback-next / include

Method include

packages/filter/src/query.ts:648–662  ·  view source on GitHub ↗

* Declare `include` * @param i - A relation name, an array of relation names, or an `Inclusion` * object for the relation/scope definitions

(...i: (string | string[] | Inclusion)[])

Source from the content-addressed store, hash-verified

646 * object for the relation/scope definitions
647 */
648 include(...i: (string | string[] | Inclusion)[]): this {
649 if (this.filter.include == null) {
650 this.filter.include = [];
651 }
652 for (const include of i) {
653 if (typeof include === 'string') {
654 this.filter.include.push({relation: include});
655 } else if (Array.isArray(include)) {
656 for (const inc of include) this.filter.include.push({relation: inc});
657 } else {
658 this.filter.include!.push(include);
659 }
660 }
661 return this;
662 }
663
664 /**
665 * Declare a where clause

Callers 2

query.unit.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected