You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We are changing our pdo driver from pdo_dblib to pdo_sqlsrv and have issues with bigints and decimals being cast to strings. We pass these values straight to our frontend which does some small calcs for display (totals etc...). I have read through the issues related to this area such as #291 and absolutely agree that by default these types need to be strings to preserve precision. However, a) bigint is the same size as the php int type on most systems b) as mentioned, to do any sort of operation on these values they must be converted to php floats anyway. There is no built-in way to arithmetically handle decimals as decimals in PHP so I don't see the harm in (optionally) always converting these to floats.
Describe the solution you'd like
One or two attributes added to allow default types of int and float for bigint and decimal/numeric types.
Describe alternatives you've considered
Currently I am using a custom version of pdo_sqlsrv with a modified sql_type_to_php_type method.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
We are changing our pdo driver from pdo_dblib to pdo_sqlsrv and have issues with bigints and decimals being cast to strings. We pass these values straight to our frontend which does some small calcs for display (totals etc...). I have read through the issues related to this area such as #291 and absolutely agree that by default these types need to be strings to preserve precision. However, a) bigint is the same size as the php int type on most systems b) as mentioned, to do any sort of operation on these values they must be converted to php floats anyway. There is no built-in way to arithmetically handle decimals as decimals in PHP so I don't see the harm in (optionally) always converting these to floats.
Describe the solution you'd like
One or two attributes added to allow default types of int and float for bigint and decimal/numeric types.
Describe alternatives you've considered
Currently I am using a custom version of pdo_sqlsrv with a modified sql_type_to_php_type method.
The text was updated successfully, but these errors were encountered: