Last 2 years I've been using Go (instead of Python), even for webpages & apis. I'm actually considering going back to Python(for webpages and apis) because dealing with database in Go is really ugly. Currently available orms are nowhere near as useful as sqlAlchemy or django orm :(
Glad to hear i'm not alone in that case. I actually think someone should blog about this, because i've got the suspicion that the "moving to go is fantastic" feeling we get from blog posts suffers from a survivorship bias.
Word! Flask and the flask-sqlalchemy extension are a dreamteam that i wouldn't want to miss anymore. Golang might perform 10x better, but i'd choose the faster development cycle and comfort of Flask at any given day.
It might be the problems I solve, or the way I think about them, but I think it's about 50/50 whether the ORM is helpful or in the way. Very often I just want the ORM to go away because I know what I'm doing and the ORM doesn't
I do like sqlx, it seems to hit a balance that works for me. I get to write the SQL and structs come out.
i recently starting experimenting with moving from python to go and for fun (for web development) and was surprised at the current available options for ORMs. even established frameworks like Revel seem like they are suggesting using raw sql queries still:
same reason i gave up on the idea of using ocaml for crud apps, even though i love it for most other applications. it's really annoying to have to manually manipulate database rows via raw lists of strings :(
Oh thank god. Go is bearable in most areas, but the template system makes me weep. Is there any particular reason the string concatenation doesn't work? Seems special enough to be specialcased ;)
You can use {{print .foo.bar "string"}} and {{printf "%sstring" .foo.bar}} to concat strings in golang template, or even simpler way: {{.foo.bar}}{{"string"}}.
[+] [-] Goranek|10 years ago|reply
[+] [-] bsaul|10 years ago|reply
[+] [-] alberth|10 years ago|reply
Am I alone when I say that I still hand code SQL into my applications?
Regardless of what web framework I'm using (e.g. Pylons/Rails/Django/etc), I still hand code SQL statement in my applications.
I've had far to many times ORMs unexpectedly nuke performance and have other issues than what's it's worth gaining by using an ORM.
[+] [-] sauere|10 years ago|reply
[+] [-] mrweasel|10 years ago|reply
I do like sqlx, it seems to hit a balance that works for me. I get to write the SQL and structs come out.
[+] [-] lbotos|10 years ago|reply
[+] [-] tapirl|10 years ago|reply
You know, I always feel ORM is a fix to SQL.
[+] [-] misiti3780|10 years ago|reply
https://revel.github.io/manual/database.html
this is golang's Django i believe ?
[+] [-] zem|10 years ago|reply
[+] [-] grey-area|10 years ago|reply
[+] [-] Scarbutt|10 years ago|reply
[+] [-] davexunit|10 years ago|reply
[+] [-] jamespo|10 years ago|reply
[+] [-] unknown|10 years ago|reply
[deleted]
[+] [-] fidget|10 years ago|reply
[+] [-] tapirl|10 years ago|reply