@randombenj/db
Version:
Display, search and copy LXD-images using a web interface.
20 lines (19 loc) • 591 B
TypeScript
import { Connection, Repository } from 'typeorm';
export declare class DatabaseService {
connection: Connection;
/**
* Initializes the database service
* @param connection The connection, which gets injected
*/
constructor(connection: Connection);
/**
* Returns the repository of the given entity
* @param entity The database entity to get the repository from
*/
getRepository(entity: any): Promise<Repository<unknown>>;
/**
* Closes the current connection, if it is
* connected
*/
closeConnection(): Promise<void>;
}