Skip to content

Clarify the join situation for sea-orm #237

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

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/compare_diesel.md
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ All listed crates expose an API that just let's you pass in string and a number

For the `tokio-postgres`, `rusqlite` and `mysql` crate this is simple to answer as the safest API is at the same time the API that lets you pass in a string and an number of bind values. So by definition it can execute any SQL query.

For `sea-orm` this API is their query builder, which obviously restricts the amount of supported queries by that DSL. At the time of writing this covers most common SQL functionality supported by PostgreSQL, SQLite and MySQL, which excludes most database specific features like for json operators or other functionality for database specific types. Notably it currently excludes the possiblity to join more than 3 tables at the same time. Crucially `sea-orm` also does not offer any extension points to extend their built-in DSL so you can bring your own drop in replacement for missing functionality. It is possible to write dynamic queries using the exposed query builder.
For `sea-orm` this API is their query builder, which obviously restricts the amount of supported queries by that DSL. At the time of writing this covers most common SQL functionality supported by PostgreSQL, SQLite and MySQL, which excludes most database specific features like for json operators or other functionality for database specific types. Notably it currently excludes the possibility to join more than 3 tables at the same time using their model based API. It's possible to express such joins using their query builder instead. Crucially `sea-orm` also does not offer any extension points to extend their built-in DSL so you can bring your own drop in replacement for missing functionality. It is possible to write dynamic queries using the exposed query builder.

`sqlx` allows you to express any at **compile time statically known** query via their macros. On the one hand this covers a large amount of possible SQL queries, on the other hand this excludes any query that might possibly on runtime information. This includes the following possible queries: