import {Client} from "pg"
import {UsersTable, UsersTableImpl} from "./users.js"

export interface Database {
    readonly users: UsersTable
}

export class DatabaseImpl implements Database {
    readonly users: UsersTableImpl
    private readonly _query: Client["query"]

    constructor(query: Client["query"]) {
        this._query = query
        this.users = new UsersTableImpl(this._query)
    }
}