Skip to content

Join table returned row(s) should include tablename prefix #1630

@kennedyjustin

Description

@kennedyjustin

What do you want to change?

Large joins can give you join row structs that look like this:

type RetrieveMarketplacesRow struct {
	ID                        string
	AccountID                 string
        ...
	CreatedAt                 time.Time
	UpdatedAt                 time.Time
	ID_2                      string
	AccountID_2               string
	...
	CreatedAt_2               time.Time
	UpdatedAt_2               time.Time
	ID_3                      string
	AccountID_3               string
	...
	CreatedAt_3               time.Time
	UpdatedAt_3               time.Time
}

If I change my query, I need to make sure my corresponding code uses the correct number, whereas if these repeated fields were prefixed by table, there would be less application errors.

There should be a configuration option that prefixes all return values on join rows with the table name.

This is similar to #560

What database engines need to be changed?

PostgreSQL, MySQL

What programming language backends need to be changed?

Go, Python, Kotlin

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageNew issues that hasn't been reviewed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions