@lantsang/nestjs-tdengine
Version:
NestJS TDengine 驱动
24 lines (23 loc) • 986 B
TypeScript
import { HttpService } from '@nestjs/common';
import { QueryCountResponse } from '../interfaces/response/query/query-count.response.interface';
import { QueryExecResponse } from '../interfaces/response/query/query-exec.response.interface';
import { QueryUtil } from '../utils/query.util';
export declare class TDengineQueryService {
private readonly httpService;
private readonly queryUtil;
constructor(httpService: HttpService, queryUtil: QueryUtil);
/**
* 执行SQL查询语句
* @param sql 执行查询的SQL语句
* @returns SQL执行结果
*/
exec<T>(sql: string): Promise<QueryExecResponse<T[]>>;
/**
* 获取符合条件的数据条数
* @param database 数据库名称
* @param table 表名称(超级表、子表、普通表均可)
* @param condition 查询条件
* @returns 获取数量sql执行结果
*/
count(database: string, table: string, condition: string): Promise<QueryCountResponse>;
}