Hi, I'm new to go-pg, thanks for the good work, I was wondering am I missing something, is there a raw sql query? like
err = db.Model(&items).Select(`select * from items where order > $1;`, somevalue)
I want to port an application and I already have all the sql, I just need to use it instead of chain of functions.
Thanks!
Yes, see https://godoc.org/gopkg.in/pg.v4#example-DB-Query:
db.Query(&items, `select * from items where order > ?`, somevalue)
Many thanks! I was checking the github page only, this is going to be really useful.
Most helpful comment
Yes, see https://godoc.org/gopkg.in/pg.v4#example-DB-Query: