UNPKG

pailingual-odata

Version:

TypeScript client for OData v4 services

43 lines (42 loc) 1.64 kB
"use strict"; 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 __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); 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; }()); exports.Executable = 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)); exports.ExecutableAndCount = ExecutableAndCount;