import { ConnectionPool, IRecordSet } from "mssql"; import { ERPResponse } from "../../types/erp-types.js"; import { SQLServerConfiguration } from "./configuration.js"; type PagingParams = { limit?: number; offset?: number; }; export declare class SqlServerService { private connection; private config; constructor(config: SQLServerConfiguration); dispose(): Promise; /** * Execute a prepared statement and return the results * * @param statementToPrepare The SQL query to prepare * @param params The parameters to bind to the prepared statement * @param paging Optional paging parameters * @returns The entities fetched from the database, along with paging information */ executePreparedStatement(statementToPrepare: string, params: Record, paging?: PagingParams): Promise; /** * Opens a connection to SQL Server * Caches the connection so that it can be reused. * On failure to connect, throws */ openConnection(): Promise; /** * Transform a IRecordSet from a SQL query into an array of Record instances. * @param recordset IRecordSet from a SQL query * @returns array of Record instances */ static recordsetToRecords(recordset?: IRecordSet>): Record[]; private closeConnection; } export {}; //# sourceMappingURL=sql-server-service.d.ts.map