Reputation: 137
I'm trying this ORM generator here https://github.com/vattle/sqlboiler
and I'm trying to execute a raw query using boil.SQL which I can see in their documentation. But when I do boil.SQL()., I see that the only methods available are Bind. Is there a way I can execute the query without binding to an object? Because I do not need any results back.
Thanks.
Upvotes: 2
Views: 3369
Reputation: 2413
boil.SQL()
returns a *boil.Query
. You can pass this into boil.ExecQuery()
if you don't care about the results.
q := boil.SQL("execute foo()")
_, err := boil.ExecQuery(q)
https://godoc.org/github.com/vattle/sqlboiler/boil#ExecQuery
Upvotes: 1