sphinxql
Version:
SphinxQL query builder for Node.JS. Supports Sphinx search(2.x and 3.x) and Manticore search
27 lines • 996 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var BaseStatement_1 = require("./BaseStatement");
var TruncateStatement = (function (_super) {
tslib_1.__extends(TruncateStatement, _super);
function TruncateStatement(connection, rtIndex) {
var _this = _super.call(this, connection) || this;
_this.rtIndex = rtIndex;
_this.reconfigure = false;
return _this;
}
TruncateStatement.prototype.withReconfigure = function () {
this.reconfigure = true;
return this;
};
TruncateStatement.prototype.generate = function () {
var expression = "TRUNCATE RTINDEX " + this.rtIndex;
if (this.reconfigure) {
expression += " WITH RECONFIGURE";
}
return expression;
};
return TruncateStatement;
}(BaseStatement_1.default));
exports.default = TruncateStatement;
//# sourceMappingURL=TruncateStatement.js.map