Skip to content

Commit

Permalink
Adding release files
Browse files Browse the repository at this point in the history
  • Loading branch information
24SevenOffice committed Mar 12, 2018
1 parent 3dfa440 commit 3884473
Show file tree
Hide file tree
Showing 23 changed files with 923 additions and 56 deletions.
55 changes: 0 additions & 55 deletions .gitignore

This file was deleted.

25 changes: 25 additions & 0 deletions lib/db/connection.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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 _connectionString;
private _connection;
private _transaction;
private _rolledback;
constructor(connectionString: MsSql.config | PromiseLike<MsSql.config>);
close(): Promise<void>;
beginTransaction(isolationLevel?: IsolationLevel): Promise<void>;
commitTransaction(): Promise<void>;
rollbackTransaction(): Promise<void>;
execute<U>(query: Query<U>): Promise<IRecordSet<U>>;
execute<U>(work: (connection: MsSql.ConnectionPool) => IRecordSet<U> | PromiseLike<IRecordSet<U>>): Promise<IRecordSet<U>>;
private getIsolationLevel(isolationLevel);
private delay(ms);
}
139 changes: 139 additions & 0 deletions lib/db/connection.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/db/connection.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions lib/db/queryrecordset.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as MsSql from 'mssql';
import { Query } from 'tfso-repository/lib/repository/db/query';
import { RecordSet } from 'tfso-repository/lib/repository/db/recordset';
export declare abstract class QueryRecordSet<TEntity> extends Query<TEntity> {
private _connection;
private _transaction;
constructor(connection?: MsSql.ConnectionPool | MsSql.Transaction);
connection: MsSql.Transaction | MsSql.ConnectionPool;
protected readonly readLock: boolean;
protected input(name: string, value: any): void;
protected input(name: string, type: any, value: any): void;
protected createRequest(connection?: MsSql.ConnectionPool): MsSql.Request;
protected createRequest(transaction?: MsSql.Transaction): MsSql.Request;
protected executeQuery(): Promise<RecordSet<TEntity>>;
protected abstract transform(record: any): TEntity;
}
export default QueryRecordSet;
export { RecordSet };
Loading

0 comments on commit 3884473

Please sign in to comment.