nakagami / firebirdsql

Firebird RDBMS sql driver for Go (golang)
MIT License
224 stars 60 forks source link

Add float64 encoding. #113

Closed pedro-r-marques closed 4 years ago

pedro-r-marques commented 4 years ago

This pull requests adds the ability to encode a float64 value in an executed statement.

Tested using a table that defines a field as double precision. Without this change firebird stores a float64 value of '93.60000000000001' on an update/insert statement as '93.59999999999999'. My assumption is that firebird is converting the string to float with slightly different rules as Golang. With this change the driver is able to write the same binary float64 number as it reads.

nakagami commented 4 years ago

Thanks!