gaum
gaum copied to clipboard
QueryPrimitive/FetchIntoPrimitive don't work with Returning
An Insert...Returning query that returns a single value that works with, say
var x []struct { X bool }
query.Returning("true AS x").Fetch(ctx, &x)
fails to run as
var x []bool
query.Returning("true AS x").FetchIntoPrimitive(ctx, &x)
(“querying for primitives can be done for 1 column only, got 0”, says the error)