Files
metabuilder/dbal
johndoe6345789 ce7b395d17 fix: Update Prisma schema to Prisma 7 format and add config
CHANGES:
- Removed datasource url from schema (Prisma 7 incompatibility)
- Schema lives at /dbal/shared/prisma/schema.prisma
- Database URL will be provided via environment variable at runtime
- Created .env.local for development (file:./prisma/dev.db)
- Prisma client will create/initialize database on first connection

NOTE: Prisma 7 CLI doesn't support db:push without URL in schema OR config.
The solution is to let the PrismaClient adapter create the database on first connection.

For local development: DATABASE_URL="file:./dbal/development/prisma/dev.db"
For tests: DATABASE_URL="file::memory:" or environment-specific config

Database will be automatically initialized when:
1. getDBALClient() is called with environment config
2. PrismaClient adapter connects to the URL
3. Tables are created from schema on first access

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-15 02:41:30 +00:00
..

DBAL - Database Abstraction Layer

A language-agnostic database abstraction layer that provides a secure interface between client applications and database backends.

Structure

dbal/
├── development/     # TypeScript implementation (fast iteration)
├── production/      # C++ implementation (security & performance)
├── shared/          # Shared resources (API specs, tools, etc.)
└── docs/            # Documentation

Development

TypeScript (Development)

cd development
npm install
npm run build
npm test

C++ (Production)

cd production
# See production/docs/ for C++ build instructions

Shared Resources

  • API Schemas: shared/api/schema/
  • Tools: shared/tools/ (codegen, build assistant)
  • Scripts: shared/scripts/ (build, test)

License

MIT - See LICENSE file.