Skip to content

QueryPrimitive/FetchIntoPrimitive don't work with Returning #57

@chipaca

Description

@chipaca

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions