DbConfig<S>: {
    type: S;
} & (S extends "pg" | "kysely"
    ? DbBaseConfig & {
        readReplica?: DbBaseConfig;
    }
    : unknown) & (S extends "dynamo"
    ? {
        connectionTimeout?: number;
        maxAttempts?: number;
        region: string;
        tableName: string;
    }
    : unknown)

Defines the configuration options for different types of databases.

Type Parameters

  • S extends DatabaseType

    The type of database (e.g., 'dynamo', 'pg', 'kysely')