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

Support PostgreSQL #35

Closed
bitfl0wer opened this issue Aug 2, 2024 · 2 comments
Closed

Support PostgreSQL #35

bitfl0wer opened this issue Aug 2, 2024 · 2 comments
Assignees

Comments

@bitfl0wer
Copy link
Member

A sizeable amount of sysadmins prefer PostgreSQL over MySQL/MariaDB. As such, Postgres should be supported in symfonia as well. This could be accommodated for by using the sqlx::Any trait instead of sqlx::MySql throughout the codebase.

Changes are being made in chorus to support sqlx::Any, as well as updating sqlx to version 0.8.0.

@bitfl0wer
Copy link
Member Author

bitfl0wer commented Aug 14, 2024

Going forward, the supported Database flavor will be PostgreSQL. Supporting many different SQL flavors is nice, but taking full advantage of the features one SQL flavor has to offer is better, in my opinion. "A Jack of all trades is a master of none", and so on.

Issues that remain here are:

  • Removing nested structs which are Json<T> in favor of foreign keys/breaking out everything into its own tables, where it makes sense.
  • Related to above: Rewrite CREATE TABLE statements as well as query!() calls to query nested struct tables as well, where it makes sense.
  • Support unsigned integers in PostgreSQL by either using #[sqlx(try_from = sqlx::types::Decimal)] or by creating wrapper types which translate Rusts unsigned integers into Postgres' DECIMAL/NUMERIC types while guaranteeing that the DECKMAL/NUMERIC loaded from a table is not out of bounds for the selected integer size

@bitfl0wer bitfl0wer changed the title Support PostgreSQL, use sqlx::Any if possible Support PostgreSQL Aug 14, 2024
@bitfl0wer bitfl0wer self-assigned this Aug 14, 2024
@bitfl0wer
Copy link
Member Author

Initial support for PostgreSQL has been merged in #39. Further steps are documented in #40

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

No branches or pull requests

1 participant