1 | "use strict";
|
2 | var __extends = (this && this.__extends) || (function () {
|
3 | var extendStatics = function (d, b) {
|
4 | extendStatics = Object.setPrototypeOf ||
|
5 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6 | function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7 | return extendStatics(d, b);
|
8 | };
|
9 | return function (d, b) {
|
10 | if (typeof b !== "function" && b !== null)
|
11 | throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
12 | extendStatics(d, b);
|
13 | function __() { this.constructor = d; }
|
14 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15 | };
|
16 | })();
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | exports.OneToManyLink = void 0;
|
19 | var filter_1 = require("../filter");
|
20 | var link_1 = require("./link");
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | var OneToManyLink = (function (_super) {
|
27 | __extends(OneToManyLink, _super);
|
28 | function OneToManyLink() {
|
29 | var _this = _super !== null && _super.apply(this, arguments) || this;
|
30 | _this._orderBy = [];
|
31 | return _this;
|
32 | }
|
33 | OneToManyLink.prototype.clone = function () {
|
34 | var clonedLink = _super.prototype.clone.call(this);
|
35 | clonedLink._filters = this._filters;
|
36 | clonedLink._orderBy = this._orderBy;
|
37 | clonedLink._top = this._top;
|
38 | clonedLink._skip = this._skip;
|
39 | return clonedLink;
|
40 | };
|
41 | |
42 |
|
43 |
|
44 |
|
45 |
|
46 | OneToManyLink.prototype.filter = function () {
|
47 | var expressions = [];
|
48 | for (var _i = 0; _i < arguments.length; _i++) {
|
49 | expressions[_i] = arguments[_i];
|
50 | }
|
51 | var link = this.clone();
|
52 | link._filters = new filter_1.FilterLink(this, filter_1.toFilterableList(expressions));
|
53 | return link;
|
54 | };
|
55 | |
56 |
|
57 |
|
58 |
|
59 |
|
60 | OneToManyLink.prototype.orderBy = function () {
|
61 | var orderBy = [];
|
62 | for (var _i = 0; _i < arguments.length; _i++) {
|
63 | orderBy[_i] = arguments[_i];
|
64 | }
|
65 | var link = this.clone();
|
66 | link._orderBy = orderBy;
|
67 | return link;
|
68 | };
|
69 | |
70 |
|
71 |
|
72 |
|
73 |
|
74 | OneToManyLink.prototype.top = function (top) {
|
75 | var link = this.clone();
|
76 | link._top = top;
|
77 | return link;
|
78 | };
|
79 | |
80 |
|
81 |
|
82 |
|
83 |
|
84 | OneToManyLink.prototype.skip = function (skip) {
|
85 | var link = this.clone();
|
86 | link._skip = skip;
|
87 | return link;
|
88 | };
|
89 | return OneToManyLink;
|
90 | }(link_1.Link));
|
91 | exports.OneToManyLink = OneToManyLink;
|
92 |
|
\ | No newline at end of file |