Hi Bhavesh,

I am also not a fan of ORMs, but I am a big fan of sqlc so I will 2nd Brian 
Candler's recommendation. 

Sqlc is one of the few Go packages/tools I consider a must-use for any of my 
projects that need to interact with SQL databases.

-Mike

> On Dec 19, 2024, at 8:23 AM, 'Brian Candler' via golang-nuts 
> <golang-nuts@googlegroups.com> wrote:
> 
> I am not a fan of ORMs. Application performance problems are usually down to 
> poorly formed SQL queries (and/or lack of supporting indexes), which ORMs can 
> mask or amplify.
> 
> For an alternative approach, have a look at https://github.com/sqlc-dev/sqlc 
> <https://github.com/sqlc-dev/sqlc>
> 
> In short, you write the set of SQL queries to meet your application's needs, 
> and then they get automatically wrapped in idiomatic Go.
> 
> For joins, see: https://docs.sqlc.dev/en/stable/howto/embedding.html 
> <https://docs.sqlc.dev/en/stable/howto/embedding.html>
> 
> Refs:
> https://conroy.org/introducing-sqlc <https://conroy.org/introducing-sqlc>
> https://sqlc.dev/ <https://sqlc.dev/>
> https://play.sqlc.dev/ <https://play.sqlc.dev/>
> https://alanilling.com/exiting-the-vietnam-of-programming-our-journey-in-dropping-the-orm-in-golang-3ce7dff24a0f
>  
> <https://alanilling.com/exiting-the-vietnam-of-programming-our-journey-in-dropping-the-orm-in-golang-3ce7dff24a0f>
> 
> On Thursday, 19 December 2024 at 13:01:25 UTC Bhavesh Kothari wrote:
> I read few posts regarding ORMs in golang & realized, few peoples are not 
> happy with it.
> 
> They mentioned to use raw queries with our own wrapper if want to make few 
> things reusable.
> 
> I was actually using Gorm, which was super slow, then I started research 
> regarding performance efficient ORMs, and found Bun which was indeed faster 
> compared to Gorm. But then I explored documentation more and realized it 
> doesn't provide enough function to make life easier, this ORM even doesn't 
> have community I felt.
> 
> 1. I want to know readers view regarding ORMs in Go.
> 
> Let me tell you something, my project is a huge project, and I decided to use 
> Golang for better performance. But now I feel I've to write a lot of code and 
> slow/less-featured ORMs here making me irritated.
> 
> 2. What do you guys suggest is go really good for large projects?
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com 
> <mailto:golang-nuts+unsubscr...@googlegroups.com>.
> To view this discussion visit 
> https://groups.google.com/d/msgid/golang-nuts/6addef83-3e2d-4b6c-b543-8127f5754f0en%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/golang-nuts/6addef83-3e2d-4b6c-b543-8127f5754f0en%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/C487B8AE-D8EF-47AE-A06C-48AC422DFD07%40newclarity.net.

Reply via email to