"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DocumentBuilder=void 0;var constant_1=require("../common/constant");var Query_1=require("./Query");var DocumentBuilder=function(){function r(e,t){this.collectionName=e;this.id=t}r.prototype.update=function(e){var t=new Query_1.QueryBuilder(this.collectionName).where({_id:String(this.id)}).limit(1);return t.update(e)};r.prototype.set=function(e){var t=new Query_1.QueryBuilder(this.collectionName).where({_id:String(this.id)}).limit(1);return t.set(e)};r.prototype.remove=function(){var e=new Query_1.QueryBuilder(this.collectionName).where({_id:String(this.id)}).limit(1);return e.remove()};r.prototype.get=function(){var e=new Query_1.QueryBuilder(this.collectionName).where({_id:String(this.id)}).limit(1);var t=e.get();t.action=constant_1.DocumentAction.query;return t};return r}();exports.DocumentBuilder=DocumentBuilder;