import { DatabaseTransaction } from './DatabaseTransaction.js' import { DbConfig } from './types.js' /** * Abstract class representing a Database with a generic type extending DatabaseTransaction. * @template T - The type of DatabaseTransaction to be used. */ export abstract class Database { /** * Constructor for a class that takes in a database configuration object. * @param {DbConfig} config - The database configuration object. * @returns None */ protected constructor(public readonly config: DbConfig) {} /** * Represents an abstract method for a transaction that returns a Promise of type T. * This method needs to be implemented by subclasses. * @returns A Promise that resolves to a value of type T. */ public abstract transaction(): Promise }