Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
willbuckner opened this issue Oct 27, 2018 · 1 comment
Open

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

willbuckner opened this issue Oct 27, 2018 · 1 comment

Comments

@willbuckner
Copy link

willbuckner commented Oct 27, 2018

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.

@glerchundi
Copy link
Owner

@willbuckner I don't have time right now but I found it was already discussed here: volatiletech/sqlboiler#58, maybe ask in the core library first and depending on the status and reasoning we'll proceed with this or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants