sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

Returning unsigned integers from catalog functions

Open Jille opened this issue 1 year ago • 0 comments

Version

1.24.0

What happened?

MySQL's CRC32 function returns an UNSIGNED INT, but sqlc generates a int32 in Golang. We should update the catalogs to a) be able to return unsigned types and b) return unsigned types where appropriate.

Relevant log output

Scan error on column index 0, name "checksum": converting driver.Value type []uint8 ("4183525345") to a int32: value out of range

Database schema

No response

SQL queries

SELECT CRC32('test');

Configuration

No response

Playground URL

No response

What operating system are you using?

No response

What database engines are you using?

MySQL

What type of code are you generating?

Go

Jille avatar Jan 03 '24 12:01 Jille