/** * Prisma 7 Database Adapter Configuration * * This module provides a centralized, maintainable configuration for all * supported database adapters in Prisma ORM 7. Each adapter configuration * includes the necessary packages, import statements, and initialization code. */ export interface AdapterConfig { /** The provider name used in Prisma schema datasource block */ provider: string; /** Display name for user-facing messages */ displayName: string; /** npm package name for the Prisma adapter */ adapterPackage: string; /** npm package name for the underlying database driver */ driverPackage: string; /** Version of the adapter package */ adapterVersion: string; /** Version of the driver package */ driverVersion: string; /** Named export from the adapter package (e.g., 'PrismaPg') */ adapterClassName: string; /** Import statement for the adapter */ getAdapterImport: () => string; /** Import statement for the driver (if needed separately) */ getDriverImport?: () => string; /** Generate the adapter initialization code */ generateAdapterCode: (connectionString: string) => string; /** Parse connection string to extract config (optional) */ parseConnectionString?: (url: string) => Record; } /** * PostgreSQL Adapter Configuration * Uses the @prisma/adapter-pg with the 'pg' driver */ export declare const postgresqlAdapter: AdapterConfig; /** * MySQL/MariaDB Adapter Configuration * Uses the @prisma/adapter-mariadb with the 'mariadb' driver */ export declare const mysqlAdapter: AdapterConfig; /** * SQLite Adapter Configuration * Uses the @prisma/adapter-better-sqlite3 with the 'better-sqlite3' driver */ export declare const sqliteAdapter: AdapterConfig; /** * SQL Server Adapter Configuration * Uses the @prisma/adapter-mssql with the 'mssql' driver */ export declare const sqlServerAdapter: AdapterConfig; /** * CockroachDB Adapter Configuration * Uses PostgreSQL wire protocol with @prisma/adapter-pg */ export declare const cockroachdbAdapter: AdapterConfig; /** * Registry of all supported database adapters * Maps provider names to their configurations */ export declare const ADAPTER_REGISTRY: Record; /** * Get adapter configuration by provider name * @param provider - The database provider name (e.g., 'postgresql', 'mysql') * @returns The adapter configuration or undefined if not found */ export declare function getAdapterConfig(provider: string): AdapterConfig | undefined; /** * Get all unique adapter packages (for dependency installation) * @returns Array of objects with package name and version */ export declare function getAllAdapterPackages(): Array<{ name: string; version: string; }>; /** * Get adapter and driver packages for a specific provider * @param provider - The database provider name * @returns Array of package objects or empty array if provider not found */ export declare function getAdapterPackagesForProvider(provider: string): Array<{ name: string; version: string; }>; /** * Check if a provider is supported * @param provider - The database provider name * @returns True if the provider has an adapter configuration */ export declare function isProviderSupported(provider: string): boolean; /** * Get list of all supported provider names * @returns Array of supported provider names */ export declare function getSupportedProviders(): string[]; //# sourceMappingURL=prisma-adapters.d.ts.map