About 3000 LoC changed later and now user data is stored in a database instead of just as JSON in folders #SeaORM
About 3000 LoC changed later and now user data is stored in a database instead of just as JSON in folders #SeaORM
Kudos to the developers of #SeaORM! It's so flexible, feature-rich, efficient and easy to use, I've never had such a great experience with an ORM in any language before. Flexibility is a real game changer. It's mind-blowing how it lets me customize my queries to the finest details while still not having to write raw SQL.
Definitely elevates my #Rust experience.
Here I see that SeaORM is just some added burden. I see no benefit in using it for my project.
You need to learn their API (DSL) to query the database.
It names its stuff "entities" and "models" and you have to come up with another name for your business models.
Extremely difficult to work with relation ships. Even harder if you models have multiple or chained relation ships.
After testing both SeaORM & Tokio Postgres:
With both, you still need to manually write
- junction table
- migrations
- mappings to your useful or complex types/structs.
So basicaly you just get almost raw result from a database that is a SQL table representation that you transform to you business models.
@kicolobo o texto também está um pouco defasado (em 1 ano). Para a área dele, agora existem ferramentas bem maduras como #axum, #tokio, #seaorm e #sqlx.
O problema foi ir no bafo da novidade sem ter mão de obra especializada, coisa que #golang não nessecita (e que como comentamos), que é uma das grandes vantagens da linguagem. Típico tiro no escuro.
I’ve been doing some tests . My goal is to rewrite a #djangorestframework API in #rust.
There are so many web and async frameworks, it’s hard to choose!
Very happy.
Made good progress. web form #CRUD now complete for first db table Song_Books working in #PrayerOfHannah
#RustLang #Axum #SeaOrm
All code on @Codeberg (which I see has been updated to use @forgejo ) at
https://codeberg.org/Dave42W/PrayerOfHannah
#CodeBerg #Forgejo
Ok toasted sandwiches made and all in the freezer.
Now a bit of playing with #PrayerOfHannah using #RustLang
Got all #SeaOrm #Axum etc installed and going to define the first tables in the migration script (table definitions are going to be incredibly unstable for quite a while).
Enjoying a nice coffee too 😃
It has taken me ages but I finally have #SeaOrm migration creating and dropping an index. In the process, I think I have gained a better grasp of working with #RustLang Result
Should be useful when I revisit getting SeaOrm to work cleanly with #Axum StatusCode
All committed in #CodeBerg at https://codeberg.org/Dave42W/daves_dashboard
Ok, in today's #RustLang I have managed to wrap #SeaOrm Update and Delete in transactions. In #Axum I've got Insert, Update and Delete redirecting url's properly.
There are a few cases where I would like to return nice HTTP status codes (such as if another user has deleted the row before your transaction starts).
Struggling to get those different responses to work as I want.