You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@alipay/faas-db-builder

Package Overview
Dependencies
Maintainers
3
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.18-alpha.4 to 1.1.18-alpha.5

esm/command/query/geo.d.ts

2

esm/command/AbstractCommand.d.ts

@@ -19,2 +19,4 @@ export declare abstract class AbstractCommand {

}
export declare abstract class GeoCommand extends QueryCommand {
}
export declare abstract class EvaluationQueryCommand extends QueryCommand {

@@ -21,0 +23,0 @@ }

2

esm/command/AbstractCommand.js

@@ -1,1 +0,1 @@

var e=function(){var t=function(n,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))a[i]=o[i]};return t(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function a(){this.constructor=n}n.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}();var u=function(){function t(){}return t}();export{u as AbstractCommand};var m=function(t){e(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(u);export{m as UpdateCommand};var l=function(t){e(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(m);export{l as QueryUpdateCommand};var f=function(t){e(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(m);export{f as UpdateArrayCommand};var s=function(t){e(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(l);export{s as QueryUpdateArrayCommand};var c=function(t){e(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(u);export{c as QueryCommand};var y=function(t){e(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(c);export{y as LogicQueryCommand};var p=function(t){e(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(c);export{p as EvaluationQueryCommand};var d=function(t){e(n,t);function n(r,a){var o=t.call(this)||this;o.name="$"+r;o.value=a;return o}n.prototype.stringify=function(){var r;return r={},r[this.name]=this.value,r};return n}(u);export{d as AggregateCommand};var h=function(){function t(n){this.lastCmd=n}t.unchain=function(n){return n instanceof t?n.lastCmd:n};return t}();export{h as CommandChain};
var a=function(){var t=function(n,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var m in o)if(Object.prototype.hasOwnProperty.call(o,m))e[m]=o[m]};return t(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}}();var u=function(){function t(){}return t}();export{u as AbstractCommand};var c=function(t){a(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(u);export{c as UpdateCommand};var l=function(t){a(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(c);export{l as QueryUpdateCommand};var f=function(t){a(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(c);export{f as UpdateArrayCommand};var s=function(t){a(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(l);export{s as QueryUpdateArrayCommand};var i=function(t){a(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(u);export{i as QueryCommand};var y=function(t){a(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(i);export{y as LogicQueryCommand};var d=function(t){a(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(i);export{d as GeoCommand};var p=function(t){a(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(i);export{p as EvaluationQueryCommand};var h=function(t){a(n,t);function n(r,e){var o=t.call(this)||this;o.name="$"+r;o.value=e;return o}n.prototype.stringify=function(){var r;return r={},r[this.name]=this.value,r};return n}(u);export{h as AggregateCommand};var C=function(){function t(n){this.lastCmd=n}t.unchain=function(n){return n instanceof t?n.lastCmd:n};return t}();export{C as CommandChain};
import { Sort } from '../common/constant';
import { AggregateArrayExpression, AggregateDateExpression, AggregateDateParam, AggregateDocumentExpression, AggregateExpression, AggregateExpressionPair, AggregateExpressionRecord, AggregateNumberExpression, AggregateNumberExpressionPair, AggregateStringExpression, AggregateStringExpressionPair, CondCommandParam, DateToStringCommandParam, IndexOfArrayCommandParam, LetCommandParam, MapParam, PushCommandParam, SliceCommandParam, SubstrBytesCommandParam, SubstrCommandParam, SubtractCommandParam, SwitchCommandParam } from '../typing';
import { AggregateArrayExpression, AggregateDateExpression, AggregateDateParam, AggregateDocumentExpression, AggregateExpression, AggregateExpressionPair, AggregateExpressionRecord, AggregateNumberExpression, AggregateNumberExpressionPair, AggregateStringExpression, AggregateStringExpressionPair, CondCommandParam, DateToStringCommandParam, IndexOfArrayCommandParam, LetCommandParam, MapParam, PushCommandParam, SliceCommandParam, SubstrBytesCommandParam, SubstrCommandParam, SubtractCommandParam, SwitchCommandParam, GeoWinthinParam, GeoNearParam, GeoIntersectsParam } from '../typing';
import { AggregateCommand, QueryChainCommand, QueryCommand } from './AbstractCommand';

@@ -20,2 +20,3 @@ import { AbsAggregateCommand, AddAggregateCommand, AddToSetAggregateCommand, AndAggregateCommand, ArrayElemAtAggregateCommand, AvgAggregateCommand, CeilAggregateCommand, CMPAggregateCommand, ConcatAggregateCommand, CondAggregateCommand, CountAggregateCommand, DateToStringAggregateCommand, DivideAggregateCommand, EqAggregateCommand, ExpAggregateCommand, FirstAggregateCommand, FloorAggregateCommand, GtAggregateCommand, GteAggregateCommand, IfNullAggregateCommand, InAggregateCommand, IndexOfArrayAggregateCommand, IsArrayAggregateCommand, ISOWeekAggregateCommand, LastAggregateCommand, LetAggregateCommand, LnAggregateCommand, Log10AggregateCommand, LogAggregateCommand, LtAggregateCommand, LteAggregateCommand, MapAggregateCommand, MaxAggregateCommand, MergeObjectsAggregateCommand, MinAggregateCommand, ModAggregateCommand, MonthAggregateCommand, MultiplyAggregateCommand, NeqAggregateCommand, NotAggregateCommand, OrAggregateCommand, PowAggregateCommand, PushAggregateCommand, SizeAggregateCommand, SliceAggregateCommand, SplitAggregateCommand, SqrtAggregateCommand, SubstrAggregateCommand, SubstrBytesAggregateCommand, SubtractAggregateCommand, SumAggregateCommand, SwitchAggregateCommand, ToLowerAggregateCommand, ToUpperAggregateCommand, TruncAggregateCommand, WeekAggregateCommand, YearAggregateCommand } from './aggregate';

import { SetCommand } from './update/set';
import { GeoIntersectsCommand, GeoNearCommand, GeoWithinCommand } from './query/geo';
export declare class AggregateCommandFactory {

@@ -126,2 +127,5 @@ pipeline(): AggregatePipeline;

expr(cmd: AggregateCommand): ExprCommand;
geoWithin(val: GeoWinthinParam): GeoWithinCommand;
geoNear(val: GeoNearParam): GeoNearCommand;
geoIntersects(val: GeoIntersectsParam): GeoIntersectsCommand;
and(cmd: Array<object | QueryCommand | QueryChain>): QueryChain;

@@ -128,0 +132,0 @@ and(...cmd: Array<object | QueryCommand | QueryChain>): QueryChain;

@@ -1,1 +0,1 @@

var p=function(t,r,e){if(e||arguments.length===2)for(var n=0,a=r.length,m;n<a;n++){if(m||!(n in r)){if(!m)m=Array.prototype.slice.call(r,0,n);m[n]=r[n]}}return t.concat(m||Array.prototype.slice.call(r))};import{Sort as y}from"../common/constant";import{AbsAggregateCommand as f,AddAggregateCommand as A,AddToSetAggregateCommand as d,AndAggregateCommand as c,ArrayElemAtAggregateCommand as w,AvgAggregateCommand as C,CeilAggregateCommand as s,CMPAggregateCommand as l,ConcatAggregateCommand as v,CondAggregateCommand as h,CountAggregateCommand as S,DateToStringAggregateCommand as x,DivideAggregateCommand as M,EqAggregateCommand as b,ExpAggregateCommand as L,FirstAggregateCommand as q,FloorAggregateCommand as T,GtAggregateCommand as E,GteAggregateCommand as N,IfNullAggregateCommand as P,InAggregateCommand as I,IndexOfArrayAggregateCommand as O,IsArrayAggregateCommand as k,ISOWeekAggregateCommand as z,LastAggregateCommand as F,LetAggregateCommand as G,LnAggregateCommand as W,Log10AggregateCommand as j,LogAggregateCommand as B,LtAggregateCommand as D,LteAggregateCommand as R,MapAggregateCommand as U,MaxAggregateCommand as Q,MergeObjectsAggregateCommand as Y,MinAggregateCommand as H,ModAggregateCommand as J,MonthAggregateCommand as K,MultiplyAggregateCommand as V,NeqAggregateCommand as X,NotAggregateCommand as Z,OrAggregateCommand as $,PowAggregateCommand as _,PushAggregateCommand as rr,SizeAggregateCommand as tr,SliceAggregateCommand as nr,SplitAggregateCommand as er,SqrtAggregateCommand as or,SubstrAggregateCommand as ar,SubstrBytesAggregateCommand as mr,SubtractAggregateCommand as pr,SumAggregateCommand as ur,SwitchAggregateCommand as gr,ToLowerAggregateCommand as ir,ToUpperAggregateCommand as yr,TruncAggregateCommand as fr,WeekAggregateCommand as Ar,YearAggregateCommand as dr}from"./aggregate";import{AggregatePipeline as cr}from"./AggregatePipeline";import{AllCommand as wr}from"./query/all";import{AndCommand as Cr,NorCommand as sr,NotCommand as lr,OrCommand as vr}from"./query/logic";import{ElemMatchCommand as hr}from"./query/elemMatch";import{EqCommand as Sr}from"./query/eq";import{ExistsCommand as xr}from"./query/exists";import{ExprCommand as Mr}from"./query/expr";import{GtCommand as br}from"./query/gt";import{GteCommand as Lr}from"./query/gte";import{InCommand as qr}from"./query/in";import{LtCommand as Tr}from"./query/lt";import{LteCommand as Er}from"./query/lte";import{ModCommand as Nr}from"./query/mod";import{NeqCommand as Pr}from"./query/neq";import{NinCommand as Ir}from"./query/nin";import{QueryChain as o}from"./query/QueryChain";import{SizeCommand as Or}from"./query/size";import{AddToSetCommand as kr}from"./update/addToSet";import{IncCommand as zr}from"./update/inc";import{MaxCommand as Fr}from"./update/max";import{MinCommand as Gr}from"./update/min";import{MulCommand as Wr}from"./update/mul";import{PopCommand as jr}from"./update/pop";import{PullCommand as Br}from"./update/pull";import{PullAllCommand as Dr}from"./update/pullAll";import{PushCommand as u}from"./update/push";import{RemoveCommand as Rr}from"./update/remove";import{RenameCommand as Ur}from"./update/rename";import{SetCommand as Qr}from"./update/set";var g=function(){function t(){}t.prototype.pipeline=function(){return new cr};t.prototype.avg=function(r){return new C(r)};t.prototype.count=function(){return new S};t.prototype.max=function(r){return new Q(r)};t.prototype.min=function(r){return new H(r)};t.prototype.sum=function(r){return new ur(r)};t.prototype.and=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}var a=Array.isArray(r)?r:p([r],e,true);return new c(a)};t.prototype.or=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}var a=Array.isArray(r)?r:p([r],e,true);return new $(a)};t.prototype.not=function(r){return new Z(r)};t.prototype.cmp=function(r,e){var n=Array.isArray(r)?r:[r,e];return new l(n)};t.prototype.eq=function(r,e){var n=Array.isArray(r)?r:[r,e];return new b(n)};t.prototype.neq=function(r,e){var n=Array.isArray(r)?r:[r,e];return new X(n)};t.prototype.lt=function(r,e){var n=Array.isArray(r)?r:[r,e];return new D(n)};t.prototype.lte=function(r,e){var n=Array.isArray(r)?r:[r,e];return new R(n)};t.prototype.gt=function(r,e){var n=Array.isArray(r)?r:[r,e];return new E(n)};t.prototype.gte=function(r,e){var n=Array.isArray(r)?r:[r,e];return new N(n)};t.prototype.addToSet=function(r){return new d(r)};t.prototype.arrayElemAt=function(r,e){var n=Array.isArray(r)?r:[r,e];return new w(n)};t.prototype.indexOfArray=function(r,e,n,a){var m=Array.isArray(r)?r:[r,e,n,a].filter(function(i){return i!==void 0});return new O(m)};t.prototype.isArray=function(r){return new k(r)};t.prototype.size=function(r){return new tr(r)};t.prototype.in=function(r,e){var n=Array.isArray(r)?r:[r,e];return new I(n)};t.prototype.slice=function(r,e,n){var a=Array.isArray(r)?r:[r,e,n].filter(function(m){return m!==void 0});return new nr(a)};t.prototype.map=function(r){return new U(r)};t.prototype.ifNull=function(r,e){var n=Array.isArray(r)?r:[r,e];return new P(n)};t.prototype.cond=function(r){return new h(r)};t.prototype.switch=function(r){return new gr(r)};t.prototype.concat=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}var a=Array.isArray(r)?r:p([r],e,true);return new v(a)};t.prototype.dateToString=function(r){return new x(r)};t.prototype.toLower=function(r){return new ir(r)};t.prototype.toUpper=function(r){return new yr(r)};t.prototype.split=function(r,e){var n=Array.isArray(r)?r:[r,e];return new er(n)};t.prototype.substr=function(r,e,n){var a=Array.isArray(r)?r:[r,e,n];return new ar(a)};t.prototype.substrBytes=function(r,e,n){var a=Array.isArray(r)?r:[r,e,n];return new mr(a)};t.prototype.first=function(r){return new q(r)};t.prototype.last=function(r){return new F(r)};t.prototype.push=function(r){return new rr(r)};t.prototype.let=function(r){return new G(r)};t.prototype.add=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}var a=Array.isArray(r)?r:p([r],e,true);return new A(a)};t.prototype.subtract=function(r,e){var n=Array.isArray(r)?r:[r,e];return new pr(n)};t.prototype.multiply=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}var a=Array.isArray(r)?r:p([r],e,true);return new V(a)};t.prototype.divide=function(r,e){var n=Array.isArray(r)?r:[r,e];return new M(n)};t.prototype.abs=function(r){return new f(r)};t.prototype.ceil=function(r){return new s(r)};t.prototype.exp=function(r){return new L(r)};t.prototype.floor=function(r){return new T(r)};t.prototype.ln=function(r){return new W(r)};t.prototype.log=function(r,e){var n=Array.isArray(r)?r:[r,e];return new B(n)};t.prototype.log10=function(r){return new j(r)};t.prototype.mod=function(r,e){var n=Array.isArray(r)?r:[r,e];return new J(n)};t.prototype.pow=function(r,e){var n=Array.isArray(r)?r:[r,e];return new _(n)};t.prototype.sqrt=function(r){return new or(r)};t.prototype.trunc=function(r){return new fr(r)};t.prototype.mergeObjects=function(r){return new Y(r)};t.prototype.month=function(r){return new K(r)};t.prototype.year=function(r){return new dr(r)};t.prototype.week=function(r){return new Ar(r)};t.prototype.isoWeek=function(r){return new z(r)};return t}();export{g as AggregateCommandFactory};var Yr=function(){function t(){this.aggregate=new g;this.Sort=y}t.prototype.addToSet=function(r){return new kr(r)};t.prototype.inc=function(r){return new zr(r)};t.prototype.max=function(r){return new Fr(r)};t.prototype.min=function(r){return new Gr(r)};t.prototype.mul=function(r){return new Wr(r)};t.prototype.pop=function(r){return new jr(r)};t.prototype.pull=function(r){return new Br(r)};t.prototype.pullAll=function(r){return new Dr(r)};t.prototype.push=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}return new(u.bind.apply(u,p([void 0,r],e,false)))};t.prototype.remove=function(){return new Rr};t.prototype.rename=function(r){return new Ur(r)};t.prototype.set=function(r){return new Qr(r)};t.prototype.expr=function(r){return new Mr(r)};t.prototype.and=function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}r=Array.isArray(r[0])?r[0]:r;var n=new Cr(r.map(o.unchain));return new o(n)};t.prototype.or=function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}r=Array.isArray(r[0])?r[0]:r;var n=new vr(r.map(o.unchain));return new o(n)};t.prototype.not=function(r){var e=new lr(o.unchain(r));return new o(e)};t.prototype.nor=function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}r=Array.isArray(r[0])?r[0]:r;var n=new sr(r.map(o.unchain));return new o(n)};t.prototype.eq=function(r){return new o(new Sr(r))};t.prototype.neq=function(r){return new o(new Pr(r))};t.prototype.lt=function(r){return new o(new Tr(r))};t.prototype.lte=function(r){return new o(new Er(r))};t.prototype.gt=function(r){return new o(new br(r))};t.prototype.gte=function(r){return new o(new Lr(r))};t.prototype.in=function(r){return new o(new qr(r))};t.prototype.nin=function(r){return new o(new Ir(r))};t.prototype.exists=function(r){return new o(new xr(r))};t.prototype.mod=function(r,e){return new o(new Nr(r,e))};t.prototype.all=function(r){return new o(new wr(r))};t.prototype.elemMatch=function(r){return new o(new hr(o.unchain(r)))};t.prototype.size=function(r){return new o(new Or(r))};return t}();export{Yr as Command};
var p=function(t,r,e){if(e||arguments.length===2)for(var n=0,a=r.length,m;n<a;n++){if(m||!(n in r)){if(!m)m=Array.prototype.slice.call(r,0,n);m[n]=r[n]}}return t.concat(m||Array.prototype.slice.call(r))};import{Sort as y}from"../common/constant";import{AbsAggregateCommand as f,AddAggregateCommand as A,AddToSetAggregateCommand as d,AndAggregateCommand as c,ArrayElemAtAggregateCommand as w,AvgAggregateCommand as C,CeilAggregateCommand as s,CMPAggregateCommand as l,ConcatAggregateCommand as v,CondAggregateCommand as h,CountAggregateCommand as S,DateToStringAggregateCommand as x,DivideAggregateCommand as M,EqAggregateCommand as b,ExpAggregateCommand as L,FirstAggregateCommand as q,FloorAggregateCommand as N,GtAggregateCommand as I,GteAggregateCommand as T,IfNullAggregateCommand as E,InAggregateCommand as P,IndexOfArrayAggregateCommand as G,IsArrayAggregateCommand as O,ISOWeekAggregateCommand as W,LastAggregateCommand as k,LetAggregateCommand as z,LnAggregateCommand as F,Log10AggregateCommand as j,LogAggregateCommand as B,LtAggregateCommand as D,LteAggregateCommand as R,MapAggregateCommand as U,MaxAggregateCommand as Q,MergeObjectsAggregateCommand as Y,MinAggregateCommand as H,ModAggregateCommand as J,MonthAggregateCommand as K,MultiplyAggregateCommand as V,NeqAggregateCommand as X,NotAggregateCommand as Z,OrAggregateCommand as $,PowAggregateCommand as _,PushAggregateCommand as rr,SizeAggregateCommand as tr,SliceAggregateCommand as nr,SplitAggregateCommand as er,SqrtAggregateCommand as or,SubstrAggregateCommand as ar,SubstrBytesAggregateCommand as mr,SubtractAggregateCommand as pr,SumAggregateCommand as ur,SwitchAggregateCommand as gr,ToLowerAggregateCommand as ir,ToUpperAggregateCommand as yr,TruncAggregateCommand as fr,WeekAggregateCommand as Ar,YearAggregateCommand as dr}from"./aggregate";import{AggregatePipeline as cr}from"./AggregatePipeline";import{AllCommand as wr}from"./query/all";import{AndCommand as Cr,NorCommand as sr,NotCommand as lr,OrCommand as vr}from"./query/logic";import{ElemMatchCommand as hr}from"./query/elemMatch";import{EqCommand as Sr}from"./query/eq";import{ExistsCommand as xr}from"./query/exists";import{ExprCommand as Mr}from"./query/expr";import{GtCommand as br}from"./query/gt";import{GteCommand as Lr}from"./query/gte";import{InCommand as qr}from"./query/in";import{LtCommand as Nr}from"./query/lt";import{LteCommand as Ir}from"./query/lte";import{ModCommand as Tr}from"./query/mod";import{NeqCommand as Er}from"./query/neq";import{NinCommand as Pr}from"./query/nin";import{QueryChain as o}from"./query/QueryChain";import{SizeCommand as Gr}from"./query/size";import{AddToSetCommand as Or}from"./update/addToSet";import{IncCommand as Wr}from"./update/inc";import{MaxCommand as kr}from"./update/max";import{MinCommand as zr}from"./update/min";import{MulCommand as Fr}from"./update/mul";import{PopCommand as jr}from"./update/pop";import{PullCommand as Br}from"./update/pull";import{PullAllCommand as Dr}from"./update/pullAll";import{PushCommand as u}from"./update/push";import{RemoveCommand as Rr}from"./update/remove";import{RenameCommand as Ur}from"./update/rename";import{SetCommand as Qr}from"./update/set";import{GeoIntersectsCommand as Yr,GeoNearCommand as Hr,GeoWithinCommand as Jr}from"./query/geo";var g=function(){function t(){}t.prototype.pipeline=function(){return new cr};t.prototype.avg=function(r){return new C(r)};t.prototype.count=function(){return new S};t.prototype.max=function(r){return new Q(r)};t.prototype.min=function(r){return new H(r)};t.prototype.sum=function(r){return new ur(r)};t.prototype.and=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}var a=Array.isArray(r)?r:p([r],e,true);return new c(a)};t.prototype.or=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}var a=Array.isArray(r)?r:p([r],e,true);return new $(a)};t.prototype.not=function(r){return new Z(r)};t.prototype.cmp=function(r,e){var n=Array.isArray(r)?r:[r,e];return new l(n)};t.prototype.eq=function(r,e){var n=Array.isArray(r)?r:[r,e];return new b(n)};t.prototype.neq=function(r,e){var n=Array.isArray(r)?r:[r,e];return new X(n)};t.prototype.lt=function(r,e){var n=Array.isArray(r)?r:[r,e];return new D(n)};t.prototype.lte=function(r,e){var n=Array.isArray(r)?r:[r,e];return new R(n)};t.prototype.gt=function(r,e){var n=Array.isArray(r)?r:[r,e];return new I(n)};t.prototype.gte=function(r,e){var n=Array.isArray(r)?r:[r,e];return new T(n)};t.prototype.addToSet=function(r){return new d(r)};t.prototype.arrayElemAt=function(r,e){var n=Array.isArray(r)?r:[r,e];return new w(n)};t.prototype.indexOfArray=function(r,e,n,a){var m=Array.isArray(r)?r:[r,e,n,a].filter(function(i){return i!==void 0});return new G(m)};t.prototype.isArray=function(r){return new O(r)};t.prototype.size=function(r){return new tr(r)};t.prototype.in=function(r,e){var n=Array.isArray(r)?r:[r,e];return new P(n)};t.prototype.slice=function(r,e,n){var a=Array.isArray(r)?r:[r,e,n].filter(function(m){return m!==void 0});return new nr(a)};t.prototype.map=function(r){return new U(r)};t.prototype.ifNull=function(r,e){var n=Array.isArray(r)?r:[r,e];return new E(n)};t.prototype.cond=function(r){return new h(r)};t.prototype.switch=function(r){return new gr(r)};t.prototype.concat=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}var a=Array.isArray(r)?r:p([r],e,true);return new v(a)};t.prototype.dateToString=function(r){return new x(r)};t.prototype.toLower=function(r){return new ir(r)};t.prototype.toUpper=function(r){return new yr(r)};t.prototype.split=function(r,e){var n=Array.isArray(r)?r:[r,e];return new er(n)};t.prototype.substr=function(r,e,n){var a=Array.isArray(r)?r:[r,e,n];return new ar(a)};t.prototype.substrBytes=function(r,e,n){var a=Array.isArray(r)?r:[r,e,n];return new mr(a)};t.prototype.first=function(r){return new q(r)};t.prototype.last=function(r){return new k(r)};t.prototype.push=function(r){return new rr(r)};t.prototype.let=function(r){return new z(r)};t.prototype.add=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}var a=Array.isArray(r)?r:p([r],e,true);return new A(a)};t.prototype.subtract=function(r,e){var n=Array.isArray(r)?r:[r,e];return new pr(n)};t.prototype.multiply=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}var a=Array.isArray(r)?r:p([r],e,true);return new V(a)};t.prototype.divide=function(r,e){var n=Array.isArray(r)?r:[r,e];return new M(n)};t.prototype.abs=function(r){return new f(r)};t.prototype.ceil=function(r){return new s(r)};t.prototype.exp=function(r){return new L(r)};t.prototype.floor=function(r){return new N(r)};t.prototype.ln=function(r){return new F(r)};t.prototype.log=function(r,e){var n=Array.isArray(r)?r:[r,e];return new B(n)};t.prototype.log10=function(r){return new j(r)};t.prototype.mod=function(r,e){var n=Array.isArray(r)?r:[r,e];return new J(n)};t.prototype.pow=function(r,e){var n=Array.isArray(r)?r:[r,e];return new _(n)};t.prototype.sqrt=function(r){return new or(r)};t.prototype.trunc=function(r){return new fr(r)};t.prototype.mergeObjects=function(r){return new Y(r)};t.prototype.month=function(r){return new K(r)};t.prototype.year=function(r){return new dr(r)};t.prototype.week=function(r){return new Ar(r)};t.prototype.isoWeek=function(r){return new W(r)};return t}();export{g as AggregateCommandFactory};var Kr=function(){function t(){this.aggregate=new g;this.Sort=y}t.prototype.addToSet=function(r){return new Or(r)};t.prototype.inc=function(r){return new Wr(r)};t.prototype.max=function(r){return new kr(r)};t.prototype.min=function(r){return new zr(r)};t.prototype.mul=function(r){return new Fr(r)};t.prototype.pop=function(r){return new jr(r)};t.prototype.pull=function(r){return new Br(r)};t.prototype.pullAll=function(r){return new Dr(r)};t.prototype.push=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}return new(u.bind.apply(u,p([void 0,r],e,false)))};t.prototype.remove=function(){return new Rr};t.prototype.rename=function(r){return new Ur(r)};t.prototype.set=function(r){return new Qr(r)};t.prototype.expr=function(r){return new Mr(r)};t.prototype.geoWithin=function(r){return new Jr(r)};t.prototype.geoNear=function(r){return new Hr(r)};t.prototype.geoIntersects=function(r){return new Yr(r)};t.prototype.and=function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}r=Array.isArray(r[0])?r[0]:r;var n=new Cr(r.map(o.unchain));return new o(n)};t.prototype.or=function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}r=Array.isArray(r[0])?r[0]:r;var n=new vr(r.map(o.unchain));return new o(n)};t.prototype.not=function(r){var e=new lr(o.unchain(r));return new o(e)};t.prototype.nor=function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}r=Array.isArray(r[0])?r[0]:r;var n=new sr(r.map(o.unchain));return new o(n)};t.prototype.eq=function(r){return new o(new Sr(r))};t.prototype.neq=function(r){return new o(new Er(r))};t.prototype.lt=function(r){return new o(new Nr(r))};t.prototype.lte=function(r){return new o(new Ir(r))};t.prototype.gt=function(r){return new o(new br(r))};t.prototype.gte=function(r){return new o(new Lr(r))};t.prototype.in=function(r){return new o(new qr(r))};t.prototype.nin=function(r){return new o(new Pr(r))};t.prototype.exists=function(r){return new o(new xr(r))};t.prototype.mod=function(r,e){return new o(new Tr(r,e))};t.prototype.all=function(r){return new o(new wr(r))};t.prototype.elemMatch=function(r){return new o(new hr(o.unchain(r)))};t.prototype.size=function(r){return new o(new Gr(r))};return t}();export{Kr as Command};

@@ -16,1 +16,2 @@ export * from './typing';

export * from './common/constant';
export { Geo } from './mongo-builder/Geo';

@@ -1,1 +0,1 @@

export*from"./typing";export{MongoBuilder}from"./mongo-builder";export{CollectionBuilder}from"./mongo-builder/Collection";export{DocumentBuilder}from"./mongo-builder/Document";export{QueryBuilder}from"./mongo-builder/Query";export{Regex}from"./mongo-builder/Regex";export{AggregateBuilder}from"./mongo-builder/Aggregate";export{QueryRequest}from"./command/QueryRequest";export{UpdateRequest}from"./command/UpdateRequest";export{AggregateRequest}from"./command/AggregateRequest";export{Command,AggregateCommandFactory}from"./command";export{AggregateCommand,QueryCommand,UpdateCommand,UpdateArrayCommand}from"./command/AbstractCommand";export{QueryChain}from"./command/query/QueryChain";export{DbBuildError,ErrorCode}from"./common/error";export*from"./common/constant";
export*from"./typing";export{MongoBuilder}from"./mongo-builder";export{CollectionBuilder}from"./mongo-builder/Collection";export{DocumentBuilder}from"./mongo-builder/Document";export{QueryBuilder}from"./mongo-builder/Query";export{Regex}from"./mongo-builder/Regex";export{AggregateBuilder}from"./mongo-builder/Aggregate";export{QueryRequest}from"./command/QueryRequest";export{UpdateRequest}from"./command/UpdateRequest";export{AggregateRequest}from"./command/AggregateRequest";export{Command,AggregateCommandFactory}from"./command";export{AggregateCommand,QueryCommand,UpdateCommand,UpdateArrayCommand}from"./command/AbstractCommand";export{QueryChain}from"./command/query/QueryChain";export{DbBuildError,ErrorCode}from"./common/error";export*from"./common/constant";export{Geo}from"./mongo-builder/Geo";
import { Command } from '../command';
import type { MongoCollectionListQueryOperation, MongoCollectionOperation, RegExpParam } from '../typing';
import { CollectionBuilder } from './Collection';
import { Geo } from './Geo';
import { Regex } from './Regex';
export declare class MongoBuilder {
command: Command;
Geo: Geo;
constructor();

@@ -8,0 +10,0 @@ RegExp(param: RegExpParam): Regex;

@@ -1,1 +0,1 @@

import{Command as l}from"../command";import{CollectionAction as r}from"../common/constant";import{ActionBuilder as e}from"../common/util";import{CollectionBuilder as c}from"./Collection";import{Regex as i}from"./Regex";var u=function(){function t(){this.command=new l}t.prototype.RegExp=function(o){return new i(o)};t.prototype.regexp=function(o){return new i(o)};t.prototype.collection=function(o){return new c(o)};t.prototype.createCollection=function(o){return e.buildCollectionAction(r.create,o)};t.prototype.getCollection=function(o){return e.buildCollectionAction(r.query,o)};t.prototype.listCollection=function(o,n){return e.buildCollectionListQueryAction({$limit:o!==null&&o!==void 0?o:10,$skip:n!==null&&n!==void 0?n:0})};t.prototype.deleteCollection=function(o){return e.buildCollectionAction(r.delete,o)};return t}();export{u as MongoBuilder};
import{Command as l}from"../command";import{CollectionAction as r}from"../common/constant";import{ActionBuilder as e}from"../common/util";import{CollectionBuilder as c}from"./Collection";import{Geo as u}from"./Geo";import{Regex as i}from"./Regex";var p=function(){function t(){this.command=new l;this.Geo=new u}t.prototype.RegExp=function(o){return new i(o)};t.prototype.regexp=function(o){return new i(o)};t.prototype.collection=function(o){return new c(o)};t.prototype.createCollection=function(o){return e.buildCollectionAction(r.create,o)};t.prototype.getCollection=function(o){return e.buildCollectionAction(r.query,o)};t.prototype.listCollection=function(o,n){return e.buildCollectionListQueryAction({$limit:o!==null&&o!==void 0?o:10,$skip:n!==null&&n!==void 0?n:0})};t.prototype.deleteCollection=function(o){return e.buildCollectionAction(r.delete,o)};return t}();export{p as MongoBuilder};
import { AggregateCommand } from './command/AbstractCommand';
import { CollectionAction, DocumentAction, PipelineStageName, Sort, Target } from './common/constant';
import { GeoPolygon, GeoMultiPolygon, GeoPoint, GeoLineString, GeoMultiPoint, GeoMultiLineString } from './mongo-builder/Geo';
export type BuiltInType = 'string' | 'number' | 'bigint' | 'boolean' | 'symbol' | 'undefined' | 'object' | 'function';

@@ -141,1 +142,13 @@ export type AggregateExpression<T = any> = string | AggregateCommand | T;

export type SubtractCommandParam = [AggregateDateExpression, AggregateNumberExpression];
export interface GeoWinthinParam {
centerSphere?: [[number, number], number];
geometry?: GeoPolygon | GeoMultiPolygon;
}
export interface GeoNearParam {
geometry: GeoPoint;
maxDistance?: number;
minDistance?: number;
}
export interface GeoIntersectsParam {
geometry: GeoPoint | GeoLineString | GeoPolygon | GeoMultiPoint | GeoMultiLineString | GeoMultiPolygon;
}

@@ -19,2 +19,4 @@ export declare abstract class AbstractCommand {

}
export declare abstract class GeoCommand extends QueryCommand {
}
export declare abstract class EvaluationQueryCommand extends QueryCommand {

@@ -21,0 +23,0 @@ }

@@ -1,1 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var t=function(n,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var e in a)if(Object.prototype.hasOwnProperty.call(a,e))o[e]=a[e]};return t(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function o(){this.constructor=n}n.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.CommandChain=exports.AggregateCommand=exports.EvaluationQueryCommand=exports.LogicQueryCommand=exports.QueryCommand=exports.QueryUpdateArrayCommand=exports.UpdateArrayCommand=exports.QueryUpdateCommand=exports.UpdateCommand=exports.AbstractCommand=void 0;var AbstractCommand=function(){function t(){}return t}();exports.AbstractCommand=AbstractCommand;var UpdateCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(AbstractCommand);exports.UpdateCommand=UpdateCommand;var QueryUpdateCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(UpdateCommand);exports.QueryUpdateCommand=QueryUpdateCommand;var UpdateArrayCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(UpdateCommand);exports.UpdateArrayCommand=UpdateArrayCommand;var QueryUpdateArrayCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(QueryUpdateCommand);exports.QueryUpdateArrayCommand=QueryUpdateArrayCommand;var QueryCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(AbstractCommand);exports.QueryCommand=QueryCommand;var LogicQueryCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(QueryCommand);exports.LogicQueryCommand=LogicQueryCommand;var EvaluationQueryCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(QueryCommand);exports.EvaluationQueryCommand=EvaluationQueryCommand;var AggregateCommand=function(t){__extends(n,t);function n(r,o){var a=t.call(this)||this;a.name="$"+r;a.value=o;return a}n.prototype.stringify=function(){var r;return r={},r[this.name]=this.value,r};return n}(AbstractCommand);exports.AggregateCommand=AggregateCommand;var CommandChain=function(){function t(n){this.lastCmd=n}t.unchain=function(n){return n instanceof t?n.lastCmd:n};return t}();exports.CommandChain=CommandChain;
"use strict";var __extends=this&&this.__extends||function(){var t=function(n,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var e in o)if(Object.prototype.hasOwnProperty.call(o,e))a[e]=o[e]};return t(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function a(){this.constructor=n}n.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.CommandChain=exports.AggregateCommand=exports.EvaluationQueryCommand=exports.GeoCommand=exports.LogicQueryCommand=exports.QueryCommand=exports.QueryUpdateArrayCommand=exports.UpdateArrayCommand=exports.QueryUpdateCommand=exports.UpdateCommand=exports.AbstractCommand=void 0;var AbstractCommand=function(){function t(){}return t}();exports.AbstractCommand=AbstractCommand;var UpdateCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(AbstractCommand);exports.UpdateCommand=UpdateCommand;var QueryUpdateCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(UpdateCommand);exports.QueryUpdateCommand=QueryUpdateCommand;var UpdateArrayCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(UpdateCommand);exports.UpdateArrayCommand=UpdateArrayCommand;var QueryUpdateArrayCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(QueryUpdateCommand);exports.QueryUpdateArrayCommand=QueryUpdateArrayCommand;var QueryCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(AbstractCommand);exports.QueryCommand=QueryCommand;var LogicQueryCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(QueryCommand);exports.LogicQueryCommand=LogicQueryCommand;var GeoCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(QueryCommand);exports.GeoCommand=GeoCommand;var EvaluationQueryCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(QueryCommand);exports.EvaluationQueryCommand=EvaluationQueryCommand;var AggregateCommand=function(t){__extends(n,t);function n(r,a){var o=t.call(this)||this;o.name="$"+r;o.value=a;return o}n.prototype.stringify=function(){var r;return r={},r[this.name]=this.value,r};return n}(AbstractCommand);exports.AggregateCommand=AggregateCommand;var CommandChain=function(){function t(n){this.lastCmd=n}t.unchain=function(n){return n instanceof t?n.lastCmd:n};return t}();exports.CommandChain=CommandChain;
import { Sort } from '../common/constant';
import { AggregateArrayExpression, AggregateDateExpression, AggregateDateParam, AggregateDocumentExpression, AggregateExpression, AggregateExpressionPair, AggregateExpressionRecord, AggregateNumberExpression, AggregateNumberExpressionPair, AggregateStringExpression, AggregateStringExpressionPair, CondCommandParam, DateToStringCommandParam, IndexOfArrayCommandParam, LetCommandParam, MapParam, PushCommandParam, SliceCommandParam, SubstrBytesCommandParam, SubstrCommandParam, SubtractCommandParam, SwitchCommandParam } from '../typing';
import { AggregateArrayExpression, AggregateDateExpression, AggregateDateParam, AggregateDocumentExpression, AggregateExpression, AggregateExpressionPair, AggregateExpressionRecord, AggregateNumberExpression, AggregateNumberExpressionPair, AggregateStringExpression, AggregateStringExpressionPair, CondCommandParam, DateToStringCommandParam, IndexOfArrayCommandParam, LetCommandParam, MapParam, PushCommandParam, SliceCommandParam, SubstrBytesCommandParam, SubstrCommandParam, SubtractCommandParam, SwitchCommandParam, GeoWinthinParam, GeoNearParam, GeoIntersectsParam } from '../typing';
import { AggregateCommand, QueryChainCommand, QueryCommand } from './AbstractCommand';

@@ -20,2 +20,3 @@ import { AbsAggregateCommand, AddAggregateCommand, AddToSetAggregateCommand, AndAggregateCommand, ArrayElemAtAggregateCommand, AvgAggregateCommand, CeilAggregateCommand, CMPAggregateCommand, ConcatAggregateCommand, CondAggregateCommand, CountAggregateCommand, DateToStringAggregateCommand, DivideAggregateCommand, EqAggregateCommand, ExpAggregateCommand, FirstAggregateCommand, FloorAggregateCommand, GtAggregateCommand, GteAggregateCommand, IfNullAggregateCommand, InAggregateCommand, IndexOfArrayAggregateCommand, IsArrayAggregateCommand, ISOWeekAggregateCommand, LastAggregateCommand, LetAggregateCommand, LnAggregateCommand, Log10AggregateCommand, LogAggregateCommand, LtAggregateCommand, LteAggregateCommand, MapAggregateCommand, MaxAggregateCommand, MergeObjectsAggregateCommand, MinAggregateCommand, ModAggregateCommand, MonthAggregateCommand, MultiplyAggregateCommand, NeqAggregateCommand, NotAggregateCommand, OrAggregateCommand, PowAggregateCommand, PushAggregateCommand, SizeAggregateCommand, SliceAggregateCommand, SplitAggregateCommand, SqrtAggregateCommand, SubstrAggregateCommand, SubstrBytesAggregateCommand, SubtractAggregateCommand, SumAggregateCommand, SwitchAggregateCommand, ToLowerAggregateCommand, ToUpperAggregateCommand, TruncAggregateCommand, WeekAggregateCommand, YearAggregateCommand } from './aggregate';

import { SetCommand } from './update/set';
import { GeoIntersectsCommand, GeoNearCommand, GeoWithinCommand } from './query/geo';
export declare class AggregateCommandFactory {

@@ -126,2 +127,5 @@ pipeline(): AggregatePipeline;

expr(cmd: AggregateCommand): ExprCommand;
geoWithin(val: GeoWinthinParam): GeoWithinCommand;
geoNear(val: GeoNearParam): GeoNearCommand;
geoIntersects(val: GeoIntersectsParam): GeoIntersectsCommand;
and(cmd: Array<object | QueryCommand | QueryChain>): QueryChain;

@@ -128,0 +132,0 @@ and(...cmd: Array<object | QueryCommand | QueryChain>): QueryChain;

@@ -1,1 +0,1 @@

"use strict";var __spreadArray=this&&this.__spreadArray||function(e,r,t){if(t||arguments.length===2)for(var n=0,o=r.length,a;n<o;n++){if(a||!(n in r)){if(!a)a=Array.prototype.slice.call(r,0,n);a[n]=r[n]}}return e.concat(a||Array.prototype.slice.call(r))};Object.defineProperty(exports,"__esModule",{value:true});exports.Command=exports.AggregateCommandFactory=void 0;var constant_1=require("../common/constant");var aggregate_1=require("./aggregate");var AggregatePipeline_1=require("./AggregatePipeline");var all_1=require("./query/all");var logic_1=require("./query/logic");var elemMatch_1=require("./query/elemMatch");var eq_1=require("./query/eq");var exists_1=require("./query/exists");var expr_1=require("./query/expr");var gt_1=require("./query/gt");var gte_1=require("./query/gte");var in_1=require("./query/in");var lt_1=require("./query/lt");var lte_1=require("./query/lte");var mod_1=require("./query/mod");var neq_1=require("./query/neq");var nin_1=require("./query/nin");var QueryChain_1=require("./query/QueryChain");var size_1=require("./query/size");var addToSet_1=require("./update/addToSet");var inc_1=require("./update/inc");var max_1=require("./update/max");var min_1=require("./update/min");var mul_1=require("./update/mul");var pop_1=require("./update/pop");var pull_1=require("./update/pull");var pullAll_1=require("./update/pullAll");var push_1=require("./update/push");var remove_1=require("./update/remove");var rename_1=require("./update/rename");var set_1=require("./update/set");var AggregateCommandFactory=function(){function e(){}e.prototype.pipeline=function(){return new AggregatePipeline_1.AggregatePipeline};e.prototype.avg=function(r){return new aggregate_1.AvgAggregateCommand(r)};e.prototype.count=function(){return new aggregate_1.CountAggregateCommand};e.prototype.max=function(r){return new aggregate_1.MaxAggregateCommand(r)};e.prototype.min=function(r){return new aggregate_1.MinAggregateCommand(r)};e.prototype.sum=function(r){return new aggregate_1.SumAggregateCommand(r)};e.prototype.and=function(r){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}var o=Array.isArray(r)?r:__spreadArray([r],t,true);return new aggregate_1.AndAggregateCommand(o)};e.prototype.or=function(r){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}var o=Array.isArray(r)?r:__spreadArray([r],t,true);return new aggregate_1.OrAggregateCommand(o)};e.prototype.not=function(r){return new aggregate_1.NotAggregateCommand(r)};e.prototype.cmp=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.CMPAggregateCommand(n)};e.prototype.eq=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.EqAggregateCommand(n)};e.prototype.neq=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.NeqAggregateCommand(n)};e.prototype.lt=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.LtAggregateCommand(n)};e.prototype.lte=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.LteAggregateCommand(n)};e.prototype.gt=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.GtAggregateCommand(n)};e.prototype.gte=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.GteAggregateCommand(n)};e.prototype.addToSet=function(r){return new aggregate_1.AddToSetAggregateCommand(r)};e.prototype.arrayElemAt=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.ArrayElemAtAggregateCommand(n)};e.prototype.indexOfArray=function(r,t,n,o){var a=Array.isArray(r)?r:[r,t,n,o].filter(function(u){return u!==void 0});return new aggregate_1.IndexOfArrayAggregateCommand(a)};e.prototype.isArray=function(r){return new aggregate_1.IsArrayAggregateCommand(r)};e.prototype.size=function(r){return new aggregate_1.SizeAggregateCommand(r)};e.prototype.in=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.InAggregateCommand(n)};e.prototype.slice=function(r,t,n){var o=Array.isArray(r)?r:[r,t,n].filter(function(a){return a!==void 0});return new aggregate_1.SliceAggregateCommand(o)};e.prototype.map=function(r){return new aggregate_1.MapAggregateCommand(r)};e.prototype.ifNull=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.IfNullAggregateCommand(n)};e.prototype.cond=function(r){return new aggregate_1.CondAggregateCommand(r)};e.prototype.switch=function(r){return new aggregate_1.SwitchAggregateCommand(r)};e.prototype.concat=function(r){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}var o=Array.isArray(r)?r:__spreadArray([r],t,true);return new aggregate_1.ConcatAggregateCommand(o)};e.prototype.dateToString=function(r){return new aggregate_1.DateToStringAggregateCommand(r)};e.prototype.toLower=function(r){return new aggregate_1.ToLowerAggregateCommand(r)};e.prototype.toUpper=function(r){return new aggregate_1.ToUpperAggregateCommand(r)};e.prototype.split=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.SplitAggregateCommand(n)};e.prototype.substr=function(r,t,n){var o=Array.isArray(r)?r:[r,t,n];return new aggregate_1.SubstrAggregateCommand(o)};e.prototype.substrBytes=function(r,t,n){var o=Array.isArray(r)?r:[r,t,n];return new aggregate_1.SubstrBytesAggregateCommand(o)};e.prototype.first=function(r){return new aggregate_1.FirstAggregateCommand(r)};e.prototype.last=function(r){return new aggregate_1.LastAggregateCommand(r)};e.prototype.push=function(r){return new aggregate_1.PushAggregateCommand(r)};e.prototype.let=function(r){return new aggregate_1.LetAggregateCommand(r)};e.prototype.add=function(r){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}var o=Array.isArray(r)?r:__spreadArray([r],t,true);return new aggregate_1.AddAggregateCommand(o)};e.prototype.subtract=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.SubtractAggregateCommand(n)};e.prototype.multiply=function(r){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}var o=Array.isArray(r)?r:__spreadArray([r],t,true);return new aggregate_1.MultiplyAggregateCommand(o)};e.prototype.divide=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.DivideAggregateCommand(n)};e.prototype.abs=function(r){return new aggregate_1.AbsAggregateCommand(r)};e.prototype.ceil=function(r){return new aggregate_1.CeilAggregateCommand(r)};e.prototype.exp=function(r){return new aggregate_1.ExpAggregateCommand(r)};e.prototype.floor=function(r){return new aggregate_1.FloorAggregateCommand(r)};e.prototype.ln=function(r){return new aggregate_1.LnAggregateCommand(r)};e.prototype.log=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.LogAggregateCommand(n)};e.prototype.log10=function(r){return new aggregate_1.Log10AggregateCommand(r)};e.prototype.mod=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.ModAggregateCommand(n)};e.prototype.pow=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.PowAggregateCommand(n)};e.prototype.sqrt=function(r){return new aggregate_1.SqrtAggregateCommand(r)};e.prototype.trunc=function(r){return new aggregate_1.TruncAggregateCommand(r)};e.prototype.mergeObjects=function(r){return new aggregate_1.MergeObjectsAggregateCommand(r)};e.prototype.month=function(r){return new aggregate_1.MonthAggregateCommand(r)};e.prototype.year=function(r){return new aggregate_1.YearAggregateCommand(r)};e.prototype.week=function(r){return new aggregate_1.WeekAggregateCommand(r)};e.prototype.isoWeek=function(r){return new aggregate_1.ISOWeekAggregateCommand(r)};return e}();exports.AggregateCommandFactory=AggregateCommandFactory;var Command=function(){function e(){this.aggregate=new AggregateCommandFactory;this.Sort=constant_1.Sort}e.prototype.addToSet=function(r){return new addToSet_1.AddToSetCommand(r)};e.prototype.inc=function(r){return new inc_1.IncCommand(r)};e.prototype.max=function(r){return new max_1.MaxCommand(r)};e.prototype.min=function(r){return new min_1.MinCommand(r)};e.prototype.mul=function(r){return new mul_1.MulCommand(r)};e.prototype.pop=function(r){return new pop_1.PopCommand(r)};e.prototype.pull=function(r){return new pull_1.PullCommand(r)};e.prototype.pullAll=function(r){return new pullAll_1.PullAllCommand(r)};e.prototype.push=function(r){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}return new(push_1.PushCommand.bind.apply(push_1.PushCommand,__spreadArray([void 0,r],t,false)))};e.prototype.remove=function(){return new remove_1.RemoveCommand};e.prototype.rename=function(r){return new rename_1.RenameCommand(r)};e.prototype.set=function(r){return new set_1.SetCommand(r)};e.prototype.expr=function(r){return new expr_1.ExprCommand(r)};e.prototype.and=function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}r=Array.isArray(r[0])?r[0]:r;var n=new logic_1.AndCommand(r.map(QueryChain_1.QueryChain.unchain));return new QueryChain_1.QueryChain(n)};e.prototype.or=function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}r=Array.isArray(r[0])?r[0]:r;var n=new logic_1.OrCommand(r.map(QueryChain_1.QueryChain.unchain));return new QueryChain_1.QueryChain(n)};e.prototype.not=function(r){var t=new logic_1.NotCommand(QueryChain_1.QueryChain.unchain(r));return new QueryChain_1.QueryChain(t)};e.prototype.nor=function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}r=Array.isArray(r[0])?r[0]:r;var n=new logic_1.NorCommand(r.map(QueryChain_1.QueryChain.unchain));return new QueryChain_1.QueryChain(n)};e.prototype.eq=function(r){return new QueryChain_1.QueryChain(new eq_1.EqCommand(r))};e.prototype.neq=function(r){return new QueryChain_1.QueryChain(new neq_1.NeqCommand(r))};e.prototype.lt=function(r){return new QueryChain_1.QueryChain(new lt_1.LtCommand(r))};e.prototype.lte=function(r){return new QueryChain_1.QueryChain(new lte_1.LteCommand(r))};e.prototype.gt=function(r){return new QueryChain_1.QueryChain(new gt_1.GtCommand(r))};e.prototype.gte=function(r){return new QueryChain_1.QueryChain(new gte_1.GteCommand(r))};e.prototype.in=function(r){return new QueryChain_1.QueryChain(new in_1.InCommand(r))};e.prototype.nin=function(r){return new QueryChain_1.QueryChain(new nin_1.NinCommand(r))};e.prototype.exists=function(r){return new QueryChain_1.QueryChain(new exists_1.ExistsCommand(r))};e.prototype.mod=function(r,t){return new QueryChain_1.QueryChain(new mod_1.ModCommand(r,t))};e.prototype.all=function(r){return new QueryChain_1.QueryChain(new all_1.AllCommand(r))};e.prototype.elemMatch=function(r){return new QueryChain_1.QueryChain(new elemMatch_1.ElemMatchCommand(QueryChain_1.QueryChain.unchain(r)))};e.prototype.size=function(r){return new QueryChain_1.QueryChain(new size_1.SizeCommand(r))};return e}();exports.Command=Command;
"use strict";var __spreadArray=this&&this.__spreadArray||function(e,r,t){if(t||arguments.length===2)for(var n=0,o=r.length,a;n<o;n++){if(a||!(n in r)){if(!a)a=Array.prototype.slice.call(r,0,n);a[n]=r[n]}}return e.concat(a||Array.prototype.slice.call(r))};Object.defineProperty(exports,"__esModule",{value:true});exports.Command=exports.AggregateCommandFactory=void 0;var constant_1=require("../common/constant");var aggregate_1=require("./aggregate");var AggregatePipeline_1=require("./AggregatePipeline");var all_1=require("./query/all");var logic_1=require("./query/logic");var elemMatch_1=require("./query/elemMatch");var eq_1=require("./query/eq");var exists_1=require("./query/exists");var expr_1=require("./query/expr");var gt_1=require("./query/gt");var gte_1=require("./query/gte");var in_1=require("./query/in");var lt_1=require("./query/lt");var lte_1=require("./query/lte");var mod_1=require("./query/mod");var neq_1=require("./query/neq");var nin_1=require("./query/nin");var QueryChain_1=require("./query/QueryChain");var size_1=require("./query/size");var addToSet_1=require("./update/addToSet");var inc_1=require("./update/inc");var max_1=require("./update/max");var min_1=require("./update/min");var mul_1=require("./update/mul");var pop_1=require("./update/pop");var pull_1=require("./update/pull");var pullAll_1=require("./update/pullAll");var push_1=require("./update/push");var remove_1=require("./update/remove");var rename_1=require("./update/rename");var set_1=require("./update/set");var geo_1=require("./query/geo");var AggregateCommandFactory=function(){function e(){}e.prototype.pipeline=function(){return new AggregatePipeline_1.AggregatePipeline};e.prototype.avg=function(r){return new aggregate_1.AvgAggregateCommand(r)};e.prototype.count=function(){return new aggregate_1.CountAggregateCommand};e.prototype.max=function(r){return new aggregate_1.MaxAggregateCommand(r)};e.prototype.min=function(r){return new aggregate_1.MinAggregateCommand(r)};e.prototype.sum=function(r){return new aggregate_1.SumAggregateCommand(r)};e.prototype.and=function(r){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}var o=Array.isArray(r)?r:__spreadArray([r],t,true);return new aggregate_1.AndAggregateCommand(o)};e.prototype.or=function(r){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}var o=Array.isArray(r)?r:__spreadArray([r],t,true);return new aggregate_1.OrAggregateCommand(o)};e.prototype.not=function(r){return new aggregate_1.NotAggregateCommand(r)};e.prototype.cmp=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.CMPAggregateCommand(n)};e.prototype.eq=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.EqAggregateCommand(n)};e.prototype.neq=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.NeqAggregateCommand(n)};e.prototype.lt=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.LtAggregateCommand(n)};e.prototype.lte=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.LteAggregateCommand(n)};e.prototype.gt=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.GtAggregateCommand(n)};e.prototype.gte=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.GteAggregateCommand(n)};e.prototype.addToSet=function(r){return new aggregate_1.AddToSetAggregateCommand(r)};e.prototype.arrayElemAt=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.ArrayElemAtAggregateCommand(n)};e.prototype.indexOfArray=function(r,t,n,o){var a=Array.isArray(r)?r:[r,t,n,o].filter(function(u){return u!==void 0});return new aggregate_1.IndexOfArrayAggregateCommand(a)};e.prototype.isArray=function(r){return new aggregate_1.IsArrayAggregateCommand(r)};e.prototype.size=function(r){return new aggregate_1.SizeAggregateCommand(r)};e.prototype.in=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.InAggregateCommand(n)};e.prototype.slice=function(r,t,n){var o=Array.isArray(r)?r:[r,t,n].filter(function(a){return a!==void 0});return new aggregate_1.SliceAggregateCommand(o)};e.prototype.map=function(r){return new aggregate_1.MapAggregateCommand(r)};e.prototype.ifNull=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.IfNullAggregateCommand(n)};e.prototype.cond=function(r){return new aggregate_1.CondAggregateCommand(r)};e.prototype.switch=function(r){return new aggregate_1.SwitchAggregateCommand(r)};e.prototype.concat=function(r){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}var o=Array.isArray(r)?r:__spreadArray([r],t,true);return new aggregate_1.ConcatAggregateCommand(o)};e.prototype.dateToString=function(r){return new aggregate_1.DateToStringAggregateCommand(r)};e.prototype.toLower=function(r){return new aggregate_1.ToLowerAggregateCommand(r)};e.prototype.toUpper=function(r){return new aggregate_1.ToUpperAggregateCommand(r)};e.prototype.split=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.SplitAggregateCommand(n)};e.prototype.substr=function(r,t,n){var o=Array.isArray(r)?r:[r,t,n];return new aggregate_1.SubstrAggregateCommand(o)};e.prototype.substrBytes=function(r,t,n){var o=Array.isArray(r)?r:[r,t,n];return new aggregate_1.SubstrBytesAggregateCommand(o)};e.prototype.first=function(r){return new aggregate_1.FirstAggregateCommand(r)};e.prototype.last=function(r){return new aggregate_1.LastAggregateCommand(r)};e.prototype.push=function(r){return new aggregate_1.PushAggregateCommand(r)};e.prototype.let=function(r){return new aggregate_1.LetAggregateCommand(r)};e.prototype.add=function(r){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}var o=Array.isArray(r)?r:__spreadArray([r],t,true);return new aggregate_1.AddAggregateCommand(o)};e.prototype.subtract=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.SubtractAggregateCommand(n)};e.prototype.multiply=function(r){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}var o=Array.isArray(r)?r:__spreadArray([r],t,true);return new aggregate_1.MultiplyAggregateCommand(o)};e.prototype.divide=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.DivideAggregateCommand(n)};e.prototype.abs=function(r){return new aggregate_1.AbsAggregateCommand(r)};e.prototype.ceil=function(r){return new aggregate_1.CeilAggregateCommand(r)};e.prototype.exp=function(r){return new aggregate_1.ExpAggregateCommand(r)};e.prototype.floor=function(r){return new aggregate_1.FloorAggregateCommand(r)};e.prototype.ln=function(r){return new aggregate_1.LnAggregateCommand(r)};e.prototype.log=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.LogAggregateCommand(n)};e.prototype.log10=function(r){return new aggregate_1.Log10AggregateCommand(r)};e.prototype.mod=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.ModAggregateCommand(n)};e.prototype.pow=function(r,t){var n=Array.isArray(r)?r:[r,t];return new aggregate_1.PowAggregateCommand(n)};e.prototype.sqrt=function(r){return new aggregate_1.SqrtAggregateCommand(r)};e.prototype.trunc=function(r){return new aggregate_1.TruncAggregateCommand(r)};e.prototype.mergeObjects=function(r){return new aggregate_1.MergeObjectsAggregateCommand(r)};e.prototype.month=function(r){return new aggregate_1.MonthAggregateCommand(r)};e.prototype.year=function(r){return new aggregate_1.YearAggregateCommand(r)};e.prototype.week=function(r){return new aggregate_1.WeekAggregateCommand(r)};e.prototype.isoWeek=function(r){return new aggregate_1.ISOWeekAggregateCommand(r)};return e}();exports.AggregateCommandFactory=AggregateCommandFactory;var Command=function(){function e(){this.aggregate=new AggregateCommandFactory;this.Sort=constant_1.Sort}e.prototype.addToSet=function(r){return new addToSet_1.AddToSetCommand(r)};e.prototype.inc=function(r){return new inc_1.IncCommand(r)};e.prototype.max=function(r){return new max_1.MaxCommand(r)};e.prototype.min=function(r){return new min_1.MinCommand(r)};e.prototype.mul=function(r){return new mul_1.MulCommand(r)};e.prototype.pop=function(r){return new pop_1.PopCommand(r)};e.prototype.pull=function(r){return new pull_1.PullCommand(r)};e.prototype.pullAll=function(r){return new pullAll_1.PullAllCommand(r)};e.prototype.push=function(r){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}return new(push_1.PushCommand.bind.apply(push_1.PushCommand,__spreadArray([void 0,r],t,false)))};e.prototype.remove=function(){return new remove_1.RemoveCommand};e.prototype.rename=function(r){return new rename_1.RenameCommand(r)};e.prototype.set=function(r){return new set_1.SetCommand(r)};e.prototype.expr=function(r){return new expr_1.ExprCommand(r)};e.prototype.geoWithin=function(r){return new geo_1.GeoWithinCommand(r)};e.prototype.geoNear=function(r){return new geo_1.GeoNearCommand(r)};e.prototype.geoIntersects=function(r){return new geo_1.GeoIntersectsCommand(r)};e.prototype.and=function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}r=Array.isArray(r[0])?r[0]:r;var n=new logic_1.AndCommand(r.map(QueryChain_1.QueryChain.unchain));return new QueryChain_1.QueryChain(n)};e.prototype.or=function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}r=Array.isArray(r[0])?r[0]:r;var n=new logic_1.OrCommand(r.map(QueryChain_1.QueryChain.unchain));return new QueryChain_1.QueryChain(n)};e.prototype.not=function(r){var t=new logic_1.NotCommand(QueryChain_1.QueryChain.unchain(r));return new QueryChain_1.QueryChain(t)};e.prototype.nor=function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}r=Array.isArray(r[0])?r[0]:r;var n=new logic_1.NorCommand(r.map(QueryChain_1.QueryChain.unchain));return new QueryChain_1.QueryChain(n)};e.prototype.eq=function(r){return new QueryChain_1.QueryChain(new eq_1.EqCommand(r))};e.prototype.neq=function(r){return new QueryChain_1.QueryChain(new neq_1.NeqCommand(r))};e.prototype.lt=function(r){return new QueryChain_1.QueryChain(new lt_1.LtCommand(r))};e.prototype.lte=function(r){return new QueryChain_1.QueryChain(new lte_1.LteCommand(r))};e.prototype.gt=function(r){return new QueryChain_1.QueryChain(new gt_1.GtCommand(r))};e.prototype.gte=function(r){return new QueryChain_1.QueryChain(new gte_1.GteCommand(r))};e.prototype.in=function(r){return new QueryChain_1.QueryChain(new in_1.InCommand(r))};e.prototype.nin=function(r){return new QueryChain_1.QueryChain(new nin_1.NinCommand(r))};e.prototype.exists=function(r){return new QueryChain_1.QueryChain(new exists_1.ExistsCommand(r))};e.prototype.mod=function(r,t){return new QueryChain_1.QueryChain(new mod_1.ModCommand(r,t))};e.prototype.all=function(r){return new QueryChain_1.QueryChain(new all_1.AllCommand(r))};e.prototype.elemMatch=function(r){return new QueryChain_1.QueryChain(new elemMatch_1.ElemMatchCommand(QueryChain_1.QueryChain.unchain(r)))};e.prototype.size=function(r){return new QueryChain_1.QueryChain(new size_1.SizeCommand(r))};return e}();exports.Command=Command;

@@ -16,1 +16,2 @@ export * from './typing';

export * from './common/constant';
export { Geo } from './mongo-builder/Geo';

@@ -1,1 +0,1 @@

"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,r,e,t){if(t===void 0)t=e;var n=Object.getOwnPropertyDescriptor(r,e);if(!n||("get"in n?!r.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return r[e]}}}Object.defineProperty(o,t,n)}:function(o,r,e,t){if(t===void 0)t=e;o[t]=r[e]});var __exportStar=this&&this.__exportStar||function(o,r){for(var e in o)if(e!=="default"&&!Object.prototype.hasOwnProperty.call(r,e))__createBinding(r,o,e)};Object.defineProperty(exports,"__esModule",{value:true});exports.ErrorCode=exports.DbBuildError=exports.QueryChain=exports.UpdateArrayCommand=exports.UpdateCommand=exports.QueryCommand=exports.AggregateCommand=exports.AggregateCommandFactory=exports.Command=exports.AggregateRequest=exports.UpdateRequest=exports.QueryRequest=exports.AggregateBuilder=exports.Regex=exports.QueryBuilder=exports.DocumentBuilder=exports.CollectionBuilder=exports.MongoBuilder=void 0;__exportStar(require("./typing"),exports);var mongo_builder_1=require("./mongo-builder");Object.defineProperty(exports,"MongoBuilder",{enumerable:true,get:function(){return mongo_builder_1.MongoBuilder}});var Collection_1=require("./mongo-builder/Collection");Object.defineProperty(exports,"CollectionBuilder",{enumerable:true,get:function(){return Collection_1.CollectionBuilder}});var Document_1=require("./mongo-builder/Document");Object.defineProperty(exports,"DocumentBuilder",{enumerable:true,get:function(){return Document_1.DocumentBuilder}});var Query_1=require("./mongo-builder/Query");Object.defineProperty(exports,"QueryBuilder",{enumerable:true,get:function(){return Query_1.QueryBuilder}});var Regex_1=require("./mongo-builder/Regex");Object.defineProperty(exports,"Regex",{enumerable:true,get:function(){return Regex_1.Regex}});var Aggregate_1=require("./mongo-builder/Aggregate");Object.defineProperty(exports,"AggregateBuilder",{enumerable:true,get:function(){return Aggregate_1.AggregateBuilder}});var QueryRequest_1=require("./command/QueryRequest");Object.defineProperty(exports,"QueryRequest",{enumerable:true,get:function(){return QueryRequest_1.QueryRequest}});var UpdateRequest_1=require("./command/UpdateRequest");Object.defineProperty(exports,"UpdateRequest",{enumerable:true,get:function(){return UpdateRequest_1.UpdateRequest}});var AggregateRequest_1=require("./command/AggregateRequest");Object.defineProperty(exports,"AggregateRequest",{enumerable:true,get:function(){return AggregateRequest_1.AggregateRequest}});var command_1=require("./command");Object.defineProperty(exports,"Command",{enumerable:true,get:function(){return command_1.Command}});Object.defineProperty(exports,"AggregateCommandFactory",{enumerable:true,get:function(){return command_1.AggregateCommandFactory}});var AbstractCommand_1=require("./command/AbstractCommand");Object.defineProperty(exports,"AggregateCommand",{enumerable:true,get:function(){return AbstractCommand_1.AggregateCommand}});Object.defineProperty(exports,"QueryCommand",{enumerable:true,get:function(){return AbstractCommand_1.QueryCommand}});Object.defineProperty(exports,"UpdateCommand",{enumerable:true,get:function(){return AbstractCommand_1.UpdateCommand}});Object.defineProperty(exports,"UpdateArrayCommand",{enumerable:true,get:function(){return AbstractCommand_1.UpdateArrayCommand}});var QueryChain_1=require("./command/query/QueryChain");Object.defineProperty(exports,"QueryChain",{enumerable:true,get:function(){return QueryChain_1.QueryChain}});var error_1=require("./common/error");Object.defineProperty(exports,"DbBuildError",{enumerable:true,get:function(){return error_1.DbBuildError}});Object.defineProperty(exports,"ErrorCode",{enumerable:true,get:function(){return error_1.ErrorCode}});__exportStar(require("./common/constant"),exports);
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,r,e,t){if(t===void 0)t=e;var n=Object.getOwnPropertyDescriptor(r,e);if(!n||("get"in n?!r.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return r[e]}}}Object.defineProperty(o,t,n)}:function(o,r,e,t){if(t===void 0)t=e;o[t]=r[e]});var __exportStar=this&&this.__exportStar||function(o,r){for(var e in o)if(e!=="default"&&!Object.prototype.hasOwnProperty.call(r,e))__createBinding(r,o,e)};Object.defineProperty(exports,"__esModule",{value:true});exports.Geo=exports.ErrorCode=exports.DbBuildError=exports.QueryChain=exports.UpdateArrayCommand=exports.UpdateCommand=exports.QueryCommand=exports.AggregateCommand=exports.AggregateCommandFactory=exports.Command=exports.AggregateRequest=exports.UpdateRequest=exports.QueryRequest=exports.AggregateBuilder=exports.Regex=exports.QueryBuilder=exports.DocumentBuilder=exports.CollectionBuilder=exports.MongoBuilder=void 0;__exportStar(require("./typing"),exports);var mongo_builder_1=require("./mongo-builder");Object.defineProperty(exports,"MongoBuilder",{enumerable:true,get:function(){return mongo_builder_1.MongoBuilder}});var Collection_1=require("./mongo-builder/Collection");Object.defineProperty(exports,"CollectionBuilder",{enumerable:true,get:function(){return Collection_1.CollectionBuilder}});var Document_1=require("./mongo-builder/Document");Object.defineProperty(exports,"DocumentBuilder",{enumerable:true,get:function(){return Document_1.DocumentBuilder}});var Query_1=require("./mongo-builder/Query");Object.defineProperty(exports,"QueryBuilder",{enumerable:true,get:function(){return Query_1.QueryBuilder}});var Regex_1=require("./mongo-builder/Regex");Object.defineProperty(exports,"Regex",{enumerable:true,get:function(){return Regex_1.Regex}});var Aggregate_1=require("./mongo-builder/Aggregate");Object.defineProperty(exports,"AggregateBuilder",{enumerable:true,get:function(){return Aggregate_1.AggregateBuilder}});var QueryRequest_1=require("./command/QueryRequest");Object.defineProperty(exports,"QueryRequest",{enumerable:true,get:function(){return QueryRequest_1.QueryRequest}});var UpdateRequest_1=require("./command/UpdateRequest");Object.defineProperty(exports,"UpdateRequest",{enumerable:true,get:function(){return UpdateRequest_1.UpdateRequest}});var AggregateRequest_1=require("./command/AggregateRequest");Object.defineProperty(exports,"AggregateRequest",{enumerable:true,get:function(){return AggregateRequest_1.AggregateRequest}});var command_1=require("./command");Object.defineProperty(exports,"Command",{enumerable:true,get:function(){return command_1.Command}});Object.defineProperty(exports,"AggregateCommandFactory",{enumerable:true,get:function(){return command_1.AggregateCommandFactory}});var AbstractCommand_1=require("./command/AbstractCommand");Object.defineProperty(exports,"AggregateCommand",{enumerable:true,get:function(){return AbstractCommand_1.AggregateCommand}});Object.defineProperty(exports,"QueryCommand",{enumerable:true,get:function(){return AbstractCommand_1.QueryCommand}});Object.defineProperty(exports,"UpdateCommand",{enumerable:true,get:function(){return AbstractCommand_1.UpdateCommand}});Object.defineProperty(exports,"UpdateArrayCommand",{enumerable:true,get:function(){return AbstractCommand_1.UpdateArrayCommand}});var QueryChain_1=require("./command/query/QueryChain");Object.defineProperty(exports,"QueryChain",{enumerable:true,get:function(){return QueryChain_1.QueryChain}});var error_1=require("./common/error");Object.defineProperty(exports,"DbBuildError",{enumerable:true,get:function(){return error_1.DbBuildError}});Object.defineProperty(exports,"ErrorCode",{enumerable:true,get:function(){return error_1.ErrorCode}});__exportStar(require("./common/constant"),exports);var Geo_1=require("./mongo-builder/Geo");Object.defineProperty(exports,"Geo",{enumerable:true,get:function(){return Geo_1.Geo}});
import { Command } from '../command';
import type { MongoCollectionListQueryOperation, MongoCollectionOperation, RegExpParam } from '../typing';
import { CollectionBuilder } from './Collection';
import { Geo } from './Geo';
import { Regex } from './Regex';
export declare class MongoBuilder {
command: Command;
Geo: Geo;
constructor();

@@ -8,0 +10,0 @@ RegExp(param: RegExpParam): Regex;

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.MongoBuilder=void 0;var command_1=require("../command");var constant_1=require("../common/constant");var util_1=require("../common/util");var Collection_1=require("./Collection");var Regex_1=require("./Regex");var MongoBuilder=function(){function e(){this.command=new command_1.Command}e.prototype.RegExp=function(o){return new Regex_1.Regex(o)};e.prototype.regexp=function(o){return new Regex_1.Regex(o)};e.prototype.collection=function(o){return new Collection_1.CollectionBuilder(o)};e.prototype.createCollection=function(o){return util_1.ActionBuilder.buildCollectionAction(constant_1.CollectionAction.create,o)};e.prototype.getCollection=function(o){return util_1.ActionBuilder.buildCollectionAction(constant_1.CollectionAction.query,o)};e.prototype.listCollection=function(o,t){return util_1.ActionBuilder.buildCollectionListQueryAction({$limit:o!==null&&o!==void 0?o:10,$skip:t!==null&&t!==void 0?t:0})};e.prototype.deleteCollection=function(o){return util_1.ActionBuilder.buildCollectionAction(constant_1.CollectionAction.delete,o)};return e}();exports.MongoBuilder=MongoBuilder;
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.MongoBuilder=void 0;var command_1=require("../command");var constant_1=require("../common/constant");var util_1=require("../common/util");var Collection_1=require("./Collection");var Geo_1=require("./Geo");var Regex_1=require("./Regex");var MongoBuilder=function(){function o(){this.command=new command_1.Command;this.Geo=new Geo_1.Geo}o.prototype.RegExp=function(e){return new Regex_1.Regex(e)};o.prototype.regexp=function(e){return new Regex_1.Regex(e)};o.prototype.collection=function(e){return new Collection_1.CollectionBuilder(e)};o.prototype.createCollection=function(e){return util_1.ActionBuilder.buildCollectionAction(constant_1.CollectionAction.create,e)};o.prototype.getCollection=function(e){return util_1.ActionBuilder.buildCollectionAction(constant_1.CollectionAction.query,e)};o.prototype.listCollection=function(e,t){return util_1.ActionBuilder.buildCollectionListQueryAction({$limit:e!==null&&e!==void 0?e:10,$skip:t!==null&&t!==void 0?t:0})};o.prototype.deleteCollection=function(e){return util_1.ActionBuilder.buildCollectionAction(constant_1.CollectionAction.delete,e)};return o}();exports.MongoBuilder=MongoBuilder;
import { AggregateCommand } from './command/AbstractCommand';
import { CollectionAction, DocumentAction, PipelineStageName, Sort, Target } from './common/constant';
import { GeoPolygon, GeoMultiPolygon, GeoPoint, GeoLineString, GeoMultiPoint, GeoMultiLineString } from './mongo-builder/Geo';
export type BuiltInType = 'string' | 'number' | 'bigint' | 'boolean' | 'symbol' | 'undefined' | 'object' | 'function';

@@ -141,1 +142,13 @@ export type AggregateExpression<T = any> = string | AggregateCommand | T;

export type SubtractCommandParam = [AggregateDateExpression, AggregateNumberExpression];
export interface GeoWinthinParam {
centerSphere?: [[number, number], number];
geometry?: GeoPolygon | GeoMultiPolygon;
}
export interface GeoNearParam {
geometry: GeoPoint;
maxDistance?: number;
minDistance?: number;
}
export interface GeoIntersectsParam {
geometry: GeoPoint | GeoLineString | GeoPolygon | GeoMultiPoint | GeoMultiLineString | GeoMultiPolygon;
}
{
"name": "@alipay/faas-db-builder",
"version": "1.1.18-alpha.4",
"version": "1.1.18-alpha.5",
"description": "db builder",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc