@piggly/ddd-toolkit
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -5,3 +5,3 @@ /** | ||
*/ | ||
export default abstract class DatabaseContext<Connection> { | ||
export default abstract class DatabaseContext { | ||
/** | ||
@@ -20,3 +20,3 @@ * Get the context of the database. | ||
*/ | ||
abstract context<Context = Connection>(): Context; | ||
abstract context<Context>(type: any): Context; | ||
/** | ||
@@ -46,2 +46,13 @@ * Close current context. | ||
abstract quit(): Promise<void>; | ||
/** | ||
* Check if the connection is active. | ||
* | ||
* @returns {boolean} | ||
* @public | ||
* @abstract | ||
* @memberof DatabaseContext | ||
* @since 1.0.1 | ||
* @author Caique Araujo <caique@piggly.com.br> | ||
*/ | ||
abstract isActive(): boolean; | ||
} |
@@ -21,3 +21,3 @@ import { PaginateQuery } from '../types'; | ||
*/ | ||
protected _context: DatabaseContext<any>; | ||
protected _context: DatabaseContext; | ||
/** | ||
@@ -33,3 +33,3 @@ * Constructor. | ||
*/ | ||
constructor(context: DatabaseContext<any>); | ||
constructor(context: DatabaseContext); | ||
/** | ||
@@ -36,0 +36,0 @@ * Find an entity by its id. |
@@ -17,3 +17,3 @@ import DatabaseContext from './DatabaseContext'; | ||
*/ | ||
protected _context: DatabaseContext<any>; | ||
protected _context: DatabaseContext; | ||
/** | ||
@@ -41,3 +41,3 @@ * A map of repositories. | ||
*/ | ||
constructor(context: DatabaseContext<any>); | ||
constructor(context: DatabaseContext); | ||
/** | ||
@@ -44,0 +44,0 @@ * Get a repository by its name. |
@@ -5,3 +5,3 @@ /** | ||
*/ | ||
export default abstract class DatabaseContext<Connection> { | ||
export default abstract class DatabaseContext { | ||
/** | ||
@@ -20,3 +20,3 @@ * Get the context of the database. | ||
*/ | ||
abstract context<Context = Connection>(): Context; | ||
abstract context<Context>(type: any): Context; | ||
/** | ||
@@ -46,2 +46,13 @@ * Close current context. | ||
abstract quit(): Promise<void>; | ||
/** | ||
* Check if the connection is active. | ||
* | ||
* @returns {boolean} | ||
* @public | ||
* @abstract | ||
* @memberof DatabaseContext | ||
* @since 1.0.1 | ||
* @author Caique Araujo <caique@piggly.com.br> | ||
*/ | ||
abstract isActive(): boolean; | ||
} |
@@ -21,3 +21,3 @@ import { PaginateQuery } from '../types'; | ||
*/ | ||
protected _context: DatabaseContext<any>; | ||
protected _context: DatabaseContext; | ||
/** | ||
@@ -33,3 +33,3 @@ * Constructor. | ||
*/ | ||
constructor(context: DatabaseContext<any>); | ||
constructor(context: DatabaseContext); | ||
/** | ||
@@ -36,0 +36,0 @@ * Find an entity by its id. |
@@ -17,3 +17,3 @@ import DatabaseContext from './DatabaseContext'; | ||
*/ | ||
protected _context: DatabaseContext<any>; | ||
protected _context: DatabaseContext; | ||
/** | ||
@@ -41,3 +41,3 @@ * A map of repositories. | ||
*/ | ||
constructor(context: DatabaseContext<any>); | ||
constructor(context: DatabaseContext); | ||
/** | ||
@@ -44,0 +44,0 @@ * Get a repository by its name. |
{ | ||
"name": "@piggly/ddd-toolkit", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A bunch of tools to use Model-Driven Design and Domain-Driven Design architecture in a back-end application.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
122274
3558