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
Issue tracker is used for reporting bugs and discussing new features. Please use Discord or stackoverflow for supporting
issues.
Expected Behavior
When a user try to insert a value of type unit64 (for ex: 9383336886908942973) in the table column of type DECIMAL(20,0). The value in the column should be stored as it is without any wrapping to negative value.
Current Behavior
When a user try to insert a value of type unit64 (for ex: 9383336886908942973) in the table column of type DECIMAL(20,0). The value in the column is stored as negative (for ex: -9063407186800608643).
Possible Solution
The library insert function is converting back the uint64 value to int64 and storing it in the database. Possible solution is to simply map uint64 to uint64 values only, which means only allow signed values
Steps to Reproduce
Create a table with column name flow_id with data type as DECIMAL(20,0).
Create a struct having flow_id attribute of type uint64.
Declare a value of above struct type(assign value as 9383336886908942973) and try to insert in the postgres database using *pg.Db.model().insert() function passing the struct variable.
Check in the database, the record will reflect a negative value which should be -9063407186800608643
Context (Environment)
Any IDE running golang
Connections with database running postgres
Detailed Description
Possible Implementation
The text was updated successfully, but these errors were encountered:
Issue tracker is used for reporting bugs and discussing new features. Please use
Discord or stackoverflow for supporting
issues.
Expected Behavior
When a user try to insert a value of type unit64 (for ex: 9383336886908942973) in the table column of type DECIMAL(20,0). The value in the column should be stored as it is without any wrapping to negative value.
Current Behavior
When a user try to insert a value of type unit64 (for ex: 9383336886908942973) in the table column of type DECIMAL(20,0). The value in the column is stored as negative (for ex: -9063407186800608643).
Possible Solution
The library insert function is converting back the uint64 value to int64 and storing it in the database. Possible solution is to simply map uint64 to uint64 values only, which means only allow signed values
Steps to Reproduce
Context (Environment)
Any IDE running golang
Connections with database running postgres
Detailed Description
Possible Implementation
The text was updated successfully, but these errors were encountered: