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 to 1.1.19-alpha.0

53

esm/command/aggregate.d.ts

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

import { AggregateArrayExpression, AggregateDateParam, AggregateDocumentExpression, AggregateExpression, AggregateExpressionPair, AggregateExpressionRecord, AggregateNumberExpression, AggregateNumberExpressionPair, AggregateStringExpression, AggregateStringExpressionPair, CondCommandParam, DateToStringCommandParam, IndexOfArrayCommandParam, LetCommandParam, MapParam, SliceCommandParam, SubstrBytesCommandParam, SubstrCommandParam, SubtractCommandParam, SwitchCommandParam } from '../typing';
import { AggregateArrayExpression, AggregateDateFromStringParam, AggregateDateParam, AggregateDocumentExpression, AggregateExpression, AggregateExpressionPair, AggregateExpressionRecord, AggregateFilterParam, AggregateIndexOfParam, AggregateNumberExpression, AggregateNumberExpressionPair, AggregateRangeParam, AggregateReduceParam, AggregateStrcasecmpParam, AggregateStringExpression, AggregateStringExpressionPair, AggregateZipParam, AggregateSubstrCPParam, CondCommandParam, DateToStringCommandParam, IndexOfArrayCommandParam, LetCommandParam, MapParam, SliceCommandParam, SubstrBytesCommandParam, SubstrCommandParam, SubtractCommandParam, SwitchCommandParam } from '../typing';
import { AggregateCommand } from './AbstractCommand';

@@ -178,1 +178,52 @@ export declare class AggregateCommandImpl<T> extends AggregateCommand {

}
export declare class ArrayToObjectAggregateCommand extends AggregateCommandImpl<AggregateArrayExpression[]> {
constructor(value: AggregateArrayExpression[]);
}
export declare class ConcatArraysAggregateCommand extends AggregateCommandImpl<AggregateArrayExpression[]> {
constructor(value: AggregateArrayExpression[]);
}
export declare class FilterAggregateCommand extends AggregateCommandImpl<AggregateFilterParam> {
constructor(value: AggregateFilterParam);
}
export declare class ObjectToArrayAggregateCommand extends AggregateCommandImpl<AggregateDocumentExpression> {
constructor(value: AggregateDocumentExpression);
}
export declare class RangeAggregateCommand extends AggregateCommandImpl<AggregateRangeParam> {
constructor(value: AggregateRangeParam);
}
export declare class ReduceAggregateCommand extends AggregateCommandImpl<AggregateReduceParam> {
constructor(value: AggregateReduceParam);
}
export declare class ReverseArrayAggregateCommand extends AggregateCommandImpl<AggregateArrayExpression> {
constructor(value: AggregateArrayExpression);
}
export declare class ZipAggregateCommand extends AggregateCommandImpl<AggregateZipParam> {
constructor(value: AggregateZipParam);
}
export declare class DateFromStringAggregateCommand extends AggregateCommandImpl<AggregateDateFromStringParam> {
constructor(value: AggregateDateFromStringParam);
}
export declare class IndexOfBytesAggregateCommand extends AggregateCommandImpl<AggregateIndexOfParam> {
constructor(value: AggregateIndexOfParam);
}
export declare class IndexOfCPAggregateCommand extends AggregateCommandImpl<AggregateIndexOfParam> {
constructor(value: AggregateIndexOfParam);
}
export declare class StrLenBytesAggregateCommand extends AggregateCommandImpl<AggregateStringExpression> {
constructor(value: AggregateStringExpression);
}
export declare class StrLenCPAggregateCommand extends AggregateCommandImpl<AggregateStringExpression> {
constructor(value: AggregateStringExpression);
}
export declare class StrcasecmpAggregateCommand extends AggregateCommandImpl<AggregateStrcasecmpParam> {
constructor(value: AggregateStrcasecmpParam);
}
export declare class SubstrCPAggregateCommand extends AggregateCommandImpl<AggregateSubstrCPParam> {
constructor(value: AggregateSubstrCPParam);
}
export declare class StdDevPopAggregateCommand extends AggregateCommandImpl<AggregateExpression> {
constructor(value: AggregateExpression);
}
export declare class StdDevSampAggregateCommand extends AggregateCommandImpl<AggregateExpression> {
constructor(value: AggregateExpression);
}

2

esm/command/aggregate.js

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

var e=function(){var n=function(t,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,g){o.__proto__=g}||function(o,g){for(var i in g)if(Object.prototype.hasOwnProperty.call(g,i))o[i]=g[i]};return n(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();import{AggregateCommand as m}from"./AbstractCommand";import{AggregateRequest as u}from"./AggregateRequest";var a=function(n){e(t,n);function t(r,o){return n.call(this,r,new u(o).toJSON())||this}return t}(m);export{a as AggregateCommandImpl};var c=function(n){e(t,n);function t(r){return n.call(this,"abs",r)||this}return t}(a);export{c as AbsAggregateCommand};var l=function(n){e(t,n);function t(r){return n.call(this,"add",r)||this}return t}(a);export{l as AddAggregateCommand};var d=function(n){e(t,n);function t(r){return n.call(this,"addToSet",r)||this}return t}(a);export{d as AddToSetAggregateCommand};var f=function(n){e(t,n);function t(r){return n.call(this,"and",r)||this}return t}(a);export{f as AndAggregateCommand};var A=function(n){e(t,n);function t(r){return n.call(this,"arrayElemAt",r)||this}return t}(a);export{A as ArrayElemAtAggregateCommand};var h=function(n){e(t,n);function t(r){return n.call(this,"avg",r)||this}return t}(a);export{h as AvgAggregateCommand};var C=function(n){e(t,n);function t(r){return n.call(this,"ceil",r)||this}return t}(a);export{C as CeilAggregateCommand};var s=function(n){e(t,n);function t(r){return n.call(this,"cmp",r)||this}return t}(a);export{s as CMPAggregateCommand};var x=function(n){e(t,n);function t(r){return n.call(this,"concat",r)||this}return t}(a);export{x as ConcatAggregateCommand};var v=function(n){e(t,n);function t(r){var o=Array.isArray(r)?{if:r[0],then:r[1],else:r[2]}:r;return n.call(this,"cond",o)||this}return t}(a);export{v as CondAggregateCommand};var p=function(n){e(t,n);function t(){return n.call(this,"count",{})||this}t.prototype.stringify=function(){return{$sum:1}};return t}(a);export{p as CountAggregateCommand};var y=function(n){e(t,n);function t(r){return n.call(this,"dateToString",r)||this}return t}(a);export{y as DateToStringAggregateCommand};var S=function(n){e(t,n);function t(r){return n.call(this,"divide",r)||this}return t}(a);export{S as DivideAggregateCommand};var L=function(n){e(t,n);function t(r){return n.call(this,"eq",r)||this}return t}(a);export{L as EqAggregateCommand};var M=function(n){e(t,n);function t(r){return n.call(this,"exp",r)||this}return t}(a);export{M as ExpAggregateCommand};var O=function(n){e(t,n);function t(r){return n.call(this,"first",r)||this}return t}(a);export{O as FirstAggregateCommand};var w=function(n){e(t,n);function t(r){return n.call(this,"floor",r)||this}return t}(a);export{w as FloorAggregateCommand};var T=function(n){e(t,n);function t(r){return n.call(this,"gt",r)||this}return t}(a);export{T as GtAggregateCommand};var I=function(n){e(t,n);function t(r){return n.call(this,"gte",r)||this}return t}(a);export{I as GteAggregateCommand};var b=function(n){e(t,n);function t(r){return n.call(this,"ifNull",r)||this}return t}(a);export{b as IfNullAggregateCommand};var q=function(n){e(t,n);function t(r){return n.call(this,"in",r)||this}return t}(a);export{q as InAggregateCommand};var E=function(n){e(t,n);function t(r){return n.call(this,"indexOfArray",r)||this}return t}(a);export{E as IndexOfArrayAggregateCommand};var N=function(n){e(t,n);function t(r){return n.call(this,"isArray",r)||this}return t}(a);export{N as IsArrayAggregateCommand};var P=function(n){e(t,n);function t(r){return n.call(this,"isoWeek",r)||this}return t}(a);export{P as ISOWeekAggregateCommand};var j=function(n){e(t,n);function t(r){return n.call(this,"last",r)||this}return t}(a);export{j as LastAggregateCommand};var k=function(n){e(t,n);function t(r){return n.call(this,"let",r)||this}return t}(a);export{k as LetAggregateCommand};var W=function(n){e(t,n);function t(r){return n.call(this,"ln",r)||this}return t}(a);export{W as LnAggregateCommand};var D=function(n){e(t,n);function t(r){return n.call(this,"log",r)||this}return t}(a);export{D as LogAggregateCommand};var F=function(n){e(t,n);function t(r){return n.call(this,"log10",r)||this}return t}(a);export{F as Log10AggregateCommand};var G=function(n){e(t,n);function t(r){return n.call(this,"lt",r)||this}return t}(a);export{G as LtAggregateCommand};var z=function(n){e(t,n);function t(r){return n.call(this,"lte",r)||this}return t}(a);export{z as LteAggregateCommand};var B=function(n){e(t,n);function t(r){return n.call(this,"map",r)||this}return t}(a);export{B as MapAggregateCommand};var U=function(n){e(t,n);function t(r){return n.call(this,"max",r)||this}return t}(a);export{U as MaxAggregateCommand};var Y=function(n){e(t,n);function t(r){return n.call(this,"mergeObjects",r)||this}return t}(a);export{Y as MergeObjectsAggregateCommand};var J=function(n){e(t,n);function t(r){return n.call(this,"min",r)||this}return t}(a);export{J as MinAggregateCommand};var R=function(n){e(t,n);function t(r){return n.call(this,"mod",r)||this}return t}(a);export{R as ModAggregateCommand};var $=function(n){e(t,n);function t(r){return n.call(this,"month",r)||this}return t}(a);export{$ as MonthAggregateCommand};var H=function(n){e(t,n);function t(r){return n.call(this,"multiply",r)||this}return t}(a);export{H as MultiplyAggregateCommand};var K=function(n){e(t,n);function t(r){return n.call(this,"ne",r)||this}return t}(a);export{K as NeqAggregateCommand};var Q=function(n){e(t,n);function t(r){return n.call(this,"not",[r])||this}return t}(a);export{Q as NotAggregateCommand};var V=function(n){e(t,n);function t(r){return n.call(this,"or",r)||this}return t}(a);export{V as OrAggregateCommand};var X=function(n){e(t,n);function t(r){return n.call(this,"pow",r)||this}return t}(a);export{X as PowAggregateCommand};var Z=function(n){e(t,n);function t(r){return n.call(this,"push",r)||this}return t}(a);export{Z as PushAggregateCommand};var _=function(n){e(t,n);function t(r){return n.call(this,"size",r)||this}return t}(a);export{_ as SizeAggregateCommand};var tt=function(n){e(t,n);function t(r){return n.call(this,"slice",r)||this}return t}(a);export{tt as SliceAggregateCommand};var nt=function(n){e(t,n);function t(r){return n.call(this,"split",r)||this}return t}(a);export{nt as SplitAggregateCommand};var rt=function(n){e(t,n);function t(r){return n.call(this,"sqrt",r)||this}return t}(a);export{rt as SqrtAggregateCommand};var et=function(n){e(t,n);function t(r){return n.call(this,"substr",r)||this}return t}(a);export{et as SubstrAggregateCommand};var at=function(n){e(t,n);function t(r){return n.call(this,"substrBytes",r)||this}return t}(a);export{at as SubstrBytesAggregateCommand};var ot=function(n){e(t,n);function t(r){return n.call(this,"subtract",r)||this}return t}(a);export{ot as SubtractAggregateCommand};var gt=function(n){e(t,n);function t(r){return n.call(this,"sum",r)||this}return t}(a);export{gt as SumAggregateCommand};var it=function(n){e(t,n);function t(r){var o=r.branches.map(function(g){if(Array.isArray(g)){return{case:g[0],then:g[1]}}return{case:g.case,then:g.then}});return n.call(this,"switch",{branches:o,default:r.default})||this}return t}(a);export{it as SwitchAggregateCommand};var mt=function(n){e(t,n);function t(r){return n.call(this,"toLower",r)||this}return t}(a);export{mt as ToLowerAggregateCommand};var ut=function(n){e(t,n);function t(r){return n.call(this,"toUpper",r)||this}return t}(a);export{ut as ToUpperAggregateCommand};var ct=function(n){e(t,n);function t(r){return n.call(this,"trunc",r)||this}return t}(a);export{ct as TruncAggregateCommand};var lt=function(n){e(t,n);function t(r){return n.call(this,"week",r)||this}return t}(a);export{lt as WeekAggregateCommand};var dt=function(n){e(t,n);function t(r){return n.call(this,"year",r)||this}return t}(a);export{dt as YearAggregateCommand};
var e=function(){var n=function(t,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,g){o.__proto__=g}||function(o,g){for(var i in g)if(Object.prototype.hasOwnProperty.call(g,i))o[i]=g[i]};return n(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();import{AggregateCommand as m}from"./AbstractCommand";import{AggregateRequest as c}from"./AggregateRequest";var a=function(n){e(t,n);function t(r,o){return n.call(this,r,new c(o).toJSON())||this}return t}(m);export{a as AggregateCommandImpl};var u=function(n){e(t,n);function t(r){return n.call(this,"abs",r)||this}return t}(a);export{u as AbsAggregateCommand};var d=function(n){e(t,n);function t(r){return n.call(this,"add",r)||this}return t}(a);export{d as AddAggregateCommand};var l=function(n){e(t,n);function t(r){return n.call(this,"addToSet",r)||this}return t}(a);export{l as AddToSetAggregateCommand};var A=function(n){e(t,n);function t(r){return n.call(this,"and",r)||this}return t}(a);export{A as AndAggregateCommand};var f=function(n){e(t,n);function t(r){return n.call(this,"arrayElemAt",r)||this}return t}(a);export{f as ArrayElemAtAggregateCommand};var C=function(n){e(t,n);function t(r){return n.call(this,"avg",r)||this}return t}(a);export{C as AvgAggregateCommand};var h=function(n){e(t,n);function t(r){return n.call(this,"ceil",r)||this}return t}(a);export{h as CeilAggregateCommand};var s=function(n){e(t,n);function t(r){return n.call(this,"cmp",r)||this}return t}(a);export{s as CMPAggregateCommand};var x=function(n){e(t,n);function t(r){return n.call(this,"concat",r)||this}return t}(a);export{x as ConcatAggregateCommand};var v=function(n){e(t,n);function t(r){var o=Array.isArray(r)?{if:r[0],then:r[1],else:r[2]}:r;return n.call(this,"cond",o)||this}return t}(a);export{v as CondAggregateCommand};var p=function(n){e(t,n);function t(){return n.call(this,"count",{})||this}t.prototype.stringify=function(){return{$sum:1}};return t}(a);export{p as CountAggregateCommand};var y=function(n){e(t,n);function t(r){return n.call(this,"dateToString",r)||this}return t}(a);export{y as DateToStringAggregateCommand};var S=function(n){e(t,n);function t(r){return n.call(this,"divide",r)||this}return t}(a);export{S as DivideAggregateCommand};var O=function(n){e(t,n);function t(r){return n.call(this,"eq",r)||this}return t}(a);export{O as EqAggregateCommand};var L=function(n){e(t,n);function t(r){return n.call(this,"exp",r)||this}return t}(a);export{L as ExpAggregateCommand};var P=function(n){e(t,n);function t(r){return n.call(this,"first",r)||this}return t}(a);export{P as FirstAggregateCommand};var T=function(n){e(t,n);function t(r){return n.call(this,"floor",r)||this}return t}(a);export{T as FloorAggregateCommand};var b=function(n){e(t,n);function t(r){return n.call(this,"gt",r)||this}return t}(a);export{b as GtAggregateCommand};var I=function(n){e(t,n);function t(r){return n.call(this,"gte",r)||this}return t}(a);export{I as GteAggregateCommand};var M=function(n){e(t,n);function t(r){return n.call(this,"ifNull",r)||this}return t}(a);export{M as IfNullAggregateCommand};var w=function(n){e(t,n);function t(r){return n.call(this,"in",r)||this}return t}(a);export{w as InAggregateCommand};var j=function(n){e(t,n);function t(r){return n.call(this,"indexOfArray",r)||this}return t}(a);export{j as IndexOfArrayAggregateCommand};var D=function(n){e(t,n);function t(r){return n.call(this,"isArray",r)||this}return t}(a);export{D as IsArrayAggregateCommand};var q=function(n){e(t,n);function t(r){return n.call(this,"isoWeek",r)||this}return t}(a);export{q as ISOWeekAggregateCommand};var B=function(n){e(t,n);function t(r){return n.call(this,"last",r)||this}return t}(a);export{B as LastAggregateCommand};var F=function(n){e(t,n);function t(r){return n.call(this,"let",r)||this}return t}(a);export{F as LetAggregateCommand};var E=function(n){e(t,n);function t(r){return n.call(this,"ln",r)||this}return t}(a);export{E as LnAggregateCommand};var N=function(n){e(t,n);function t(r){return n.call(this,"log",r)||this}return t}(a);export{N as LogAggregateCommand};var R=function(n){e(t,n);function t(r){return n.call(this,"log10",r)||this}return t}(a);export{R as Log10AggregateCommand};var k=function(n){e(t,n);function t(r){return n.call(this,"lt",r)||this}return t}(a);export{k as LtAggregateCommand};var W=function(n){e(t,n);function t(r){return n.call(this,"lte",r)||this}return t}(a);export{W as LteAggregateCommand};var z=function(n){e(t,n);function t(r){return n.call(this,"map",r)||this}return t}(a);export{z as MapAggregateCommand};var G=function(n){e(t,n);function t(r){return n.call(this,"max",r)||this}return t}(a);export{G as MaxAggregateCommand};var U=function(n){e(t,n);function t(r){return n.call(this,"mergeObjects",r)||this}return t}(a);export{U as MergeObjectsAggregateCommand};var Y=function(n){e(t,n);function t(r){return n.call(this,"min",r)||this}return t}(a);export{Y as MinAggregateCommand};var Z=function(n){e(t,n);function t(r){return n.call(this,"mod",r)||this}return t}(a);export{Z as ModAggregateCommand};var J=function(n){e(t,n);function t(r){return n.call(this,"month",r)||this}return t}(a);export{J as MonthAggregateCommand};var $=function(n){e(t,n);function t(r){return n.call(this,"multiply",r)||this}return t}(a);export{$ as MultiplyAggregateCommand};var H=function(n){e(t,n);function t(r){return n.call(this,"ne",r)||this}return t}(a);export{H as NeqAggregateCommand};var K=function(n){e(t,n);function t(r){return n.call(this,"not",[r])||this}return t}(a);export{K as NotAggregateCommand};var Q=function(n){e(t,n);function t(r){return n.call(this,"or",r)||this}return t}(a);export{Q as OrAggregateCommand};var V=function(n){e(t,n);function t(r){return n.call(this,"pow",r)||this}return t}(a);export{V as PowAggregateCommand};var X=function(n){e(t,n);function t(r){return n.call(this,"push",r)||this}return t}(a);export{X as PushAggregateCommand};var _=function(n){e(t,n);function t(r){return n.call(this,"size",r)||this}return t}(a);export{_ as SizeAggregateCommand};var tt=function(n){e(t,n);function t(r){return n.call(this,"slice",r)||this}return t}(a);export{tt as SliceAggregateCommand};var nt=function(n){e(t,n);function t(r){return n.call(this,"split",r)||this}return t}(a);export{nt as SplitAggregateCommand};var rt=function(n){e(t,n);function t(r){return n.call(this,"sqrt",r)||this}return t}(a);export{rt as SqrtAggregateCommand};var et=function(n){e(t,n);function t(r){return n.call(this,"substr",r)||this}return t}(a);export{et as SubstrAggregateCommand};var at=function(n){e(t,n);function t(r){return n.call(this,"substrBytes",r)||this}return t}(a);export{at as SubstrBytesAggregateCommand};var ot=function(n){e(t,n);function t(r){return n.call(this,"subtract",r)||this}return t}(a);export{ot as SubtractAggregateCommand};var gt=function(n){e(t,n);function t(r){return n.call(this,"sum",r)||this}return t}(a);export{gt as SumAggregateCommand};var it=function(n){e(t,n);function t(r){var o=r.branches.map(function(g){if(Array.isArray(g)){return{case:g[0],then:g[1]}}return{case:g.case,then:g.then}});return n.call(this,"switch",{branches:o,default:r.default})||this}return t}(a);export{it as SwitchAggregateCommand};var mt=function(n){e(t,n);function t(r){return n.call(this,"toLower",r)||this}return t}(a);export{mt as ToLowerAggregateCommand};var ct=function(n){e(t,n);function t(r){return n.call(this,"toUpper",r)||this}return t}(a);export{ct as ToUpperAggregateCommand};var ut=function(n){e(t,n);function t(r){return n.call(this,"trunc",r)||this}return t}(a);export{ut as TruncAggregateCommand};var dt=function(n){e(t,n);function t(r){return n.call(this,"week",r)||this}return t}(a);export{dt as WeekAggregateCommand};var lt=function(n){e(t,n);function t(r){return n.call(this,"year",r)||this}return t}(a);export{lt as YearAggregateCommand};var At=function(n){e(t,n);function t(r){return n.call(this,"arrayToObject",r)||this}return t}(a);export{At as ArrayToObjectAggregateCommand};var ft=function(n){e(t,n);function t(r){return n.call(this,"concatArrays",r)||this}return t}(a);export{ft as ConcatArraysAggregateCommand};var Ct=function(n){e(t,n);function t(r){return n.call(this,"filter",r)||this}return t}(a);export{Ct as FilterAggregateCommand};var ht=function(n){e(t,n);function t(r){return n.call(this,"objectToArray",r)||this}return t}(a);export{ht as ObjectToArrayAggregateCommand};var st=function(n){e(t,n);function t(r){return n.call(this,"range",r)||this}return t}(a);export{st as RangeAggregateCommand};var xt=function(n){e(t,n);function t(r){return n.call(this,"reduce",r)||this}return t}(a);export{xt as ReduceAggregateCommand};var vt=function(n){e(t,n);function t(r){return n.call(this,"reverseArray",r)||this}return t}(a);export{vt as ReverseArrayAggregateCommand};var pt=function(n){e(t,n);function t(r){return n.call(this,"zip",r)||this}return t}(a);export{pt as ZipAggregateCommand};var yt=function(n){e(t,n);function t(r){return n.call(this,"dateFromString",r)||this}return t}(a);export{yt as DateFromStringAggregateCommand};var St=function(n){e(t,n);function t(r){return n.call(this,"indexOfBytes",r)||this}return t}(a);export{St as IndexOfBytesAggregateCommand};var Ot=function(n){e(t,n);function t(r){return n.call(this,"indexOfCP",r)||this}return t}(a);export{Ot as IndexOfCPAggregateCommand};var Lt=function(n){e(t,n);function t(r){return n.call(this,"strLenBytes",r)||this}return t}(a);export{Lt as StrLenBytesAggregateCommand};var Pt=function(n){e(t,n);function t(r){return n.call(this,"strLenCP",r)||this}return t}(a);export{Pt as StrLenCPAggregateCommand};var Tt=function(n){e(t,n);function t(r){return n.call(this,"strcasecmp",r)||this}return t}(a);export{Tt as StrcasecmpAggregateCommand};var bt=function(n){e(t,n);function t(r){return n.call(this,"substrCP",r)||this}return t}(a);export{bt as SubstrCPAggregateCommand};var It=function(n){e(t,n);function t(r){return n.call(this,"stdDevPop",r)||this}return t}(a);export{It as StdDevPopAggregateCommand};var Mt=function(n){e(t,n);function t(r){return n.call(this,"stdDevSamp",r)||this}return t}(a);export{Mt as StdDevSampAggregateCommand};
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, GeoWinthinParam, GeoNearParam, GeoIntersectsParam } 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, AggregateRangeParam, AggregateFilterParam, AggregateReduceParam, AggregateZipParam, AggregateDateFromStringParam, AggregateStrcasecmpParam, AggregateSubstrCPParam, AggregateIndexOfParam } from '../typing';
import { AggregateCommand, QueryChainCommand, QueryCommand } from './AbstractCommand';
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 { AbsAggregateCommand, AddAggregateCommand, AddToSetAggregateCommand, AndAggregateCommand, ArrayElemAtAggregateCommand, ArrayToObjectAggregateCommand, AvgAggregateCommand, CeilAggregateCommand, CMPAggregateCommand, ConcatAggregateCommand, ConcatArraysAggregateCommand, CondAggregateCommand, CountAggregateCommand, DateFromStringAggregateCommand, DateToStringAggregateCommand, DivideAggregateCommand, EqAggregateCommand, ExpAggregateCommand, FilterAggregateCommand, FirstAggregateCommand, FloorAggregateCommand, GtAggregateCommand, GteAggregateCommand, IfNullAggregateCommand, InAggregateCommand, IndexOfArrayAggregateCommand, IndexOfBytesAggregateCommand, IndexOfCPAggregateCommand, IsArrayAggregateCommand, ISOWeekAggregateCommand, LastAggregateCommand, LetAggregateCommand, LnAggregateCommand, Log10AggregateCommand, LogAggregateCommand, LtAggregateCommand, LteAggregateCommand, MapAggregateCommand, MaxAggregateCommand, MergeObjectsAggregateCommand, MinAggregateCommand, ModAggregateCommand, MonthAggregateCommand, MultiplyAggregateCommand, NeqAggregateCommand, NotAggregateCommand, ObjectToArrayAggregateCommand, OrAggregateCommand, PowAggregateCommand, PushAggregateCommand, RangeAggregateCommand, ReverseArrayAggregateCommand, ReduceAggregateCommand, SizeAggregateCommand, SliceAggregateCommand, SplitAggregateCommand, SqrtAggregateCommand, StdDevPopAggregateCommand, StdDevSampAggregateCommand, StrcasecmpAggregateCommand, StrLenBytesAggregateCommand, StrLenCPAggregateCommand, SubstrAggregateCommand, SubstrBytesAggregateCommand, SubstrCPAggregateCommand, SubtractAggregateCommand, SumAggregateCommand, SwitchAggregateCommand, ToLowerAggregateCommand, ToUpperAggregateCommand, TruncAggregateCommand, WeekAggregateCommand, YearAggregateCommand, ZipAggregateCommand } from './aggregate';
import { AggregatePipeline } from './AggregatePipeline';

@@ -110,2 +110,20 @@ import { ExprCommand } from './query/expr';

isoWeek(value: AggregateDateParam): ISOWeekAggregateCommand;
arrayToObject(value: AggregateArrayExpression[]): ArrayToObjectAggregateCommand;
concatArrays(value: AggregateArrayExpression[]): ConcatArraysAggregateCommand;
filter(value: AggregateFilterParam): FilterAggregateCommand;
objectToArray(value: AggregateDocumentExpression): ObjectToArrayAggregateCommand;
range(val: AggregateRangeParam): RangeAggregateCommand;
range(start: AggregateNumberExpression, end: AggregateNumberExpression, nonZeroStep?: AggregateNumberExpression): RangeAggregateCommand;
reduce(value: AggregateReduceParam): ReduceAggregateCommand;
reverseArray(value: AggregateArrayExpression): ReverseArrayAggregateCommand;
zip(value: AggregateZipParam): ZipAggregateCommand;
dateFromString(value: AggregateDateFromStringParam): DateFromStringAggregateCommand;
indexOfBytes(value: AggregateIndexOfParam): IndexOfBytesAggregateCommand;
indexOfCP(value: AggregateIndexOfParam): IndexOfCPAggregateCommand;
strLenBytes(value: AggregateStringExpression): StrLenBytesAggregateCommand;
strLenCP(value: AggregateStringExpression): StrLenCPAggregateCommand;
strcasecmp(value: AggregateStrcasecmpParam): StrcasecmpAggregateCommand;
substrCP(value: AggregateSubstrCPParam): SubstrCPAggregateCommand;
stdDevPop(value: AggregateExpression): StdDevPopAggregateCommand;
stdDevSamp(value: AggregateExpression): StdDevSampAggregateCommand;
}

@@ -112,0 +130,0 @@ export declare class Command {

@@ -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 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 U,LogAggregateCommand as j,LtAggregateCommand as B,LteAggregateCommand as D,MapAggregateCommand as R,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 Ur}from"./update/pop";import{PullCommand as jr}from"./update/pull";import{PullAllCommand as Br}from"./update/pullAll";import{PushCommand as u}from"./update/push";import{RemoveCommand as Dr}from"./update/remove";import{RenameCommand as Rr}from"./update/rename";import{SetCommand as Qr}from"./update/set";import{GeoIntersectsCommand as Yr,GeoNearCommand as Hr,GeoWithinCommand as Jr}from"./query/geo";import{UnShiftCommand as Kr}from"./update/unshift";import{ShiftCommand as Vr}from"./update/shift";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 B(n)};t.prototype.lte=function(r,e){var n=Array.isArray(r)?r:[r,e];return new D(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 R(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 j(n)};t.prototype.log10=function(r){return new U(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 Xr=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 Ur(r)};t.prototype.pull=function(r){return new jr(r)};t.prototype.pullAll=function(r){return new Br(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 Dr};t.prototype.rename=function(r){return new Rr(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.unshift=function(r){return new Kr(r)};t.prototype.shift=function(){return new Vr};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{Xr 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 c,AddToSetAggregateCommand as d,AndAggregateCommand as A,ArrayElemAtAggregateCommand as w,ArrayToObjectAggregateCommand as C,AvgAggregateCommand as s,CeilAggregateCommand as l,CMPAggregateCommand as v,ConcatAggregateCommand as h,ConcatArraysAggregateCommand as S,CondAggregateCommand as x,CountAggregateCommand as b,DateFromStringAggregateCommand as P,DateToStringAggregateCommand as L,DivideAggregateCommand as M,EqAggregateCommand as O,ExpAggregateCommand as T,FilterAggregateCommand as I,FirstAggregateCommand as q,FloorAggregateCommand as N,GtAggregateCommand as E,GteAggregateCommand as D,IfNullAggregateCommand as F,InAggregateCommand as G,IndexOfArrayAggregateCommand as j,IndexOfBytesAggregateCommand as B,IndexOfCPAggregateCommand as z,IsArrayAggregateCommand as R,ISOWeekAggregateCommand as W,LastAggregateCommand as k,LetAggregateCommand as U,LnAggregateCommand as Q,Log10AggregateCommand as Y,LogAggregateCommand as H,LtAggregateCommand as J,LteAggregateCommand as K,MapAggregateCommand as V,MaxAggregateCommand as X,MergeObjectsAggregateCommand as Z,MinAggregateCommand as $,ModAggregateCommand as _,MonthAggregateCommand as rr,MultiplyAggregateCommand as tr,NeqAggregateCommand as nr,NotAggregateCommand as er,ObjectToArrayAggregateCommand as or,OrAggregateCommand as ar,PowAggregateCommand as mr,PushAggregateCommand as pr,RangeAggregateCommand as ur,ReverseArrayAggregateCommand as gr,ReduceAggregateCommand as ir,SizeAggregateCommand as yr,SliceAggregateCommand as fr,SplitAggregateCommand as cr,SqrtAggregateCommand as dr,StdDevPopAggregateCommand as Ar,StdDevSampAggregateCommand as wr,StrcasecmpAggregateCommand as Cr,StrLenBytesAggregateCommand as sr,StrLenCPAggregateCommand as lr,SubstrAggregateCommand as vr,SubstrBytesAggregateCommand as hr,SubstrCPAggregateCommand as Sr,SubtractAggregateCommand as xr,SumAggregateCommand as br,SwitchAggregateCommand as Pr,ToLowerAggregateCommand as Lr,ToUpperAggregateCommand as Mr,TruncAggregateCommand as Or,WeekAggregateCommand as Tr,YearAggregateCommand as Ir,ZipAggregateCommand as qr}from"./aggregate";import{AggregatePipeline as Nr}from"./AggregatePipeline";import{AllCommand as Er}from"./query/all";import{AndCommand as Dr,NorCommand as Fr,NotCommand as Gr,OrCommand as jr}from"./query/logic";import{ElemMatchCommand as Br}from"./query/elemMatch";import{EqCommand as zr}from"./query/eq";import{ExistsCommand as Rr}from"./query/exists";import{ExprCommand as Wr}from"./query/expr";import{GtCommand as kr}from"./query/gt";import{GteCommand as Ur}from"./query/gte";import{InCommand as Qr}from"./query/in";import{LtCommand as Yr}from"./query/lt";import{LteCommand as Hr}from"./query/lte";import{ModCommand as Jr}from"./query/mod";import{NeqCommand as Kr}from"./query/neq";import{NinCommand as Vr}from"./query/nin";import{QueryChain as o}from"./query/QueryChain";import{SizeCommand as Xr}from"./query/size";import{AddToSetCommand as Zr}from"./update/addToSet";import{IncCommand as $r}from"./update/inc";import{MaxCommand as _r}from"./update/max";import{MinCommand as rt}from"./update/min";import{MulCommand as tt}from"./update/mul";import{PopCommand as nt}from"./update/pop";import{PullCommand as et}from"./update/pull";import{PullAllCommand as ot}from"./update/pullAll";import{PushCommand as u}from"./update/push";import{RemoveCommand as at}from"./update/remove";import{RenameCommand as mt}from"./update/rename";import{SetCommand as pt}from"./update/set";import{GeoIntersectsCommand as ut,GeoNearCommand as gt,GeoWithinCommand as it}from"./query/geo";import{UnShiftCommand as yt}from"./update/unshift";import{ShiftCommand as ft}from"./update/shift";var g=function(){function t(){}t.prototype.pipeline=function(){return new Nr};t.prototype.avg=function(r){return new s(r)};t.prototype.count=function(){return new b};t.prototype.max=function(r){return new X(r)};t.prototype.min=function(r){return new $(r)};t.prototype.sum=function(r){return new br(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 A(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 ar(a)};t.prototype.not=function(r){return new er(r)};t.prototype.cmp=function(r,e){var n=Array.isArray(r)?r:[r,e];return new v(n)};t.prototype.eq=function(r,e){var n=Array.isArray(r)?r:[r,e];return new O(n)};t.prototype.neq=function(r,e){var n=Array.isArray(r)?r:[r,e];return new nr(n)};t.prototype.lt=function(r,e){var n=Array.isArray(r)?r:[r,e];return new J(n)};t.prototype.lte=function(r,e){var n=Array.isArray(r)?r:[r,e];return new K(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 D(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 j(m)};t.prototype.isArray=function(r){return new R(r)};t.prototype.size=function(r){return new yr(r)};t.prototype.in=function(r,e){var n=Array.isArray(r)?r:[r,e];return new G(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 fr(a)};t.prototype.map=function(r){return new V(r)};t.prototype.ifNull=function(r,e){var n=Array.isArray(r)?r:[r,e];return new F(n)};t.prototype.cond=function(r){return new x(r)};t.prototype.switch=function(r){return new Pr(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 h(a)};t.prototype.dateToString=function(r){return new L(r)};t.prototype.toLower=function(r){return new Lr(r)};t.prototype.toUpper=function(r){return new Mr(r)};t.prototype.split=function(r,e){var n=Array.isArray(r)?r:[r,e];return new cr(n)};t.prototype.substr=function(r,e,n){var a=Array.isArray(r)?r:[r,e,n];return new vr(a)};t.prototype.substrBytes=function(r,e,n){var a=Array.isArray(r)?r:[r,e,n];return new hr(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 pr(r)};t.prototype.let=function(r){return new U(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 c(a)};t.prototype.subtract=function(r,e){var n=Array.isArray(r)?r:[r,e];return new xr(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 tr(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 l(r)};t.prototype.exp=function(r){return new T(r)};t.prototype.floor=function(r){return new N(r)};t.prototype.ln=function(r){return new Q(r)};t.prototype.log=function(r,e){var n=Array.isArray(r)?r:[r,e];return new H(n)};t.prototype.log10=function(r){return new Y(r)};t.prototype.mod=function(r,e){var n=Array.isArray(r)?r:[r,e];return new _(n)};t.prototype.pow=function(r,e){var n=Array.isArray(r)?r:[r,e];return new mr(n)};t.prototype.sqrt=function(r){return new dr(r)};t.prototype.trunc=function(r){return new Or(r)};t.prototype.mergeObjects=function(r){return new Z(r)};t.prototype.month=function(r){return new rr(r)};t.prototype.year=function(r){return new Ir(r)};t.prototype.week=function(r){return new Tr(r)};t.prototype.isoWeek=function(r){return new W(r)};t.prototype.arrayToObject=function(r){return new C(r)};t.prototype.concatArrays=function(r){return new S(r)};t.prototype.filter=function(r){return new I(r)};t.prototype.objectToArray=function(r){return new or(r)};t.prototype.range=function(r,e,n){var a=Array.isArray(r)?r:typeof n!=="undefined"?[r,e,n]:[r,e];return new ur(a)};t.prototype.reduce=function(r){return new ir(r)};t.prototype.reverseArray=function(r){return new gr(r)};t.prototype.zip=function(r){return new qr(r)};t.prototype.dateFromString=function(r){return new P(r)};t.prototype.indexOfBytes=function(r){return new B(r)};t.prototype.indexOfCP=function(r){return new z(r)};t.prototype.strLenBytes=function(r){return new sr(r)};t.prototype.strLenCP=function(r){return new lr(r)};t.prototype.strcasecmp=function(r){return new Cr(r)};t.prototype.substrCP=function(r){return new Sr(r)};t.prototype.stdDevPop=function(r){return new Ar(r)};t.prototype.stdDevSamp=function(r){return new wr(r)};return t}();export{g as AggregateCommandFactory};var ct=function(){function t(){this.aggregate=new g;this.Sort=y}t.prototype.addToSet=function(r){return new Zr(r)};t.prototype.inc=function(r){return new $r(r)};t.prototype.max=function(r){return new _r(r)};t.prototype.min=function(r){return new rt(r)};t.prototype.mul=function(r){return new tt(r)};t.prototype.pop=function(r){return new nt(r)};t.prototype.pull=function(r){return new et(r)};t.prototype.pullAll=function(r){return new ot(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 at};t.prototype.rename=function(r){return new mt(r)};t.prototype.set=function(r){return new pt(r)};t.prototype.expr=function(r){return new Wr(r)};t.prototype.geoWithin=function(r){return new it(r)};t.prototype.geoNear=function(r){return new gt(r)};t.prototype.geoIntersects=function(r){return new ut(r)};t.prototype.unshift=function(r){return new yt(r)};t.prototype.shift=function(){return new ft};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 Dr(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 jr(r.map(o.unchain));return new o(n)};t.prototype.not=function(r){var e=new Gr(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 Fr(r.map(o.unchain));return new o(n)};t.prototype.eq=function(r){return new o(new zr(r))};t.prototype.neq=function(r){return new o(new Kr(r))};t.prototype.lt=function(r){return new o(new Yr(r))};t.prototype.lte=function(r){return new o(new Hr(r))};t.prototype.gt=function(r){return new o(new kr(r))};t.prototype.gte=function(r){return new o(new Ur(r))};t.prototype.in=function(r){return new o(new Qr(r))};t.prototype.nin=function(r){return new o(new Vr(r))};t.prototype.exists=function(r){return new o(new Rr(r))};t.prototype.mod=function(r,e){return new o(new Jr(r,e))};t.prototype.all=function(r){return new o(new Er(r))};t.prototype.elemMatch=function(r){return new o(new Br(o.unchain(r)))};t.prototype.size=function(r){return new o(new Xr(r))};return t}();export{ct as Command};

@@ -177,1 +177,27 @@ import { AggregateCommand } from './command/AbstractCommand';

}
export interface AggregateFilterParam {
input: AggregateArrayExpression;
cond: AggregateBooleanExpression;
as?: string;
}
export interface AggregateReduceParam {
input: AggregateArrayExpression;
initialValue: AggregateExpression;
in: AggregateExpression;
}
export type AggregateRangeParam = [AggregateNumberExpression, AggregateNumberExpression, AggregateNumberExpression?];
export interface AggregateZipParam {
inputs: AggregateArrayExpression[];
useLongestLength?: boolean;
defaults?: any[];
}
export interface AggregateDateFromStringParam {
dateString: string;
format?: string;
timezone?: string;
onError?: AggregateExpression;
onNull?: AggregateExpression;
}
export type AggregateIndexOfParam = [AggregateStringExpression, AggregateStringExpression, AggregateNumberExpression?, AggregateNumberExpression?];
export type AggregateStrcasecmpParam = [AggregateStringExpression, AggregateStringExpression];
export type AggregateSubstrCPParam = [AggregateStringExpression, AggregateNumberExpression, AggregateNumberExpression];

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

import { AggregateArrayExpression, AggregateDateParam, AggregateDocumentExpression, AggregateExpression, AggregateExpressionPair, AggregateExpressionRecord, AggregateNumberExpression, AggregateNumberExpressionPair, AggregateStringExpression, AggregateStringExpressionPair, CondCommandParam, DateToStringCommandParam, IndexOfArrayCommandParam, LetCommandParam, MapParam, SliceCommandParam, SubstrBytesCommandParam, SubstrCommandParam, SubtractCommandParam, SwitchCommandParam } from '../typing';
import { AggregateArrayExpression, AggregateDateFromStringParam, AggregateDateParam, AggregateDocumentExpression, AggregateExpression, AggregateExpressionPair, AggregateExpressionRecord, AggregateFilterParam, AggregateIndexOfParam, AggregateNumberExpression, AggregateNumberExpressionPair, AggregateRangeParam, AggregateReduceParam, AggregateStrcasecmpParam, AggregateStringExpression, AggregateStringExpressionPair, AggregateZipParam, AggregateSubstrCPParam, CondCommandParam, DateToStringCommandParam, IndexOfArrayCommandParam, LetCommandParam, MapParam, SliceCommandParam, SubstrBytesCommandParam, SubstrCommandParam, SubtractCommandParam, SwitchCommandParam } from '../typing';
import { AggregateCommand } from './AbstractCommand';

@@ -178,1 +178,52 @@ export declare class AggregateCommandImpl<T> extends AggregateCommand {

}
export declare class ArrayToObjectAggregateCommand extends AggregateCommandImpl<AggregateArrayExpression[]> {
constructor(value: AggregateArrayExpression[]);
}
export declare class ConcatArraysAggregateCommand extends AggregateCommandImpl<AggregateArrayExpression[]> {
constructor(value: AggregateArrayExpression[]);
}
export declare class FilterAggregateCommand extends AggregateCommandImpl<AggregateFilterParam> {
constructor(value: AggregateFilterParam);
}
export declare class ObjectToArrayAggregateCommand extends AggregateCommandImpl<AggregateDocumentExpression> {
constructor(value: AggregateDocumentExpression);
}
export declare class RangeAggregateCommand extends AggregateCommandImpl<AggregateRangeParam> {
constructor(value: AggregateRangeParam);
}
export declare class ReduceAggregateCommand extends AggregateCommandImpl<AggregateReduceParam> {
constructor(value: AggregateReduceParam);
}
export declare class ReverseArrayAggregateCommand extends AggregateCommandImpl<AggregateArrayExpression> {
constructor(value: AggregateArrayExpression);
}
export declare class ZipAggregateCommand extends AggregateCommandImpl<AggregateZipParam> {
constructor(value: AggregateZipParam);
}
export declare class DateFromStringAggregateCommand extends AggregateCommandImpl<AggregateDateFromStringParam> {
constructor(value: AggregateDateFromStringParam);
}
export declare class IndexOfBytesAggregateCommand extends AggregateCommandImpl<AggregateIndexOfParam> {
constructor(value: AggregateIndexOfParam);
}
export declare class IndexOfCPAggregateCommand extends AggregateCommandImpl<AggregateIndexOfParam> {
constructor(value: AggregateIndexOfParam);
}
export declare class StrLenBytesAggregateCommand extends AggregateCommandImpl<AggregateStringExpression> {
constructor(value: AggregateStringExpression);
}
export declare class StrLenCPAggregateCommand extends AggregateCommandImpl<AggregateStringExpression> {
constructor(value: AggregateStringExpression);
}
export declare class StrcasecmpAggregateCommand extends AggregateCommandImpl<AggregateStrcasecmpParam> {
constructor(value: AggregateStrcasecmpParam);
}
export declare class SubstrCPAggregateCommand extends AggregateCommandImpl<AggregateSubstrCPParam> {
constructor(value: AggregateSubstrCPParam);
}
export declare class StdDevPopAggregateCommand extends AggregateCommandImpl<AggregateExpression> {
constructor(value: AggregateExpression);
}
export declare class StdDevSampAggregateCommand extends AggregateCommandImpl<AggregateExpression> {
constructor(value: AggregateExpression);
}

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

"use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,n){g.__proto__=n}||function(g,n){for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a))g[a]=n[a]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function g(){this.constructor=t}t.prototype=r===null?Object.create(r):(g.prototype=r.prototype,new g)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.SubstrBytesAggregateCommand=exports.SubstrAggregateCommand=exports.SqrtAggregateCommand=exports.SplitAggregateCommand=exports.SliceAggregateCommand=exports.SizeAggregateCommand=exports.PushAggregateCommand=exports.PowAggregateCommand=exports.OrAggregateCommand=exports.NotAggregateCommand=exports.NeqAggregateCommand=exports.MultiplyAggregateCommand=exports.MonthAggregateCommand=exports.ModAggregateCommand=exports.MinAggregateCommand=exports.MergeObjectsAggregateCommand=exports.MaxAggregateCommand=exports.MapAggregateCommand=exports.LteAggregateCommand=exports.LtAggregateCommand=exports.Log10AggregateCommand=exports.LogAggregateCommand=exports.LnAggregateCommand=exports.LetAggregateCommand=exports.LastAggregateCommand=exports.ISOWeekAggregateCommand=exports.IsArrayAggregateCommand=exports.IndexOfArrayAggregateCommand=exports.InAggregateCommand=exports.IfNullAggregateCommand=exports.GteAggregateCommand=exports.GtAggregateCommand=exports.FloorAggregateCommand=exports.FirstAggregateCommand=exports.ExpAggregateCommand=exports.EqAggregateCommand=exports.DivideAggregateCommand=exports.DateToStringAggregateCommand=exports.CountAggregateCommand=exports.CondAggregateCommand=exports.ConcatAggregateCommand=exports.CMPAggregateCommand=exports.CeilAggregateCommand=exports.AvgAggregateCommand=exports.ArrayElemAtAggregateCommand=exports.AndAggregateCommand=exports.AddToSetAggregateCommand=exports.AddAggregateCommand=exports.AbsAggregateCommand=exports.AggregateCommandImpl=void 0;exports.YearAggregateCommand=exports.WeekAggregateCommand=exports.TruncAggregateCommand=exports.ToUpperAggregateCommand=exports.ToLowerAggregateCommand=exports.SwitchAggregateCommand=exports.SumAggregateCommand=exports.SubtractAggregateCommand=void 0;var AbstractCommand_1=require("./AbstractCommand");var AggregateRequest_1=require("./AggregateRequest");var AggregateCommandImpl=function(e){__extends(t,e);function t(r,g){return e.call(this,r,new AggregateRequest_1.AggregateRequest(g).toJSON())||this}return t}(AbstractCommand_1.AggregateCommand);exports.AggregateCommandImpl=AggregateCommandImpl;var AbsAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"abs",r)||this}return t}(AggregateCommandImpl);exports.AbsAggregateCommand=AbsAggregateCommand;var AddAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"add",r)||this}return t}(AggregateCommandImpl);exports.AddAggregateCommand=AddAggregateCommand;var AddToSetAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"addToSet",r)||this}return t}(AggregateCommandImpl);exports.AddToSetAggregateCommand=AddToSetAggregateCommand;var AndAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"and",r)||this}return t}(AggregateCommandImpl);exports.AndAggregateCommand=AndAggregateCommand;var ArrayElemAtAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"arrayElemAt",r)||this}return t}(AggregateCommandImpl);exports.ArrayElemAtAggregateCommand=ArrayElemAtAggregateCommand;var AvgAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"avg",r)||this}return t}(AggregateCommandImpl);exports.AvgAggregateCommand=AvgAggregateCommand;var CeilAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"ceil",r)||this}return t}(AggregateCommandImpl);exports.CeilAggregateCommand=CeilAggregateCommand;var CMPAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"cmp",r)||this}return t}(AggregateCommandImpl);exports.CMPAggregateCommand=CMPAggregateCommand;var ConcatAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"concat",r)||this}return t}(AggregateCommandImpl);exports.ConcatAggregateCommand=ConcatAggregateCommand;var CondAggregateCommand=function(e){__extends(t,e);function t(r){var g=Array.isArray(r)?{if:r[0],then:r[1],else:r[2]}:r;return e.call(this,"cond",g)||this}return t}(AggregateCommandImpl);exports.CondAggregateCommand=CondAggregateCommand;var CountAggregateCommand=function(e){__extends(t,e);function t(){return e.call(this,"count",{})||this}t.prototype.stringify=function(){return{$sum:1}};return t}(AggregateCommandImpl);exports.CountAggregateCommand=CountAggregateCommand;var DateToStringAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"dateToString",r)||this}return t}(AggregateCommandImpl);exports.DateToStringAggregateCommand=DateToStringAggregateCommand;var DivideAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"divide",r)||this}return t}(AggregateCommandImpl);exports.DivideAggregateCommand=DivideAggregateCommand;var EqAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"eq",r)||this}return t}(AggregateCommandImpl);exports.EqAggregateCommand=EqAggregateCommand;var ExpAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"exp",r)||this}return t}(AggregateCommandImpl);exports.ExpAggregateCommand=ExpAggregateCommand;var FirstAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"first",r)||this}return t}(AggregateCommandImpl);exports.FirstAggregateCommand=FirstAggregateCommand;var FloorAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"floor",r)||this}return t}(AggregateCommandImpl);exports.FloorAggregateCommand=FloorAggregateCommand;var GtAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"gt",r)||this}return t}(AggregateCommandImpl);exports.GtAggregateCommand=GtAggregateCommand;var GteAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"gte",r)||this}return t}(AggregateCommandImpl);exports.GteAggregateCommand=GteAggregateCommand;var IfNullAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"ifNull",r)||this}return t}(AggregateCommandImpl);exports.IfNullAggregateCommand=IfNullAggregateCommand;var InAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"in",r)||this}return t}(AggregateCommandImpl);exports.InAggregateCommand=InAggregateCommand;var IndexOfArrayAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"indexOfArray",r)||this}return t}(AggregateCommandImpl);exports.IndexOfArrayAggregateCommand=IndexOfArrayAggregateCommand;var IsArrayAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"isArray",r)||this}return t}(AggregateCommandImpl);exports.IsArrayAggregateCommand=IsArrayAggregateCommand;var ISOWeekAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"isoWeek",r)||this}return t}(AggregateCommandImpl);exports.ISOWeekAggregateCommand=ISOWeekAggregateCommand;var LastAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"last",r)||this}return t}(AggregateCommandImpl);exports.LastAggregateCommand=LastAggregateCommand;var LetAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"let",r)||this}return t}(AggregateCommandImpl);exports.LetAggregateCommand=LetAggregateCommand;var LnAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"ln",r)||this}return t}(AggregateCommandImpl);exports.LnAggregateCommand=LnAggregateCommand;var LogAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"log",r)||this}return t}(AggregateCommandImpl);exports.LogAggregateCommand=LogAggregateCommand;var Log10AggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"log10",r)||this}return t}(AggregateCommandImpl);exports.Log10AggregateCommand=Log10AggregateCommand;var LtAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"lt",r)||this}return t}(AggregateCommandImpl);exports.LtAggregateCommand=LtAggregateCommand;var LteAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"lte",r)||this}return t}(AggregateCommandImpl);exports.LteAggregateCommand=LteAggregateCommand;var MapAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"map",r)||this}return t}(AggregateCommandImpl);exports.MapAggregateCommand=MapAggregateCommand;var MaxAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"max",r)||this}return t}(AggregateCommandImpl);exports.MaxAggregateCommand=MaxAggregateCommand;var MergeObjectsAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"mergeObjects",r)||this}return t}(AggregateCommandImpl);exports.MergeObjectsAggregateCommand=MergeObjectsAggregateCommand;var MinAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"min",r)||this}return t}(AggregateCommandImpl);exports.MinAggregateCommand=MinAggregateCommand;var ModAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"mod",r)||this}return t}(AggregateCommandImpl);exports.ModAggregateCommand=ModAggregateCommand;var MonthAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"month",r)||this}return t}(AggregateCommandImpl);exports.MonthAggregateCommand=MonthAggregateCommand;var MultiplyAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"multiply",r)||this}return t}(AggregateCommandImpl);exports.MultiplyAggregateCommand=MultiplyAggregateCommand;var NeqAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"ne",r)||this}return t}(AggregateCommandImpl);exports.NeqAggregateCommand=NeqAggregateCommand;var NotAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"not",[r])||this}return t}(AggregateCommandImpl);exports.NotAggregateCommand=NotAggregateCommand;var OrAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"or",r)||this}return t}(AggregateCommandImpl);exports.OrAggregateCommand=OrAggregateCommand;var PowAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"pow",r)||this}return t}(AggregateCommandImpl);exports.PowAggregateCommand=PowAggregateCommand;var PushAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"push",r)||this}return t}(AggregateCommandImpl);exports.PushAggregateCommand=PushAggregateCommand;var SizeAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"size",r)||this}return t}(AggregateCommandImpl);exports.SizeAggregateCommand=SizeAggregateCommand;var SliceAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"slice",r)||this}return t}(AggregateCommandImpl);exports.SliceAggregateCommand=SliceAggregateCommand;var SplitAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"split",r)||this}return t}(AggregateCommandImpl);exports.SplitAggregateCommand=SplitAggregateCommand;var SqrtAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"sqrt",r)||this}return t}(AggregateCommandImpl);exports.SqrtAggregateCommand=SqrtAggregateCommand;var SubstrAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"substr",r)||this}return t}(AggregateCommandImpl);exports.SubstrAggregateCommand=SubstrAggregateCommand;var SubstrBytesAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"substrBytes",r)||this}return t}(AggregateCommandImpl);exports.SubstrBytesAggregateCommand=SubstrBytesAggregateCommand;var SubtractAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"subtract",r)||this}return t}(AggregateCommandImpl);exports.SubtractAggregateCommand=SubtractAggregateCommand;var SumAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"sum",r)||this}return t}(AggregateCommandImpl);exports.SumAggregateCommand=SumAggregateCommand;var SwitchAggregateCommand=function(e){__extends(t,e);function t(r){var g=r.branches.map(function(n){if(Array.isArray(n)){return{case:n[0],then:n[1]}}return{case:n.case,then:n.then}});return e.call(this,"switch",{branches:g,default:r.default})||this}return t}(AggregateCommandImpl);exports.SwitchAggregateCommand=SwitchAggregateCommand;var ToLowerAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"toLower",r)||this}return t}(AggregateCommandImpl);exports.ToLowerAggregateCommand=ToLowerAggregateCommand;var ToUpperAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"toUpper",r)||this}return t}(AggregateCommandImpl);exports.ToUpperAggregateCommand=ToUpperAggregateCommand;var TruncAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"trunc",r)||this}return t}(AggregateCommandImpl);exports.TruncAggregateCommand=TruncAggregateCommand;var WeekAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"week",r)||this}return t}(AggregateCommandImpl);exports.WeekAggregateCommand=WeekAggregateCommand;var YearAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"year",r)||this}return t}(AggregateCommandImpl);exports.YearAggregateCommand=YearAggregateCommand;
"use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,n){g.__proto__=n}||function(g,n){for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a))g[a]=n[a]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function g(){this.constructor=t}t.prototype=r===null?Object.create(r):(g.prototype=r.prototype,new g)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.SubstrBytesAggregateCommand=exports.SubstrAggregateCommand=exports.SqrtAggregateCommand=exports.SplitAggregateCommand=exports.SliceAggregateCommand=exports.SizeAggregateCommand=exports.PushAggregateCommand=exports.PowAggregateCommand=exports.OrAggregateCommand=exports.NotAggregateCommand=exports.NeqAggregateCommand=exports.MultiplyAggregateCommand=exports.MonthAggregateCommand=exports.ModAggregateCommand=exports.MinAggregateCommand=exports.MergeObjectsAggregateCommand=exports.MaxAggregateCommand=exports.MapAggregateCommand=exports.LteAggregateCommand=exports.LtAggregateCommand=exports.Log10AggregateCommand=exports.LogAggregateCommand=exports.LnAggregateCommand=exports.LetAggregateCommand=exports.LastAggregateCommand=exports.ISOWeekAggregateCommand=exports.IsArrayAggregateCommand=exports.IndexOfArrayAggregateCommand=exports.InAggregateCommand=exports.IfNullAggregateCommand=exports.GteAggregateCommand=exports.GtAggregateCommand=exports.FloorAggregateCommand=exports.FirstAggregateCommand=exports.ExpAggregateCommand=exports.EqAggregateCommand=exports.DivideAggregateCommand=exports.DateToStringAggregateCommand=exports.CountAggregateCommand=exports.CondAggregateCommand=exports.ConcatAggregateCommand=exports.CMPAggregateCommand=exports.CeilAggregateCommand=exports.AvgAggregateCommand=exports.ArrayElemAtAggregateCommand=exports.AndAggregateCommand=exports.AddToSetAggregateCommand=exports.AddAggregateCommand=exports.AbsAggregateCommand=exports.AggregateCommandImpl=void 0;exports.StdDevSampAggregateCommand=exports.StdDevPopAggregateCommand=exports.SubstrCPAggregateCommand=exports.StrcasecmpAggregateCommand=exports.StrLenCPAggregateCommand=exports.StrLenBytesAggregateCommand=exports.IndexOfCPAggregateCommand=exports.IndexOfBytesAggregateCommand=exports.DateFromStringAggregateCommand=exports.ZipAggregateCommand=exports.ReverseArrayAggregateCommand=exports.ReduceAggregateCommand=exports.RangeAggregateCommand=exports.ObjectToArrayAggregateCommand=exports.FilterAggregateCommand=exports.ConcatArraysAggregateCommand=exports.ArrayToObjectAggregateCommand=exports.YearAggregateCommand=exports.WeekAggregateCommand=exports.TruncAggregateCommand=exports.ToUpperAggregateCommand=exports.ToLowerAggregateCommand=exports.SwitchAggregateCommand=exports.SumAggregateCommand=exports.SubtractAggregateCommand=void 0;var AbstractCommand_1=require("./AbstractCommand");var AggregateRequest_1=require("./AggregateRequest");var AggregateCommandImpl=function(e){__extends(t,e);function t(r,g){return e.call(this,r,new AggregateRequest_1.AggregateRequest(g).toJSON())||this}return t}(AbstractCommand_1.AggregateCommand);exports.AggregateCommandImpl=AggregateCommandImpl;var AbsAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"abs",r)||this}return t}(AggregateCommandImpl);exports.AbsAggregateCommand=AbsAggregateCommand;var AddAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"add",r)||this}return t}(AggregateCommandImpl);exports.AddAggregateCommand=AddAggregateCommand;var AddToSetAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"addToSet",r)||this}return t}(AggregateCommandImpl);exports.AddToSetAggregateCommand=AddToSetAggregateCommand;var AndAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"and",r)||this}return t}(AggregateCommandImpl);exports.AndAggregateCommand=AndAggregateCommand;var ArrayElemAtAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"arrayElemAt",r)||this}return t}(AggregateCommandImpl);exports.ArrayElemAtAggregateCommand=ArrayElemAtAggregateCommand;var AvgAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"avg",r)||this}return t}(AggregateCommandImpl);exports.AvgAggregateCommand=AvgAggregateCommand;var CeilAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"ceil",r)||this}return t}(AggregateCommandImpl);exports.CeilAggregateCommand=CeilAggregateCommand;var CMPAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"cmp",r)||this}return t}(AggregateCommandImpl);exports.CMPAggregateCommand=CMPAggregateCommand;var ConcatAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"concat",r)||this}return t}(AggregateCommandImpl);exports.ConcatAggregateCommand=ConcatAggregateCommand;var CondAggregateCommand=function(e){__extends(t,e);function t(r){var g=Array.isArray(r)?{if:r[0],then:r[1],else:r[2]}:r;return e.call(this,"cond",g)||this}return t}(AggregateCommandImpl);exports.CondAggregateCommand=CondAggregateCommand;var CountAggregateCommand=function(e){__extends(t,e);function t(){return e.call(this,"count",{})||this}t.prototype.stringify=function(){return{$sum:1}};return t}(AggregateCommandImpl);exports.CountAggregateCommand=CountAggregateCommand;var DateToStringAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"dateToString",r)||this}return t}(AggregateCommandImpl);exports.DateToStringAggregateCommand=DateToStringAggregateCommand;var DivideAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"divide",r)||this}return t}(AggregateCommandImpl);exports.DivideAggregateCommand=DivideAggregateCommand;var EqAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"eq",r)||this}return t}(AggregateCommandImpl);exports.EqAggregateCommand=EqAggregateCommand;var ExpAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"exp",r)||this}return t}(AggregateCommandImpl);exports.ExpAggregateCommand=ExpAggregateCommand;var FirstAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"first",r)||this}return t}(AggregateCommandImpl);exports.FirstAggregateCommand=FirstAggregateCommand;var FloorAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"floor",r)||this}return t}(AggregateCommandImpl);exports.FloorAggregateCommand=FloorAggregateCommand;var GtAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"gt",r)||this}return t}(AggregateCommandImpl);exports.GtAggregateCommand=GtAggregateCommand;var GteAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"gte",r)||this}return t}(AggregateCommandImpl);exports.GteAggregateCommand=GteAggregateCommand;var IfNullAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"ifNull",r)||this}return t}(AggregateCommandImpl);exports.IfNullAggregateCommand=IfNullAggregateCommand;var InAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"in",r)||this}return t}(AggregateCommandImpl);exports.InAggregateCommand=InAggregateCommand;var IndexOfArrayAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"indexOfArray",r)||this}return t}(AggregateCommandImpl);exports.IndexOfArrayAggregateCommand=IndexOfArrayAggregateCommand;var IsArrayAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"isArray",r)||this}return t}(AggregateCommandImpl);exports.IsArrayAggregateCommand=IsArrayAggregateCommand;var ISOWeekAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"isoWeek",r)||this}return t}(AggregateCommandImpl);exports.ISOWeekAggregateCommand=ISOWeekAggregateCommand;var LastAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"last",r)||this}return t}(AggregateCommandImpl);exports.LastAggregateCommand=LastAggregateCommand;var LetAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"let",r)||this}return t}(AggregateCommandImpl);exports.LetAggregateCommand=LetAggregateCommand;var LnAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"ln",r)||this}return t}(AggregateCommandImpl);exports.LnAggregateCommand=LnAggregateCommand;var LogAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"log",r)||this}return t}(AggregateCommandImpl);exports.LogAggregateCommand=LogAggregateCommand;var Log10AggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"log10",r)||this}return t}(AggregateCommandImpl);exports.Log10AggregateCommand=Log10AggregateCommand;var LtAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"lt",r)||this}return t}(AggregateCommandImpl);exports.LtAggregateCommand=LtAggregateCommand;var LteAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"lte",r)||this}return t}(AggregateCommandImpl);exports.LteAggregateCommand=LteAggregateCommand;var MapAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"map",r)||this}return t}(AggregateCommandImpl);exports.MapAggregateCommand=MapAggregateCommand;var MaxAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"max",r)||this}return t}(AggregateCommandImpl);exports.MaxAggregateCommand=MaxAggregateCommand;var MergeObjectsAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"mergeObjects",r)||this}return t}(AggregateCommandImpl);exports.MergeObjectsAggregateCommand=MergeObjectsAggregateCommand;var MinAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"min",r)||this}return t}(AggregateCommandImpl);exports.MinAggregateCommand=MinAggregateCommand;var ModAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"mod",r)||this}return t}(AggregateCommandImpl);exports.ModAggregateCommand=ModAggregateCommand;var MonthAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"month",r)||this}return t}(AggregateCommandImpl);exports.MonthAggregateCommand=MonthAggregateCommand;var MultiplyAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"multiply",r)||this}return t}(AggregateCommandImpl);exports.MultiplyAggregateCommand=MultiplyAggregateCommand;var NeqAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"ne",r)||this}return t}(AggregateCommandImpl);exports.NeqAggregateCommand=NeqAggregateCommand;var NotAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"not",[r])||this}return t}(AggregateCommandImpl);exports.NotAggregateCommand=NotAggregateCommand;var OrAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"or",r)||this}return t}(AggregateCommandImpl);exports.OrAggregateCommand=OrAggregateCommand;var PowAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"pow",r)||this}return t}(AggregateCommandImpl);exports.PowAggregateCommand=PowAggregateCommand;var PushAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"push",r)||this}return t}(AggregateCommandImpl);exports.PushAggregateCommand=PushAggregateCommand;var SizeAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"size",r)||this}return t}(AggregateCommandImpl);exports.SizeAggregateCommand=SizeAggregateCommand;var SliceAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"slice",r)||this}return t}(AggregateCommandImpl);exports.SliceAggregateCommand=SliceAggregateCommand;var SplitAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"split",r)||this}return t}(AggregateCommandImpl);exports.SplitAggregateCommand=SplitAggregateCommand;var SqrtAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"sqrt",r)||this}return t}(AggregateCommandImpl);exports.SqrtAggregateCommand=SqrtAggregateCommand;var SubstrAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"substr",r)||this}return t}(AggregateCommandImpl);exports.SubstrAggregateCommand=SubstrAggregateCommand;var SubstrBytesAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"substrBytes",r)||this}return t}(AggregateCommandImpl);exports.SubstrBytesAggregateCommand=SubstrBytesAggregateCommand;var SubtractAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"subtract",r)||this}return t}(AggregateCommandImpl);exports.SubtractAggregateCommand=SubtractAggregateCommand;var SumAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"sum",r)||this}return t}(AggregateCommandImpl);exports.SumAggregateCommand=SumAggregateCommand;var SwitchAggregateCommand=function(e){__extends(t,e);function t(r){var g=r.branches.map(function(n){if(Array.isArray(n)){return{case:n[0],then:n[1]}}return{case:n.case,then:n.then}});return e.call(this,"switch",{branches:g,default:r.default})||this}return t}(AggregateCommandImpl);exports.SwitchAggregateCommand=SwitchAggregateCommand;var ToLowerAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"toLower",r)||this}return t}(AggregateCommandImpl);exports.ToLowerAggregateCommand=ToLowerAggregateCommand;var ToUpperAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"toUpper",r)||this}return t}(AggregateCommandImpl);exports.ToUpperAggregateCommand=ToUpperAggregateCommand;var TruncAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"trunc",r)||this}return t}(AggregateCommandImpl);exports.TruncAggregateCommand=TruncAggregateCommand;var WeekAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"week",r)||this}return t}(AggregateCommandImpl);exports.WeekAggregateCommand=WeekAggregateCommand;var YearAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"year",r)||this}return t}(AggregateCommandImpl);exports.YearAggregateCommand=YearAggregateCommand;var ArrayToObjectAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"arrayToObject",r)||this}return t}(AggregateCommandImpl);exports.ArrayToObjectAggregateCommand=ArrayToObjectAggregateCommand;var ConcatArraysAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"concatArrays",r)||this}return t}(AggregateCommandImpl);exports.ConcatArraysAggregateCommand=ConcatArraysAggregateCommand;var FilterAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"filter",r)||this}return t}(AggregateCommandImpl);exports.FilterAggregateCommand=FilterAggregateCommand;var ObjectToArrayAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"objectToArray",r)||this}return t}(AggregateCommandImpl);exports.ObjectToArrayAggregateCommand=ObjectToArrayAggregateCommand;var RangeAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"range",r)||this}return t}(AggregateCommandImpl);exports.RangeAggregateCommand=RangeAggregateCommand;var ReduceAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"reduce",r)||this}return t}(AggregateCommandImpl);exports.ReduceAggregateCommand=ReduceAggregateCommand;var ReverseArrayAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"reverseArray",r)||this}return t}(AggregateCommandImpl);exports.ReverseArrayAggregateCommand=ReverseArrayAggregateCommand;var ZipAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"zip",r)||this}return t}(AggregateCommandImpl);exports.ZipAggregateCommand=ZipAggregateCommand;var DateFromStringAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"dateFromString",r)||this}return t}(AggregateCommandImpl);exports.DateFromStringAggregateCommand=DateFromStringAggregateCommand;var IndexOfBytesAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"indexOfBytes",r)||this}return t}(AggregateCommandImpl);exports.IndexOfBytesAggregateCommand=IndexOfBytesAggregateCommand;var IndexOfCPAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"indexOfCP",r)||this}return t}(AggregateCommandImpl);exports.IndexOfCPAggregateCommand=IndexOfCPAggregateCommand;var StrLenBytesAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"strLenBytes",r)||this}return t}(AggregateCommandImpl);exports.StrLenBytesAggregateCommand=StrLenBytesAggregateCommand;var StrLenCPAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"strLenCP",r)||this}return t}(AggregateCommandImpl);exports.StrLenCPAggregateCommand=StrLenCPAggregateCommand;var StrcasecmpAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"strcasecmp",r)||this}return t}(AggregateCommandImpl);exports.StrcasecmpAggregateCommand=StrcasecmpAggregateCommand;var SubstrCPAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"substrCP",r)||this}return t}(AggregateCommandImpl);exports.SubstrCPAggregateCommand=SubstrCPAggregateCommand;var StdDevPopAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"stdDevPop",r)||this}return t}(AggregateCommandImpl);exports.StdDevPopAggregateCommand=StdDevPopAggregateCommand;var StdDevSampAggregateCommand=function(e){__extends(t,e);function t(r){return e.call(this,"stdDevSamp",r)||this}return t}(AggregateCommandImpl);exports.StdDevSampAggregateCommand=StdDevSampAggregateCommand;
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, GeoWinthinParam, GeoNearParam, GeoIntersectsParam } 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, AggregateRangeParam, AggregateFilterParam, AggregateReduceParam, AggregateZipParam, AggregateDateFromStringParam, AggregateStrcasecmpParam, AggregateSubstrCPParam, AggregateIndexOfParam } from '../typing';
import { AggregateCommand, QueryChainCommand, QueryCommand } from './AbstractCommand';
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 { AbsAggregateCommand, AddAggregateCommand, AddToSetAggregateCommand, AndAggregateCommand, ArrayElemAtAggregateCommand, ArrayToObjectAggregateCommand, AvgAggregateCommand, CeilAggregateCommand, CMPAggregateCommand, ConcatAggregateCommand, ConcatArraysAggregateCommand, CondAggregateCommand, CountAggregateCommand, DateFromStringAggregateCommand, DateToStringAggregateCommand, DivideAggregateCommand, EqAggregateCommand, ExpAggregateCommand, FilterAggregateCommand, FirstAggregateCommand, FloorAggregateCommand, GtAggregateCommand, GteAggregateCommand, IfNullAggregateCommand, InAggregateCommand, IndexOfArrayAggregateCommand, IndexOfBytesAggregateCommand, IndexOfCPAggregateCommand, IsArrayAggregateCommand, ISOWeekAggregateCommand, LastAggregateCommand, LetAggregateCommand, LnAggregateCommand, Log10AggregateCommand, LogAggregateCommand, LtAggregateCommand, LteAggregateCommand, MapAggregateCommand, MaxAggregateCommand, MergeObjectsAggregateCommand, MinAggregateCommand, ModAggregateCommand, MonthAggregateCommand, MultiplyAggregateCommand, NeqAggregateCommand, NotAggregateCommand, ObjectToArrayAggregateCommand, OrAggregateCommand, PowAggregateCommand, PushAggregateCommand, RangeAggregateCommand, ReverseArrayAggregateCommand, ReduceAggregateCommand, SizeAggregateCommand, SliceAggregateCommand, SplitAggregateCommand, SqrtAggregateCommand, StdDevPopAggregateCommand, StdDevSampAggregateCommand, StrcasecmpAggregateCommand, StrLenBytesAggregateCommand, StrLenCPAggregateCommand, SubstrAggregateCommand, SubstrBytesAggregateCommand, SubstrCPAggregateCommand, SubtractAggregateCommand, SumAggregateCommand, SwitchAggregateCommand, ToLowerAggregateCommand, ToUpperAggregateCommand, TruncAggregateCommand, WeekAggregateCommand, YearAggregateCommand, ZipAggregateCommand } from './aggregate';
import { AggregatePipeline } from './AggregatePipeline';

@@ -110,2 +110,20 @@ import { ExprCommand } from './query/expr';

isoWeek(value: AggregateDateParam): ISOWeekAggregateCommand;
arrayToObject(value: AggregateArrayExpression[]): ArrayToObjectAggregateCommand;
concatArrays(value: AggregateArrayExpression[]): ConcatArraysAggregateCommand;
filter(value: AggregateFilterParam): FilterAggregateCommand;
objectToArray(value: AggregateDocumentExpression): ObjectToArrayAggregateCommand;
range(val: AggregateRangeParam): RangeAggregateCommand;
range(start: AggregateNumberExpression, end: AggregateNumberExpression, nonZeroStep?: AggregateNumberExpression): RangeAggregateCommand;
reduce(value: AggregateReduceParam): ReduceAggregateCommand;
reverseArray(value: AggregateArrayExpression): ReverseArrayAggregateCommand;
zip(value: AggregateZipParam): ZipAggregateCommand;
dateFromString(value: AggregateDateFromStringParam): DateFromStringAggregateCommand;
indexOfBytes(value: AggregateIndexOfParam): IndexOfBytesAggregateCommand;
indexOfCP(value: AggregateIndexOfParam): IndexOfCPAggregateCommand;
strLenBytes(value: AggregateStringExpression): StrLenBytesAggregateCommand;
strLenCP(value: AggregateStringExpression): StrLenCPAggregateCommand;
strcasecmp(value: AggregateStrcasecmpParam): StrcasecmpAggregateCommand;
substrCP(value: AggregateSubstrCPParam): SubstrCPAggregateCommand;
stdDevPop(value: AggregateExpression): StdDevPopAggregateCommand;
stdDevSamp(value: AggregateExpression): StdDevSampAggregateCommand;
}

@@ -112,0 +130,0 @@ export declare class Command {

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

@@ -177,1 +177,27 @@ import { AggregateCommand } from './command/AbstractCommand';

}
export interface AggregateFilterParam {
input: AggregateArrayExpression;
cond: AggregateBooleanExpression;
as?: string;
}
export interface AggregateReduceParam {
input: AggregateArrayExpression;
initialValue: AggregateExpression;
in: AggregateExpression;
}
export type AggregateRangeParam = [AggregateNumberExpression, AggregateNumberExpression, AggregateNumberExpression?];
export interface AggregateZipParam {
inputs: AggregateArrayExpression[];
useLongestLength?: boolean;
defaults?: any[];
}
export interface AggregateDateFromStringParam {
dateString: string;
format?: string;
timezone?: string;
onError?: AggregateExpression;
onNull?: AggregateExpression;
}
export type AggregateIndexOfParam = [AggregateStringExpression, AggregateStringExpression, AggregateNumberExpression?, AggregateNumberExpression?];
export type AggregateStrcasecmpParam = [AggregateStringExpression, AggregateStringExpression];
export type AggregateSubstrCPParam = [AggregateStringExpression, AggregateNumberExpression, AggregateNumberExpression];
{
"name": "@alipay/faas-db-builder",
"version": "1.1.18",
"version": "1.1.19-alpha.0",
"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