UNPKG

sedk-mysql

Version:
23 lines 777 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UpdateStep = void 0; const SetStep_1 = require("./SetStep"); const BaseStep_1 = require("../BaseStep"); class UpdateStep extends BaseStep_1.BaseStep { constructor(prevStep, table) { super(prevStep); this.table = table; this.throwIfTableNotInDb(table); } getStepStatement(artifacts = { tables: new Set(), columns: new Set() }) { return `UPDATE ${this.table.getStmt(this.data, artifacts)}`; } getStepArtifacts() { return { tables: new Set([this.table]), columns: new Set() }; } set(...values) { return new SetStep_1.SetStep(this, values); } } exports.UpdateStep = UpdateStep; //# sourceMappingURL=UpdateStep.js.map