Skip to content

Commit

Permalink
Adding release files
Browse files Browse the repository at this point in the history
  • Loading branch information
24SevenOffice committed Feb 14, 2018
1 parent 2ffdfca commit 33304bb
Show file tree
Hide file tree
Showing 23 changed files with 887 additions and 64 deletions.
54 changes: 0 additions & 54 deletions .gitignore

This file was deleted.

14 changes: 14 additions & 0 deletions lib/db/connection.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as MySql from 'mysql';
import { IRecordSet } from 'tfso-repository/lib/repository/db/recordset';
import { QueryRecordSet } from './queryrecordset';
import { QueryStream } from './querystream';
export default class Connection {
private _connectionString;
constructor(connectionString: MySql.ConnectionConfig | PromiseLike<MySql.ConnectionConfig>);
beginTransaction(): Promise<void>;
commitTransaction(): Promise<void>;
rollbackTransaction(): Promise<void>;
execute<U>(query: QueryRecordSet<U>): Promise<IRecordSet<U>>;
execute<U>(query: QueryStream<U>): Promise<IRecordSet<U>>;
execute<U>(work: (connection: MySql.Connection) => IRecordSet<U> | PromiseLike<IRecordSet<U>>): Promise<IRecordSet<U>>;
}
50 changes: 50 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.

15 changes: 15 additions & 0 deletions lib/db/queryrecordset.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import * as MySql from 'mysql';
import { Query } from 'tfso-repository/lib/repository/db/query';
import { IRecordSet, RecordSet } from 'tfso-repository/lib/repository/db/recordset';
export declare abstract class QueryRecordSet<TEntity> extends Query<TEntity> {
private _connection;
constructor(connection?: MySql.Connection);
connection: MySql.Connection;
protected input(name: string, value: any): void;
protected input(name: string, type: any, value: any): void;
protected createConnection(): MySql.Connection;
protected executeQuery(): Promise<IRecordSet<TEntity>>;
protected abstract transform(record: any): TEntity;
}
export default QueryRecordSet;
export { RecordSet };
95 changes: 95 additions & 0 deletions lib/db/queryrecordset.js

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

Loading

0 comments on commit 33304bb

Please sign in to comment.