import { ServicePropertyDoc } from '../../decorators/ApiDecorators'; export declare const passwordDecode: (encodeString: string) => string; export declare const encodeConfigPassword: (text: string) => string; export declare const ColumnOrignValue: { new (orignValue: any): { orignValue: any; toString(): any; }; }; export declare const fileToBinary: (filePath: any) => NonSharedBuffer; export declare const propertyToColumnName: (property: string) => string; export declare const getColumn2ClassPropertyMapping: (entityClass: any) => { [columnName: string]: ServicePropertyDoc; }; export declare const doDBValueConvert: (propertyDoc: ServicePropertyDoc, value: any) => any; export type ObjectType = { new (): T; }; export type BatchUpdateItem = { sql: string; arrayValues?: any[]; }; export interface OrignDataBaseClient { getConnection: () => Promise; executeSql(sql: string, arrayValues?: any[]): Promise; find(entityClass: ObjectType | null, sql: string, arrayValues?: any[]): Promise; update(sql: string, arrayValues?: any[]): Promise; batchUpdate(batchUpdates: BatchUpdateItem[]): Promise; limitPageList(sql: string, orderBy: string, pageSize: number, currentPage: number): string; disablePrintSql(): void; enablePrintSql(): void; destory(): Promise; } export type PageData = { list: Array; total: number; size?: number; current?: number; }; export declare class DataBaseClient { instance: OrignDataBaseClient; constructor(instance: OrignDataBaseClient); /** * 轻易不要使用这个方法,除非DataBaseClient中提供的接口不能满足你的需求 */ getConnection(): Promise; /** * 请不要轻易使用这个方法,因为每个数据库返回的结果结构都不一样,直接使用时一定要考虑到不同数据库的特性 * @param sql * @param arrayValues */ executeSql(sql: string, arrayValues?: Array): Promise; find(entityClass: ObjectType | null, sql: string, arrayValues?: Array): Promise>; update(sql: string, arrayValues?: Array): Promise; /** * 获取分页查询结果 * @param sql * @param arrayValues * @param pageSize 从1开始 * @param currentPage */ getPageData(entityClass: ObjectType | null, sql: string, arrayValues: Array, orderBy: string, pageSize: number, currentPage: number): Promise>; getList(entityClass: ObjectType | null, sql: string, arrayValues?: Array): Promise; getObject(entityClass: ObjectType | null, sql: string, arrayValues?: Array): Promise; /** * 尽量看看源代码再使用 * @param sql * @param arrayValues */ getCount(sql: string, arrayValues?: any[]): Promise; getObjectByColumns(entityClass: ObjectType | null, tableName: string, whereCols: { [key: string]: any; }): Promise; insertRow(tableName: string, mapValue: { [key: string]: any; }): Promise; updateRow(tableName: string, mapValue: { [key: string]: any; }, whereCols: { [key: string]: any; }): Promise; deleteRow(tableName: string, whereCols: { [key: string]: any; }): Promise; destory(): Promise; } export declare const setupDataBaseClient: (instance: OrignDataBaseClient) => void; export declare const getDataBaseClient: () => DataBaseClient;