pailingual-odata
Version:
TypeScript client for OData v4 services
41 lines (40 loc) • 1.53 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var Executable = /** @class */ (function () {
function Executable(query) {
this.query = query;
}
Executable.prototype.$exec = function (options) {
return this.query.exec(options);
};
Executable.prototype.$url = function (options) {
return this.query.url((!options || options.queryParams != false)
? true
: false, options);
};
return Executable;
}());
export { Executable };
var ExecutableAndCount = /** @class */ (function (_super) {
__extends(ExecutableAndCount, _super);
function ExecutableAndCount() {
return _super !== null && _super.apply(this, arguments) || this;
}
ExecutableAndCount.prototype.$execWithCount = function (options) {
var q = this.query.count({ inline: true });
return q.exec(options);
};
return ExecutableAndCount;
}(Executable));
export { ExecutableAndCount };