@dpapejs/emysql
Version:
🛠️ Based on the basic secondary package of `mysql`, the pursuit of creating a simple and easy to use `mysql-ORM` library.
65 lines (64 loc) • 1.42 kB
TypeScript
/**
* 数据变更
* @date 2024/11/11
*/
import type { QueryOptions } from 'mysql2';
import { BATCH_UPDATE_PARAMS, BatchUpdateParam, CONDITION_TYPE, INSERT_PARAM_TYPE, TABLE_TYPE, UpdateParam } from '..';
/**
* 数据删除
* @param t 表信息
* @param condition 删除条件信息
*/
export declare function changeDetele(db: string, t: TABLE_TYPE, condition: CONDITION_TYPE): QueryOptions;
/**
* 插入数据
* @param db 数据库名称
* @param t 表名
* @param params 插入数据
* @returns
*/
export declare function changeInsert(db: string, t: string, params: INSERT_PARAM_TYPE): {
sql: string;
values: any[];
};
/**
* 数据更新
* @param db 数据库名
* @param o 参数信息
*/
export declare function changeUpdate(db: string, o: UpdateParam): {
sql: string;
values: any[];
};
/**
* 临时表批量更新
* @param db 数据库名称
* @param o 参数
* @returns
*/
export declare function BatchTemporaryUpdate(db: string, o: BatchUpdateParam): {
create: {
values: never[];
sql: string;
};
insert: {
sql: string;
values: any[];
};
update: {
values: never[];
sql: string;
};
drop: {
values: never[];
sql: string;
};
};
/**
*
* @param type 批量更新类型
*/
export declare function BatchUpdate(db: string, v: BATCH_UPDATE_PARAMS): {
sql: string;
values: any[];
};