database-builder
Version:
Library to assist in creating and maintaining SQL commands.
42 lines (41 loc) • 1.79 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.HavingBuilder = void 0;
var utils_1 = require("../core/utils");
var where_base_builder_1 = require("./where-base-builder");
var HavingBuilder = /** @class */ (function (_super) {
__extends(HavingBuilder, _super);
function HavingBuilder() {
return _super !== null && _super.apply(this, arguments) || this;
}
HavingBuilder.prototype._getInstance = function () {
return this;
};
HavingBuilder.prototype._create = function (typeT, alias) {
return new HavingBuilder(typeT, alias);
};
HavingBuilder.prototype.getColumnParams = function (expression) {
var compiled = utils_1.Utils.resolveExpressionProjection(expression);
return {
column: compiled.projection,
params: compiled.params
};
};
return HavingBuilder;
}(where_base_builder_1.WhereBaseBuilder));
exports.HavingBuilder = HavingBuilder;