Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can you please explain what you found weird? I just started using sea-query and haven't found anything super odd quite yet, but I've only written a few migrations and queries so far


Namely, it comes from their query builder's API choices. For example, from SeaQuery's README:

```

use sea_query::*;

// For example Character table with column id, character, font_size... pub enum Character { Table, Id, FontId, FontSize, }

// Mapping between Enum variant and its corresponding string value impl Iden for Character { fn unquoted(&self, s: &mut dyn std::fmt::Write) { write!( s, "{}", match self { Self::Table => "character", Self::Id => "id", Self::FontId => "font_id", Self::FontSize => "font_size", } ) .unwrap(); } }

```

The idea that the `Table` is part of the `enum` is an odd choice to me. The `Iden` trait also has an odd shape and use to me, as well.

In theory, the API for SeaORM is something I like, but in practice it feels off and stilted. Still a really cool project and I hope things improve over time, but Rust is going through a lot of growing pains around ORMs and database access.


I can say a word or two about sea-query.

I've used it for 3-4 months in a lot of my projects. For very basic queries it worked very well and I liked it quite a bit, but as soon as I had to do something a little less standard that's where I started to see the issues.

Documentation is not really there yet and I ended up loosing tons of time trying to look for the right function in the crate that would translate in the query I had to make. I've blogged about that too if you're interested [0] (TLDR: I got back to using raw SQL)

[0]: https://mattrighetti.com/2025/01/14/ditching-sea-query




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: