Skip to content

Commit 3c6ad61

Browse files
committed
Add SQL_TXN_* types to TypeScript definition
The odbc object contains transaction isolation level constants that were not included in the TypeScript definition. They could be accessed at runtime but the TypeScript compiler would give a compile-time error. This commit exposes the following constants (all have type `number`): * `SQL_TXN_READ_UNCOMMITTED` * `SQL_TXN_READ_COMMITTED` * `SQL_TXN_REPEATABLE_READ` * `SQL_TXN_SERIALIZABLE` Note that the odbc object also has constants with the full word "transaction" (ex: `SQL_TRANSACTION_READ_UNCOMMITTED`) that have the same value. It also has constants for various SQL types. Signed-off-by: BrendanC23 <4711227+BrendanC23@users.noreply.github.com>
1 parent f37f4c2 commit 3c6ad61

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/odbc.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ declare namespace odbc {
205205

206206
function pool(connectionString: string): Promise<Pool>;
207207
function pool(connectionObject: PoolParameters): Promise<Pool>;
208+
209+
const SQL_TXN_READ_UNCOMMITTED: number;
210+
const SQL_TXN_READ_COMMITTED: number;
211+
const SQL_TXN_REPEATABLE_READ: number;
212+
const SQL_TXN_SERIALIZABLE: number;
208213
}
209214

210215
export = odbc;

0 commit comments

Comments
 (0)