Skip to content

Document sqlc behavior for queries with JOINs  #643

Closed
@georgysavva

Description

@georgysavva

Hi. Thanks for a great project. The idea is really promising and fresh for the Go ecosystem!

One thing wasn't clear for me from the existing documentation and examples:
How sqlc handles relations and complex queries with JOINs, does it still uses flat structures for the output or it somehow reuses and embeds structs that represent a single table.

After going through existing issues I found out that sqlc goes with the simplest approach and generates a flat structure for every query even a complex one with a JOIN.

I think you should explicitly document it or add an example with a JOIN, because maybe not only me was looking for something like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions