-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
24SevenOffice
committed
Mar 23, 2020
1 parent
2fa5e29
commit 08b53b5
Showing
23 changed files
with
1,064 additions
and
55 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import * as MsSql from 'mssql'; | ||
import { Query } from 'tfso-repository/lib/repository/db/query'; | ||
import { IRecordSet } from 'tfso-repository/lib/repository/db/recordset'; | ||
export declare enum IsolationLevel { | ||
ReadUncommitted = 0, | ||
ReadCommitted = 1, | ||
RepeatableRead = 2, | ||
Snapshot = 3, | ||
Serializable = 4 | ||
} | ||
export default class Connection { | ||
private static connectionPool; | ||
private _connectionString; | ||
private _connection; | ||
private _transaction; | ||
private _rolledback; | ||
constructor(connectionString: MsSql.config | PromiseLike<MsSql.config>); | ||
beginTransaction(isolationLevel?: IsolationLevel): Promise<void>; | ||
commitTransaction(): Promise<void>; | ||
rollbackTransaction(): Promise<void>; | ||
private getConnection; | ||
private assertConnected; | ||
execute<U>(query: Query<U>): Promise<IRecordSet<U>>; | ||
execute<U>(work: (connection: MsSql.Connection) => IRecordSet<U> | PromiseLike<IRecordSet<U>>): Promise<IRecordSet<U>>; | ||
private getIsolationLevel; | ||
static getIsolationLevel(isolationLevel: IsolationLevel): MsSql.IIsolationLevel; | ||
private delay; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.