import { Collection, Db, MongoClient as Client } from 'mongodb'; import { Addon, FactType } from '../aop'; import { Dictionary } from '../base'; import { Service } from './base'; export declare type ArgumentFunc = (args?: Dictionary) => AnyExpression; export declare type SimpleValue = string | number | Object; export declare type AnyExpression = Expression | AnyExpression[] | Dictionary | SimpleValue; export declare type MongoDataType = 'double' | 'string' | 'objectId' | 'bool' | 'date' | 'int' | 'long' | 'decimal'; export declare class MongoConnection extends Addon { dbUrl?: string; dbOptions?: any; constructor(dbUrl?: string, dbOptions?: any); processClient?: ((func: (client: Client) => void) => Promise) | undefined; processDb?: ((dbName: string, func: (db: Db) => void) => Promise) | undefined; processCollection?: ((dbName: string, collectionName: string, func: (collection: Collection) => void) => Promise) | undefined; process?: (func: (dbObj: Db | Collection) => void) => Promise; } export declare class MongoDB extends MongoConnection { dbName?: string; process?: ((func: (db: Db | Collection) => void) => Promise) | undefined; } export declare class MongoCollection extends MongoDB { collectionName?: string; process?: ((func: (collection: Collection) => void) => Promise) | undefined; } export declare class MongoCommand extends MongoCollection { queryExpression?: P; queryString?: string; /** * 获取查询管道 */ getPipline?: ((args?: Dictionary | undefined) => any) | undefined; /** * 执行查询命令 */ queryCollection?: ((dbName: string, collectionName: string, args?: Dictionary | undefined) => Promise) | undefined; /** * 查询 */ query?: ((args?: Dictionary | undefined) => Promise) | undefined; } export declare class MongoCommandService extends Service { dbCollection?: FactType; queryCommands?: Dictionary; /** * 查询 */ query?: ((commandId: string, paramValues: Dictionary) => Promise) | undefined; } /** * 转换为Mongo表达式 * @param exp 表达式 */ export declare function toMongoExp(exp: any): any; /** * 转换为Mongo表达式 * @param exp 表达式 */ export declare function calcMongoExp(originExp: any, args?: Dictionary): any; /** * 参数函数 * @param name 参数名称 */ export declare function arg(name: string): A; /** * 列函数 * @param name 列名称 */ export declare function col(name: string): E; /** * 管道函数 */ export declare function pipline(): P; export declare class Expression extends Addon { toMongoExp?: (() => AnyExpression) | undefined; calcMongoExp?: (() => any) | undefined; } export declare class A extends Expression { name: string; constructor(name: string); toMongoExp?: (() => (args?: Dictionary | undefined) => any) | undefined; } export declare class P extends Expression { private p; private colIndex; /** * 新建列 */ newColumn?: (() => string) | undefined; toMongoExp?: (() => any[]) | undefined; push?: ((opt: string, exp: AnyExpression) => this) | undefined; /** * where筛选,可以传递复杂的表达式 */ where?: ((exp: AnyExpression) => this) | undefined; /** * 选择列,等同于project */ select?: ((cols: AnyExpression) => this) | undefined; /** * 连接 */ join?: ((fromExp: string, localField: AnyExpression, foreignField: string, asField?: string | undefined) => this) | undefined; /** * 左连接,连接后unwind数据集 */ leftJoin?: ((fromExp: string, localField: AnyExpression, foreignField: string, includeArrayIndex?: any, preserveNullAndEmptyArrays?: any) => this) | undefined; /** * 树连接, 等同于graphLookup */ treeJoin?: ((fromExp: string, startWith: AnyExpression, connectFromField: string, connectToField: string, asField?: any, maxDepth?: any, depthField?: any, restrictSearchWithMatch?: any) => this) | undefined; /** * 添加字段 */ addFields?: ((exp: AnyExpression) => this) | undefined; /** * 分段分组 */ bucket?: ((groupBy: AnyExpression, boundaries: any[], _default: any, output: AnyExpression) => this) | undefined; /** * 自动分段分组 */ bucketAuto?: ((groupBy: AnyExpression, buckets: number, output: AnyExpression, granularity: string) => this) | undefined; /** * 返回有关集合或视图的统计信息 */ collStats?: ((latencyStats: AnyExpression, storageStats: AnyExpression, count: AnyExpression) => this) | undefined; /** * 计数 */ count?: ((col_name: string) => this) | undefined; /** * 获取当前Op */ currentOp?: ((allUsers?: boolean | undefined, idleConnections?: boolean | undefined, idleCursors?: boolean | undefined, idleSessions?: boolean | undefined, localOps?: boolean | undefined) => this) | undefined; /** * 创建多聚合 */ facet?: ((exp: AnyExpression) => this) | undefined; /** * 地理位置检索 */ geoNear?: ((near: AnyExpression, distanceField: string, spherical?: boolean | undefined, maxDistance?: number | undefined, query?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined, distanceMultiplier?: number | undefined, includeLocs?: string | undefined, uniqueDocs?: boolean | undefined, minDistance?: number | undefined, key?: number | undefined) => this) | undefined; /** * 树检索 */ graphLookup?: ((fromExp: string, startWith: AnyExpression, connectFromField: string, connectToField: string, asField?: string | undefined, maxDepth?: number | undefined, depthField?: string | undefined, restrictSearchWithMatch?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => this) | undefined; /** * 分组 */ group?: ((_id: AnyExpression, fields: Dictionary) => this) | undefined; /** * 索引统计数据 */ indexStats?: (() => this) | undefined; /** * 数量限制 */ limit?: ((count: number) => this) | undefined; /** * 列出所有本地会话 */ listLocalSessions?: ((exp?: AnyExpression) => this) | undefined; /** * 列出所有会话 */ listSessions?: ((exp?: AnyExpression) => this) | undefined; /** * 关联表 */ lookup?: ((fromExp: string, localField: string, foreignField: string, asField?: string | undefined) => this) | undefined; /** * 过滤(若要自动生成Field,请使用where) */ match?: ((filter: AnyExpression) => this) | undefined; /** * 合并 */ merge?: ((into?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined, on?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined, _let?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined, whenMatched?: "replace" | "fail" | "keepExisting" | "merge" | "pipeline" | undefined, whenNotMatched?: "fail" | "insert" | "discard" | undefined) => this) | undefined; /** * 将数据保存到集合 */ out?: ((coll_name: string) => this) | undefined; /** * 执行计划缓存信息 */ planCacheStats?: (() => this) | undefined; /** * 投射(选择列) */ project?: ((cols: AnyExpression) => this) | undefined; /** * Restricts the contents of the documents based on information stored in the documents themselves. */ redact?: ((exp: AnyExpression) => this) | undefined; /** * 用指定文档替换掉输入文档 */ replaceRoot?: ((doc: AnyExpression) => this) | undefined; /** * 用指定文档替换掉输入文档,等同于replaceRoot */ replaceWith?: ((doc: AnyExpression) => this) | undefined; /** * 取样 */ sample?: ((size: number) => this) | undefined; /** * 跳过 */ skip?: ((size: number) => this) | undefined; /** * 排序 */ sort?: ((exp: AnyExpression) => this) | undefined; /** * 汇总并根据数量排序 */ sortByCount?: ((exp: AnyExpression) => this) | undefined; /** * 去掉列 */ uset?: ((field1: string, ...fields: string[]) => this) | undefined; /** * 解构数组到文档中 */ unwind?: ((path: string, includeArrayIndex?: string | undefined, preserveNullAndEmptyArrays?: boolean | undefined) => this) | undefined; } declare type ExpressionType = 'col' | 'exp'; export declare class E extends Expression { private field; private expType; constructor(field?: string | undefined); static connect(opt: string, exp: AnyExpression, type?: ExpressionType): E; toMongoExp?: (() => string | Object) | undefined; /** * 绝对值 */ abs: () => E; /** * 相加 */ add: (exp: AnyExpression, ...exps: AnyExpression[]) => E; /** * 向上取整 */ ceil: () => E; /** * 除法 */ divide: (exp: AnyExpression) => E; /** * e指数 */ exp: () => E; /** * 向下取整 */ floor: () => E; /** * 自然对数 */ ln: () => E; /** * 对数 */ log: (exp: AnyExpression) => E; /** * 以10为底的对数 */ log10: () => E; /** * 求余 */ mod: (exp: AnyExpression) => E; /** * 乘法 */ multiply: (exp: AnyExpression, ...exps: AnyExpression[]) => E; /** * 指数 */ pow: (exp: AnyExpression) => E; /** * 四舍五入至指定位数 */ round: (exp: AnyExpression) => E; /** * 开平方 */ sqrt: (exp: AnyExpression) => E; /** * 减法 */ subtract: (exp: AnyExpression) => E; /** * 截取至指定位数 */ trunc: (exp: AnyExpression) => E; /** * 获取指定位置的数组元素 */ arrayElemAt: (exp: AnyExpression) => E; /** * 将数组转换为对象 */ arrayToObject: () => E; /** * 是否为数组 */ isArray: () => E; /** * 连接数组 */ concatArrays: (...exps: AnyExpression[]) => E; /** * 过滤 */ filter: (asField?: string | undefined, condition?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 判断是否在数组中 */ inArray: (array: AnyExpression) => E; /** * 判断是否包含某个元素 */ arrayContain: (ele: AnyExpression) => E; /** * 映射 */ map: (asField?: string | undefined, inExp?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 将对象转换为数组 */ objectToArray: () => E; /** * 简化 */ reduce: (initialValue?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined, res?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 大小 */ size: () => E; /** * 反转顺序 */ reverseArray: () => E; /** * 切取 */ slice: (arg_0: AnyExpression, arg_1: AnyExpression) => E; /** * 压缩 */ zip: (useLongestLength: boolean, defaults: AnyExpression) => E; /** * 与 */ and: (exp: AnyExpression, ...exps: AnyExpression[]) => E; /** * 或 */ or: (exp: AnyExpression, ...exps: AnyExpression[]) => E; /** * 非 */ not: () => E; /** * 比较 */ cmp: (exp2: AnyExpression) => E; /** * 等于 */ eq: (exp2: AnyExpression) => E; /** * 大于 */ gt: (exp2: AnyExpression) => E; /** * 大于等于 */ gte: (exp2: AnyExpression) => E; /** * 小于 */ lt: (exp2: AnyExpression) => E; /** * 小于等于 */ lte: (exp2: AnyExpression) => E; /** * 不等于 */ ne: (exp2: AnyExpression) => E; /** * 判断是否为空 */ ifNull: (nullExp: AnyExpression) => E; /** * 从字符串生成日期 */ parseDate: (format: AnyExpression, timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined, onError?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined, onNull?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 日期切分 */ dateToParts: (timezone: AnyExpression, iso8601?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 日期转换为字符串 */ dateToString: (format: AnyExpression, timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 获取月份日期 */ dayOfMonth: (timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 获取星期几 */ dayOfWeek: (timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 获取年 */ dayOfYear: (timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 获取时 */ hour: (timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 获取iso星期 */ isoDayOfWeek: (timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 获取iso周数 */ isoWeek: (timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 获取iso当年第几周 */ isoWeekYear: (timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 获取毫秒数 */ millisecond: (timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 获取分钟数 */ minute: (timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 获取月份 */ month: (timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 获取秒数 */ second: (timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 转换为日期 */ toDate: () => E; /** * 获取周号 */ week: (timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 年 */ year: (timezone?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * literal */ literal: () => E; /** * 合并对象 */ mergeObjects: () => E; /** * 是否所有元素都为True */ allElementsTrue: () => E; /** * 是否有元素为True */ anyElementTrue: () => E; /** * 差集 */ setDifference: (exp2: AnyExpression) => E; /** * 集合相等 */ setEquals: (exp2: AnyExpression) => E; /** * 交叉集合 */ setIntersection: (exp2: AnyExpression, ...exps: AnyExpression[]) => E; /** * 集合包含 */ setIsSubset: (exp2: AnyExpression) => E; /** * 并集 */ setUnion: (exp2: AnyExpression, ...exps: AnyExpression[]) => E; /** * 字符串连接 */ concat: (exp2: AnyExpression, ...exps: AnyExpression[]) => E; /** * 字符串字节检索 */ indexOfBytes: (exp2: AnyExpression, exps_0: AnyExpression, exps_1: AnyExpression) => E; /** * 字符串字检索 */ indexOfCP: (exp2: AnyExpression, exps_0: AnyExpression, exps_1: AnyExpression) => E; /** * 移除左边空格 */ ltrim: (chars: AnyExpression) => E; /** * 用正则表达式查找 */ regexFind: (regex: AnyExpression, options?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 用正则表达式查找所有匹配项 */ regexFindAll: (regex: AnyExpression, options?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 用正则表达式匹配 */ regexMatch: (regex: AnyExpression, options?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 移除右边空格 */ rtrim: (chars: AnyExpression) => E; /** * 分割字符串 */ split: (chars: AnyExpression) => E; /** * 字符串字节数 */ strLenBytes: () => E; /** * 字数 */ strLenCP: () => E; /** * 字符串比较(考虑大小写) */ strcasecmp: (exp: AnyExpression) => E; /** * 字节子串 */ substrBytes: (start: AnyExpression, length: AnyExpression) => E; /** * 字子串 */ substrCP: (start: AnyExpression, length: AnyExpression) => E; /** * 转换为小写 */ toLower: () => E; /** * 转换为字符串 */ toString: () => E; /** * 移除两端空格 */ trim: (chars: AnyExpression) => E; /** * 转换为大写 */ toUpper: () => E; /** * meta */ meta: () => E; /** * 正弦函数 */ sin: () => E; /** * 余弦函数 */ cos: () => E; /** * 正切函数 */ tan: () => E; /** * 反正弦函数 */ asin: () => E; /** * 反余弦函数 */ acos: () => E; /** * 反正切函数 */ atan: () => E; /** * 反正切函数2 */ atan2: () => E; /** * 双曲正弦函数 */ asinh: () => E; /** * 双曲余弦函数 */ acosh: () => E; /** * 双曲正切函数 */ atanh: () => E; /** * 角度转弧度 */ degreesToRadians: () => E; /** * 弧度转角度 */ radiansToDegrees: () => E; /** * 类型转换 */ convert: (to: AnyExpression, onError?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined, onNull?: string | number | Object | Expression | AnyExpression[] | Dictionary | undefined) => E; /** * 转换为布尔型 */ toBool: () => E; /** * 转换为十进制数 */ toDecimal: () => E; /** * 转换为浮点 */ toDouble: () => E; /** * 转换为整数 */ toInt: () => E; /** * 转换为长整数 */ toLong: () => E; /** * 转换为对象ID型 */ toObjectId: () => E; /** * 获取类型 */ get_type: () => E; /** * 添加到集合 */ addToSet: () => E; /** * 求平均数 */ avg: (...exps: AnyExpression[]) => E; /** * 第一条 */ first: () => E; /** * 最后一条 */ last: () => E; /** * 最大 */ max: () => E; /** * 最小 */ min: () => E; /** * 聚合成数组 */ push: () => E; /** * 总体标准差 */ stdDevPop: (...exps: AnyExpression[]) => E; /** * 样本标准差 */ stdDevSamp: (...exps: AnyExpression[]) => E; /** * 求和 */ sum: (...exps: AnyExpression[]) => E; } /** * 绝对值 */ export declare function abs(input: AnyExpression): E; /** * 相加 */ export declare function add(input: AnyExpression, exp: AnyExpression, ...exps: AnyExpression[]): E; /** * 向上取整 */ export declare function ceil(input: AnyExpression): E; /** * 除法 */ export declare function divide(input: AnyExpression, exp: AnyExpression): E; /** * e指数 */ export declare function exp(input: AnyExpression): E; /** * 向下取整 */ export declare function floor(input: AnyExpression): E; /** * 自然对数 */ export declare function ln(input: AnyExpression): E; /** * 对数 */ export declare function log(input: AnyExpression, exp: AnyExpression): E; /** * 以10为底的对数 */ export declare function log10(input: AnyExpression): E; /** * 求余 */ export declare function mod(input: AnyExpression, exp: AnyExpression): E; /** * 乘法 */ export declare function multiply(input: AnyExpression, exp: AnyExpression, ...exps: AnyExpression[]): E; /** * 指数 */ export declare function pow(input: AnyExpression, exp: AnyExpression): E; /** * 四舍五入至指定位数 */ export declare function round(input: AnyExpression, exp: AnyExpression): E; /** * 开平方 */ export declare function sqrt(input: AnyExpression, exp: AnyExpression): E; /** * 减法 */ export declare function subtract(input: AnyExpression, exp: AnyExpression): E; /** * 截取至指定位数 */ export declare function trunc(input: AnyExpression, exp: AnyExpression): E; /** * 获取指定位置的数组元素 */ export declare function arrayElemAt(input: AnyExpression, exp: AnyExpression): E; /** * 将数组转换为对象 */ export declare function arrayToObject(input: AnyExpression): E; /** * 是否为数组 */ export declare function isArray(input: AnyExpression): E; /** * 连接数组 */ export declare function concatArrays(input: AnyExpression, ...exps: AnyExpression[]): E; /** * 过滤 */ export declare function filter(input: AnyExpression, asField?: string, condition?: AnyExpression): E; /** * 判断是否在数组中 */ export declare function inArray(ele: AnyExpression, array: AnyExpression): E; /** * 映射 */ export declare function map(input: AnyExpression, asField?: string, inExp?: AnyExpression): E; /** * 将对象转换为数组 */ export declare function objectToArray(input: AnyExpression): E; /** * 范围 */ export declare function range(start: number, end: number, ...step: [number]): E; /** * 简化 */ export declare function reduce(input: AnyExpression, initialValue?: AnyExpression, res?: AnyExpression): E; /** * 大小 */ export declare function size(input: AnyExpression): E; /** * 反转顺序 */ export declare function reverseArray(input: AnyExpression): E; /** * 切取 */ export declare function slice(input: AnyExpression, ...arg: [AnyExpression, AnyExpression]): E; /** * 压缩 */ export declare function zip(input: AnyExpression, useLongestLength: boolean, defaults: AnyExpression): E; /** * 与 */ export declare function and(input: AnyExpression, exp: AnyExpression, ...exps: AnyExpression[]): E; /** * 或 */ export declare function or(input: AnyExpression, exp: AnyExpression, ...exps: AnyExpression[]): E; /** * 非 */ export declare function not(input: AnyExpression): E; /** * 比较 */ export declare function cmp(exp1: AnyExpression, exp2: AnyExpression): E; /** * 等于 */ export declare function eq(exp1: AnyExpression, exp2: AnyExpression): E; /** * 大于 */ export declare function gt(exp1: AnyExpression, exp2: AnyExpression): E; /** * 大于等于 */ export declare function gte(exp1: AnyExpression, exp2: AnyExpression): E; /** * 小于 */ export declare function lt(exp1: AnyExpression, exp2: AnyExpression): E; /** * 小于等于 */ export declare function lte(exp1: AnyExpression, exp2: AnyExpression): E; /** * 不等于 */ export declare function ne(exp1: AnyExpression, exp2: AnyExpression): E; /** * 条件 */ export declare function cond(ifExp: AnyExpression, thenExp: AnyExpression, elseExp?: AnyExpression): E; /** * 判断是否为空 */ export declare function ifNull(exp: AnyExpression, nullExp: AnyExpression): E; /** * 开关 */ export declare function switcher(branches: AnyExpression, defaultExp?: AnyExpression): E; /** * 生成日期 */ export declare function dateFromParts(input: AnyExpression): E; /** * 从字符串生成日期 */ export declare function dateFromString(dateString: AnyExpression, format: AnyExpression, timezone?: AnyExpression, onError?: AnyExpression, onNull?: AnyExpression): E; /** * 日期切分 */ export declare function dateToParts(date: AnyExpression, timezone: AnyExpression, iso8601?: AnyExpression): E; /** * 日期转换为字符串 */ export declare function dateToString(date: AnyExpression, format: AnyExpression, timezone?: AnyExpression): E; /** * 获取月份日期 */ export declare function dayOfMonth(date: AnyExpression, timezone?: AnyExpression): E; /** * 获取星期几 */ export declare function dayOfWeek(date: AnyExpression, timezone?: AnyExpression): E; /** * 获取年 */ export declare function dayOfYear(date: AnyExpression, timezone?: AnyExpression): E; /** * 获取时 */ export declare function hour(date: AnyExpression, timezone?: AnyExpression): E; /** * 获取iso星期 */ export declare function isoDayOfWeek(date: AnyExpression, timezone?: AnyExpression): E; /** * 获取iso周数 */ export declare function isoWeek(date: AnyExpression, timezone?: AnyExpression): E; /** * 获取iso当年第几周 */ export declare function isoWeekYear(date: AnyExpression, timezone?: AnyExpression): E; /** * 获取毫秒数 */ export declare function millisecond(date: AnyExpression, timezone?: AnyExpression): E; /** * 获取分钟数 */ export declare function minute(date: AnyExpression, timezone?: AnyExpression): E; /** * 获取月份 */ export declare function month(date: AnyExpression, timezone?: AnyExpression): E; /** * 获取秒数 */ export declare function second(date: AnyExpression, timezone?: AnyExpression): E; /** * 转换为日期 */ export declare function toDate(exp: AnyExpression): E; /** * 获取周号 */ export declare function week(date: AnyExpression, timezone?: AnyExpression): E; /** * 年 */ export declare function year(date: AnyExpression, timezone?: AnyExpression): E; /** * literal */ export declare function literal(exp: AnyExpression): E; /** * 合并对象 */ export declare function mergeObjects(exp: AnyExpression, ...exps: AnyExpression[]): E; /** * 是否所有元素都为True */ export declare function allElementsTrue(exp: AnyExpression): E; /** * 是否有元素为True */ export declare function anyElementTrue(exp: AnyExpression): E; /** * 差集 */ export declare function setDifference(exp1: AnyExpression, exp2: AnyExpression): E; /** * 集合相等 */ export declare function setEquals(exp1: AnyExpression, exp2: AnyExpression): E; /** * 交叉集合 */ export declare function setIntersection(exp1: AnyExpression, exp2: AnyExpression, ...exps: AnyExpression[]): E; /** * 集合包含 */ export declare function setIsSubset(exp1: AnyExpression, exp2: AnyExpression): E; /** * 并集 */ export declare function setUnion(exp1: AnyExpression, exp2: AnyExpression, ...exps: AnyExpression[]): E; /** * 连接 */ export declare function concat(exp1: AnyExpression, exp2: AnyExpression, ...exps: AnyExpression[]): E; /** * 字符串字节检索 */ export declare function indexOfBytes(exp1: AnyExpression, exp2: AnyExpression, ...exps: [AnyExpression, AnyExpression]): E; /** * 字符串字检索 */ export declare function indexOfCP(exp1: AnyExpression, exp2: AnyExpression, ...exps: [AnyExpression, AnyExpression]): E; /** * 移除左边空格 */ export declare function ltrim(input: AnyExpression, chars: AnyExpression): E; /** * 用正则表达式查找 */ export declare function regexFind(input: AnyExpression, regex: AnyExpression, options?: AnyExpression): E; /** * 用正则表达式查找所有匹配项 */ export declare function regexFindAll(input: AnyExpression, regex: AnyExpression, options?: AnyExpression): E; /** * 用正则表达式匹配 */ export declare function regexMatch(input: AnyExpression, regex: AnyExpression, options?: AnyExpression): E; /** * 移除右边空格 */ export declare function rtrim(input: AnyExpression, chars: AnyExpression): E; /** * 分割字符串 */ export declare function split(input: AnyExpression, chars: AnyExpression): E; /** * 字符串字节数 */ export declare function strLenBytes(input: AnyExpression): E; /** * 字数 */ export declare function strLenCP(input: AnyExpression): E; /** * 字符串比较(考虑大小写) */ export declare function strcasecmp(exp1: AnyExpression, exp2: AnyExpression): E; /** * 字节子串 */ export declare function substrBytes(input: AnyExpression, start: AnyExpression, length: AnyExpression): E; /** * 字子串 */ export declare function substrCP(input: AnyExpression, start: AnyExpression, length: AnyExpression): E; /** * 转换为小写 */ export declare function toLower(input: AnyExpression): E; /** * 转换为字符串 */ export declare function toString(input: AnyExpression): E; /** * 移除两端空格 */ export declare function trim(input: AnyExpression, chars: AnyExpression): E; /** * 转换为大写 */ export declare function toUpper(input: AnyExpression): E; /** * meta */ export declare function meta(input: AnyExpression): E; /** * 正弦函数 */ export declare function sin(input: AnyExpression): E; /** * 余弦函数 */ export declare function cos(input: AnyExpression): E; /** * 正切函数 */ export declare function tan(input: AnyExpression): E; /** * 反正弦函数 */ export declare function asin(input: AnyExpression): E; /** * 反余弦函数 */ export declare function acos(input: AnyExpression): E; /** * 反正切函数 */ export declare function atan(input: AnyExpression): E; /** * 反正切函数2 */ export declare function atan2(input: AnyExpression): E; /** * asinh */ export declare function asinh(input: AnyExpression): E; /** * acosh */ export declare function acosh(input: AnyExpression): E; /** * atanh */ export declare function atanh(input: AnyExpression): E; /** * 角度转弧度 */ export declare function degreesToRadians(input: AnyExpression): E; /** * 弧度转角度 */ export declare function radiansToDegrees(input: AnyExpression): E; /** * 类型转换 */ export declare function convert(input: AnyExpression, to: AnyExpression | MongoDataType, onError?: AnyExpression, onNull?: AnyExpression): E; /** * 转换为布尔型 */ export declare function toBool(input: AnyExpression): E; /** * 转换为十进制数 */ export declare function toDecimal(input: AnyExpression): E; /** * 转换为浮点 */ export declare function toDouble(input: AnyExpression): E; /** * 转换为整数 */ export declare function toInt(input: AnyExpression): E; /** * 转换为长整数 */ export declare function toLong(input: AnyExpression): E; /** * 转换为对象ID型 */ export declare function toObjectId(input: AnyExpression): E; /** * 获取类型 */ export declare function get_type(input: AnyExpression): E; /** * 添加到集合 */ export declare function addToSet(input: AnyExpression): E; /** * 平均数 */ export declare function avg(exp: AnyExpression, ...exps: AnyExpression[]): E; /** * 第一条 */ export declare function first(input: AnyExpression): E; /** * 最后一条 */ export declare function last(input: AnyExpression): E; /** * 最大 */ export declare function max(exp: AnyExpression, ...exps: AnyExpression[]): E; /** * 最小 */ export declare function min(exp: AnyExpression, ...exps: AnyExpression[]): E; /** * 聚合成数组 */ export declare function push(input: AnyExpression): E; /** * 总体标准差 */ export declare function stdDevPop(exp: AnyExpression, ...exps: AnyExpression[]): E; /** * 样本标准差 */ export declare function stdDevSamp(exp: AnyExpression, ...exps: AnyExpression[]): E; /** * 求和 */ export declare function sum(exp: AnyExpression, ...exps: AnyExpression[]): E; /** * 定义 */ export declare function def(vars: AnyExpression, exp: AnyExpression): E; export {};