UNPKG

mysql-rewrapped

Version:

A wrapper for MySQL on node to make querying a database as easy as possible

32 lines (31 loc) 1.25 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 Query_1 = require("../Query"); var Delete = /** @class */ (function (_super) { __extends(Delete, _super); function Delete() { return _super.call(this, "DELETE") || this; } Delete.prototype.toString = function () { return "DELETE FROM " + this.tableName + (this.whereStatement !== null ? " " + this.whereStatement : "") + ";"; }; Delete.prototype.exec = function (cback) { this.queryParams = this.whereParams; _super.prototype.exec.call(this, cback); }; return Delete; }(Query_1.default)); exports.default = Delete;