Skip to content

inconsistent return structures generated #79

Open
@bweston92

Description

@bweston92
-- name: FindCollectionsWithAssignee :many
select *
from collections
where assignee = pggen.arg('assignee')
order by created
limit pggen.arg('start') offset pggen.arg('limit');

-- name: FindCollectionWithIdentifier :one
select * from collections where collection_id = pggen.arg('collectionID');

produces:

type FindCollectionWithIdentifierRow struct {
...
	Version      int              `json:"version"`
...
}


type FindCollectionsWithAssigneeRow struct {
...
	Version      *int             `json:"version"`
...

Even if I make them both return :one it still makes the Version member on one of them a pointer when they're referencing the same table and column. I've tried removing everything after the where including the order by and limit and still a inconsistent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions