Skip to content

No way to override an array type #172

Closed
@maxhawkins

Description

@maxhawkins
CREATE TABLE users ( langauges TEXT[] );
"overrides" [{
  "go_type": "github.com/lib/pq.StringArray",
  "column": "user.languages"
}]

I expected this override to replace Languages with the StringArray type:

type User struct {
  Languages pq.StringArray
}

Instead it put the type in a slice:

type User struct {
  Languages []pq.StringArray
}

I can't find a way to remove the [] from the type declaration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions