ddl-manager
Version:
store postgres procedures and triggers in files
31 lines • 1.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Extract = void 0;
const AbstractExpressionElement_1 = require("./AbstractExpressionElement");
class Extract extends AbstractExpressionElement_1.AbstractExpressionElement {
constructor(extract, from) {
super();
this.extract = extract;
this.from = from;
}
children() {
return this.from.children();
}
replaceTable(replaceTable, toTable) {
return this.clone(this.from.replaceTable(replaceTable, toTable));
}
replaceColumn(replaceColumn, toSql) {
return this.clone(this.from.replaceColumn(replaceColumn, toSql));
}
replaceFuncCall(replaceFunc, toSql) {
return this.clone(this.from.replaceFuncCall(replaceFunc, toSql));
}
clone(from = this.from.clone()) {
return new Extract(this.extract, from);
}
template() {
return [`extract( ${this.extract} from ${this.from})`];
}
}
exports.Extract = Extract;
//# sourceMappingURL=Extract.js.map