Re:Back to basics: Writing an application using Go and Postg...
by piyh on Monday November 22, 2021 @10:10PM
(#29314202)
I wrote a django app using postgres full text search. I ended up going with direct sql calls for anything more than a single record get because of all the specialized syntax. It's nice to keep stuff like new record creation clean, but once you get more than one join deep it's time to break out the best domain specific language ever created.
Re:Back to basics: Writing an application using Go and Postg...
by dboreham on Monday November 22, 2021 @10:45PM
(#29314369)
ORM selling point: you can bypass it.
Re:Back to basics: Writing an application using Go and Postg...
by davidw on Tuesday November 23, 2021 @11:31AM
(#29319785)
Well, sure. It makes it easy to do simple stuff and gets out of the way when you want to bypass it rather than being from the "sorry Dave, I can't let you do that" school of interface design.
I think you're doing it wrong if you end up doing really complex queries in your ORM. It's kind of a judgement call, but at a certain point, you need to switch over to SQL. Good ORM's let you do that without too much hassle.