ravendb
Version:
RavenDB client for Node.js
37 lines • 1.36 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.HighlightingToken = void 0;
const QueryToken_js_1 = require("./QueryToken.js");
class HighlightingToken extends QueryToken_js_1.QueryToken {
_fieldName;
_fragmentLength;
_fragmentCount;
_optionsParameterName;
constructor(fieldName, fragmentLength, fragmentCount, operationsParameterName) {
super();
this._fieldName = fieldName;
this._fragmentLength = fragmentLength;
this._fragmentCount = fragmentCount;
this._optionsParameterName = operationsParameterName;
}
static create(fieldName, fragmentLength, fragmentCount, optionsParameterName) {
return new HighlightingToken(fieldName, fragmentLength, fragmentCount, optionsParameterName);
}
writeTo(writer) {
writer.append("highlight(");
QueryToken_js_1.QueryToken.writeField(writer, this._fieldName);
writer
.append(",")
.append(this._fragmentLength)
.append(",")
.append(this._fragmentCount);
if (this._optionsParameterName) {
writer
.append(",$")
.append(this._optionsParameterName);
}
writer.append(")");
}
}
exports.HighlightingToken = HighlightingToken;
//# sourceMappingURL=HighlightingToken.js.map