21 lines
867 B
TypeScript
21 lines
867 B
TypeScript
import { type IResult } from "mssql";
|
|
import type { ServerConfig } from "./config.js";
|
|
import { type SqlParam } from "./sql.js";
|
|
export type QueryResult = IResult<Record<string, unknown>>;
|
|
export declare class SqlServerClient {
|
|
private readonly config;
|
|
private readonly pools;
|
|
constructor(config: ServerConfig);
|
|
get allowedDatabases(): string[];
|
|
get defaultDatabase(): string;
|
|
get readOnly(): boolean;
|
|
get enableDdl(): boolean;
|
|
get maxRows(): number;
|
|
get maxWriteRows(): number;
|
|
query(databaseName: string | undefined, statement: string, params?: SqlParam[]): Promise<QueryResult>;
|
|
batch(databaseName: string | undefined, statement: string): Promise<QueryResult>;
|
|
close(): Promise<void>;
|
|
private getPool;
|
|
}
|
|
export declare function useDatabaseStatement(databaseName: string): string;
|
|
//# sourceMappingURL=db.d.ts.map
|