mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-01 01:05:00 +00:00
docs: dbal,refactored,client (2 files)
This commit is contained in:
@@ -52,6 +52,8 @@ A language-agnostic database abstraction layer that provides a secure interface
|
||||
|
||||
The Prisma adapter behind DBAL already targets the databases you care about: PostgreSQL, MySQL, SQLite, and any other engine Prisma supports (SQL Server, CockroachDB, MongoDB, etc.). Switch between them by pointing `DATABASE_URL` at the desired backend and regenerating the Prisma client for your schema.
|
||||
|
||||
You can also set `config.adapter` to `'postgres'` or `'mysql'` when configuring the TypeScript client—those values are currently aliases for the Prisma adapter so the rest of the stack still handles dialect differences, connection pooling, and migrations via Prisma.
|
||||
|
||||
```bash
|
||||
# PostgreSQL
|
||||
export DATABASE_URL="postgresql://user:pass@db:5432/metabuilder"
|
||||
|
||||
@@ -32,6 +32,8 @@ const createAdapter = (config: DBALConfig): DBALAdapter => {
|
||||
} else {
|
||||
switch (config.adapter) {
|
||||
case 'prisma':
|
||||
case 'postgres':
|
||||
case 'mysql':
|
||||
baseAdapter = new PrismaAdapter(
|
||||
config.database?.url,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user