Re: [go-nuts] Why go does't have NullInt type on database/sql?

2017-10-12 Thread Jan Mercl
On Thu, Oct 12, 2017 at 2:38 AM 高橋誠二  wrote:

> There are NullInt64 and NullFloat64, but not about NullInt, NullFloat.
(or NullInt32 etc...)
> After scanning from rds, my team always convert them to int, but it seems
so silly.

That does not work accross architectures.

> What is the reason?

The driver model has only one integer type - int64. NullInt would not be
able to handle 64 bit ints on 32-bit architectures.

-- 

-j

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Why go does't have NullInt type on database/sql?

2017-10-11 Thread 高橋誠二
There are NullInt64 and NullFloat64, but not about NullInt, NullFloat. (or 
NullInt32 etc...)
After scanning from rds, my team always convert them to int, but it seems 
so silly.
What is the reason?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.