import { IBaseTable, Icondition, IlimitCondition, IorderCondition, IsqlSelectResult } from "./types"; /** * 数据查询 */ export declare class DQL { /** * 校验/补全查询字段信息 */ private static patch_keys; /** * 查询某个字段的值有多少重复数据的sql */ static sql_lookLoopValueNumOfKey: (tname: string, k: string) => string; /** * 设置查询时,将date类型数据转为字符串 */ static column_date_to_char(ks: string, newKs?: string): string; /** * 查询sql-生产环境下建议使用安全查询sql:sql_selectAsCondition * ... * @param dateFields 时间字段,dateFields中的时间字段都将被转为字符串的形式返回 */ static sql_select(tname: string, skeys?: string[], conditions?: string, dateFields?: string[]): string; /** * 安全查询sql-数组 * @param tb * @param conditions 条件 * @param skeys 参与查询的字段 * @param dateFields 时间字段,dateFields中的时间字段都将被转为字符串的形式返回 */ static sql_selectAsSafe(tb: string | IBaseTable, conditions?: Icondition[], skeys?: string[], dateFields?: string[], fieldIntercept?: TfieldInterceptFn): { sql: string; values: any[]; /** * 使用排序功能 */ useOrders(orders: IorderCondition[]): IsqlSelectResult; /** * 使用分页功能 */ useLimit(limits: IlimitCondition): IsqlSelectResult; /** * 使用分组功能 */ useGroup(gbks: string[], conditions?: Icondition[], fieldIntercept?: TfieldInterceptFn): IsqlSelectResult; useAvg(k: string): IsqlSelectResult; useCount(k?: string): IsqlSelectResult; useMax(k: string): IsqlSelectResult; useMin(k: string): IsqlSelectResult; useSum(k: string): IsqlSelectResult; }; /** * 使用排序功能 */ private static useOrders; /** * 使用分页功能 */ private static useLimit; /** * 使用分组功能 */ private static useGroup; /** * 使用平均值 */ private static useAvg; /** * 使用统计数量 */ private static useCount; /** * 使用最大值 */ private static useMax; /** * 使用最小值 */ private static useMin; /** * 使用统计数量总和 */ private static useSum; }