UNPKG

es-entity

Version:

ORM framework for Node js based on Ecmascript 6 and Typescript.

31 lines 754 B
export default class Connection { handler; conn = null; constructor(handler, conn) { this.handler = handler; this.conn = conn; } get Handler() { return this.handler; } async run(query) { return this.handler.run(query, this.conn); } stream(query) { return this.handler.stream(query, this.conn); } async initTransaction() { await this.handler.initTransaction(this.conn); } async commit() { await this.handler.commit(this.conn); } async rollback() { await this.handler.rollback(this.conn); } async close() { await this.handler.close(this.conn); this.conn = null; } } //# sourceMappingURL=Connection.js.map