Things to improve upon #36
funlennysub
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
Thanks, this is useful. For context, there was a bunch of discussion related to this post here: https://discord.com/channels/500028886025895936/1300487772301168640. |
Beta Was this translation helpful? Give feedback.
0 replies
-
OT: @funlennysub - Did you write your own driver for Postgres, just wondering and I couldn't find it in the examples. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I always been using sea-orm as my go-to ORM for Rust but as every other project it has some cons and pros. Im making this discussion in hopes of helping toasty have less problems I personally deal with in sea-orm.
Things I like, but can be improved:
Things I don't really like:
FromQueryResult
or an "unstructured tuple", in case of your own struct, you end up defining some fields multiple times which can lead to problems when table definition changes, as of writing this I don't have a solution that can solve this problem, but I hope people reading this might. For example, in the image below the only difference between,Query
schema and that struct, is thequery
field, because in the table it is stored as i64 and linked to a table with all namesThings sea-orm doesn't have but I needed:
COPY
statements, for that I have to add another crate just to execute one query which is just pointless. I also have to convert sea-orm column types intotokio-postgres
', I also have to make sure I didn't make a mistake inCOPY
statement since that crate doesn't know my schema, for that I have my own method that creates that string with all columns from that tableFor now, this seems to be it, but if I remember something else, I will add it here. I think this discussion can be used as a general list of things that can be improved from other ORMs, so feel free to write them down here
Beta Was this translation helpful? Give feedback.
All reactions