Skip to content

Replace SQLx with native database drivers#1293

Draft
lovasoa wants to merge 3 commits into
mainfrom
sqlpage-nativedrivers
Draft

Replace SQLx with native database drivers#1293
lovasoa wants to merge 3 commits into
mainfrom
sqlpage-nativedrivers

Conversation

@lovasoa
Copy link
Copy Markdown
Collaborator

@lovasoa lovasoa commented May 31, 2026

Summary

This draft tracks the migration from SQLx to SQLPage-owned native database drivers.

Current branch state starts by switching dependency declarations toward native driver crates. Follow-up commits will add the internal driver abstraction, migrate query execution, migrations, DB filesystem, CSV import, telemetry, and tests.

Validation

Not run yet. This PR is intentionally opened early and will be updated as implementation progresses.

Copy link
Copy Markdown
Collaborator Author

lovasoa commented May 31, 2026

Progress update: pushed b4e1beec with the first working native database abstraction checkpoint.

Current state:

  • SQLx production imports are replaced by SQLPage-owned DbPool / DbConnection / DbRow types.
  • SQLite is implemented through tokio-rusqlite.
  • Query execution, migrations, database filesystem, CSV fallback import, telemetry, and HTTP pool timeout handling now compile against the new API.
  • cargo check passes.

Next: run/update all-target tests, fix test imports, then continue filling non-SQLite native adapters.

Copy link
Copy Markdown
Collaborator Author

lovasoa commented May 31, 2026

Progress update on the native-driver PR:

  • Pushed 03702281 to sqlpage-nativedrivers.
  • Preserved SQLite's streaming behavior with a dedicated execute_stream path over rusqlite rows and a bounded channel for backpressure.
  • Added a regression test proving SQLite yields the first row before a later slow row has finished computing.
  • Fixed typed migration metadata parameters for stricter backends and cleaned up clippy findings.
  • Split the independent example-app smoke testing work out of this branch; a subagent is preparing a separate PR based on main for that.

Validation on this branch:

  • cargo fmt --all
  • cargo test
  • cargo clippy --all-targets --all-features -- -D warnings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant