Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sql-schema-connector): wasm-compatible sql-schema-connector #5126

Merged
merged 9 commits into from
Jan 16, 2025

Conversation

jkomyno
Copy link
Contributor

@jkomyno jkomyno commented Jan 15, 2025

This PR:

  • Closes ORM-458
  • Introduces new compile-time flags in sql-schema-connector
  • Leaves schema-engine-cli's functionality and the related tests (which use native Rust drivers) untouched
  • Allows wasm compilation via the sqlite feature
    cargo build -p sql-schema-connector --features sqlite --target wasm32-unknown-unknown
  • Allows wasm compilation via the mysql feature
    cargo build -p sql-schema-connector --features mysql --target wasm32-unknown-unknown
  • Allows wasm compilation via the mssql feature
    cargo build -p sql-schema-connector --features mssql --target wasm32-unknown-unknown
  • Allows wasm compilation via the postgresql feature
    cargo build -p sql-schema-connector --features postgres --target wasm32-unknown-unknown
  • Allows wasm compilation via the cockroachdb feature
    cargo build -p sql-schema-connector --features cockroachdb --target wasm32-unknown-unknown
  • Exposes a new constructor for external Driver Adapters, to be used in core
  • Implement sql_schema_connector::flavour::SqlFlavour trait for quaint::connector::ExternalConnector wrappers:

@jkomyno jkomyno requested a review from a team as a code owner January 15, 2025 12:04
@jkomyno jkomyno requested review from wmadden and removed request for a team January 15, 2025 12:04
Copy link
Contributor

github-actions bot commented Jan 15, 2025

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.107MiB 2.098MiB 9.377KiB
Postgres (gzip) 845.262KiB 843.000KiB 2.263KiB
Mysql 2.067MiB 2.059MiB 7.776KiB
Mysql (gzip) 830.900KiB 828.996KiB 1.905KiB
Sqlite 1.978MiB 1.974MiB 4.162KiB
Sqlite (gzip) 793.611KiB 793.584KiB 28.000B

Copy link

codspeed-hq bot commented Jan 15, 2025

CodSpeed Performance Report

Merging #5126 will not alter performance

Comparing feat/sql-schema-connector-wasm (d5f8fd0) with main (c164b5d)

Summary

✅ 11 untouched benchmarks

@jkomyno jkomyno removed the request for review from wmadden January 15, 2025 13:20
Copy link
Contributor

@jacek-prisma jacek-prisma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one thing I am worrying about is that we might end up with drift between the driver adapters and the native driver SqlFlavour, when I look at the existing SqlFlavour for native drivers it seems we should be able to re-use most of it (but not an issue yet)

@jkomyno jkomyno merged commit 2b21c24 into main Jan 16, 2025
367 of 368 checks passed
@jkomyno jkomyno deleted the feat/sql-schema-connector-wasm branch January 16, 2025 18:18
aqrln added a commit that referenced this pull request Jan 17, 2025
Publishing the engines fails on `main` at the `lld` output verification
step starting with 2b21c24 because
#5126 changed the schema
engine to statically link OpenSSL. This commit fixes this.
aqrln added a commit that referenced this pull request Jan 17, 2025
Publishing the engines fails on `main` at the `ldd` output verification
step starting with 2b21c24 because
#5126 changed the schema
engine to statically link OpenSSL. This commit fixes this.
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.

2 participants