ravendb
Version:
RavenDB client for Node.js
30 lines • 1.15 kB
JavaScript
import { MoreLikeThisUsingAnyDocument } from "./MoreLikeThisUsingAnyDocument.js";
import { MoreLikeThisUsingDocument } from "./MoreLikeThisUsingDocument.js";
import { TypeUtil } from "../../../Utility/TypeUtil.js";
import { MoreLikeThisUsingDocumentForDocumentQuery } from "./MoreLikeThisUsingDocumentForDocumentQuery.js";
export class MoreLikeThisBuilder {
_moreLikeThis;
getMoreLikeThis() {
return this._moreLikeThis;
}
usingAnyDocument() {
this._moreLikeThis = new MoreLikeThisUsingAnyDocument();
return this;
}
usingDocument(documentJsonOrBuilder) {
if (TypeUtil.isString(documentJsonOrBuilder)) {
this._moreLikeThis = new MoreLikeThisUsingDocument(documentJsonOrBuilder);
}
else {
const builder = documentJsonOrBuilder;
this._moreLikeThis = new MoreLikeThisUsingDocumentForDocumentQuery();
this._moreLikeThis.forDocumentQuery = builder;
}
return this;
}
withOptions(options) {
this._moreLikeThis.options = options;
return this;
}
}
//# sourceMappingURL=MoreLikeThisBuilder.js.map