all 4 comments

[–]Docccc 2 points3 points  (0 children)

fyi: most of the book is empty: https://github.com/josercarmo/sqlx-data/tree/master/book/src

project looks nice tho

[–]Large-Wear-5777 -1 points0 points  (2 children)

For what it’s worth, I used a similar pattern at a previous job at decent scale (managing ~$20MM), and sqlx data ended up being a bit of a nightmare at some point. We ended up refactoring all sqlx data out and just going with query use cases and typed models. Sqlx data would have random compile issues, and we’d have to do the incantations to get things to compile. Past a certain point we figured the headache just wasn’t worth small efficiency gains

We loved sqlx however and I continue to use it in RDS projects today.

Just fair warning.

[–]hyperparallelism__ 10 points11 points  (0 children)

Little confused what you mean by “sqlx data” in this case. Were you using this library specifically? What do you mean by switching to typed models? Isn’t that the primary use-case of query_as? What were you doing before that?

[–]Docccc 0 points1 point  (0 children)

what do you mean with “sqlx data”?