UNPKG

@tmlmobilidade/connectors

Version:

This package provides pre-made database connectors to streamline development and reduce boilerplate. By using these connectors, you can avoid re-implementing controller classes every time, ensuring consistency and saving development time.

18 lines (17 loc) 413 B
import { type ClientConfig } from 'pg'; export interface PostgresConfig { options?: ClientConfig; uri: string; } export declare class PostgresConnector { private client; constructor(config: PostgresConfig); /** * Connects to the PostgreSQL database. */ connect(): Promise<void>; /** * Disconnects from the PostgreSQL database. */ disconnect(): Promise<void>; }