Postgres Composite Types #1816
Closed
wyatt-herkamp
started this conversation in
Ideas
Replies: 1 comment
-
|
Converted to issue #2895 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Support for Postgres Composite Types
As a note. I do not know a lot about databases. I am just starting to move my own projects from Mysql to Postgres due to its wide range of features.
Motivation
Using JSON for complex types is great because it allows for more compatibility for Mysql, Sqlite, and Postgres. However, if you are working on something that is Postgres only using the natively supported Composite Type would be a lot cleaner and nicer.
Proposed Solutions
Macro
A macro to auto implement any needed traits to do a composite type
Traits That need to be implemeneted
FromValue
TryGetable
Other Changes
sea_orm::Value will also need a new Row type I think
This will also need any code needed to generate the Postgres Statement to make the type.
Documentation
We will also need to provide documenation on building composite types.
Current Workarounds
Using Json or using a seperate table.
Beta Was this translation helpful? Give feedback.
All reactions