Skip to content

UUID field type should be []byte not string #14

@willbuckner

Description

@willbuckner

case "string", "collate", "bit", "interval", "bit varying", "character", "character varying", "inet", "uuid", "text":
c.Type = "null.String"

I was surprised to see UUID columns represented as string in generated Go. The CockroachDB Manual clearly states that this data is stored as bytes, and in my Go code, I pass them around as []byte as string conversion is a completely unnecessary waste of resources.

I realize this would be a breaking change, but can we make it configurable? Thanks for looking into this.

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