Skip to content

feat: rebuild Dart ORM with standalone typed layers and native drivers - #485

Merged
medz merged 66 commits into
mainfrom
refactor/standalone-orm
Sep 19, 2026
Merged

medz merged 66 commits into
mainfrom
refactor/standalone-orm

Conversation

@medz

@medz medz commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

What changes

Replaces the retired Prisma-engine implementation with one native Dart 3.13 product package. Applications declare immutable Dart classes once; generated CRUD returns those classes, while typed selections and relationships retain explicit result shapes and query counts.

  • Independently usable values, schema metadata, driver contracts, raw sessions, SQL construction, ORM execution, migrations and tooling libraries, with import-boundary tests.
  • SQLite (native worker and browser worker), PostgreSQL, MySQL and MariaDB adapters with explicit connection ownership and capabilities.
  • Static Dart snapshots and single-engine migration histories, reviewed fingerprints, explicit renames, catalog verification, recovery checkpoints and resumable backfills.
  • Typed orm.config.dart plus offline init / generate / migration creation, human output by default and explicit JSON reports.
  • Unified SQLite assets for Dart Web and Flutter Web; native Flutter upgrade/reopen acceptance and examples.

Important

This is an intentionally breaking development restart. There is no compatibility reader for previous JSON histories or Prisma APIs, and no package publication is included. MySQL/MariaDB DDL is non-atomic; unsupported exact Decimal operations, streaming and cancellation are rejected explicitly. SQLite cancellation/deadlines and bounded retries depend on the native asset: the default Linux sqlite3 3.6.0 build does not export interruption and rejects those operations before SQL. See docs/mysql.md, docs/mysql-migrations.md and docs/capabilities.md.

Validation

  • Final CI run passes on 78dcf149dda92aca804666a0efa5cb7e380e582a: 1141 native tests passed, 41 explicit capability skips, with real SQLite, PostgreSQL 18, MySQL 8.4 and MariaDB 11.8. Formatting, analysis and committed Web asset integrity also pass.
  • Chrome JS and WASM each pass 21 scenarios in their independent Linux CI job, including clean runner exit.
  • Codex reviewed this exact head and found no major issues. Earlier PostgreSQL PID-discovery deadlines and MySQL/MariaDB per-statement timeout findings are fixed; all review threads are resolved.
  • Local Flutter Web release JS, WASM without isolation and WASM with isolation each pass 21 scenarios. Android API 35 arm64 debug install / AOT release upgrade / independent process restart pass 4/17/11 checks, with persisted rows/history, distinct process IDs and native-only APK assets.
  • research/validation/standalone-redesign.md and its structured reports retain exact platform source revisions, corrected earlier failures and platform limitations. Default Linux SQLite interruption remains unavailable; unsupported requests are explicitly rejected and only capability-dependent cases are skipped. Safari, Firefox, physical devices and Apple Flutter platforms are not certified.
  • netlify.toml skips the retired VitePress build for this package-only repository, preserving the existing published site. No replacement website or package publication is included.

Source-grounded design decisions and engine-specific boundaries are documented in research/standalone-orm-redesign.md, research/prisma-v8-reassessment.md and research/mysql-precision-boundaries.md.

Review scope

The PR includes the earlier local implementation history as well as the final standalone-layer redesign. Public entrypoints are in lib/; session correctness is in lib/src/runtime/, query compilation in lib/src/, schema generation in lib/src/generate/, and migration recovery in lib/src/migrate/. Generated fixtures and hashed SQLite Web resources are checked in for reproducibility.

Refs #479
Refs #482

These issues remain open: their earlier proposals include other schema approaches and SQL Server, outside this accepted implementation scope.

medz added 30 commits September 15, 2026 00:15
@medz
medz deleted the refactor/standalone-orm branch September 20, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant