nullable numeric field not scanned into *asetypes.Decimal correctly
Expected behaviourasetypes.Decimal needs to have a way to represent NULL. Otherwise a new type such as asetypes.NullDecimal needs to be created.
Current behaviour
*asetypes.Decimal does not have a way to represent a NULL. a null numeric field is scanned to a zero value
Steps to Reproduce
Steps to reproduce the behavior:
create table DATATYPE_DECIMAL_TEST(Id int primary key, DecimalFld decimal(32,5) NULL,
NumericFld numeric(32,10) NULL, NumericP10S0Fld numeric(10,0) NOT NULL)
go
insert into DATATYPE_DECIMAL_TEST(Id, NumericP10S0Fld) values(3, 333)
go
Description
nullable numeric field not scanned into *asetypes.Decimal correctly
Expected behaviour asetypes.Decimal needs to have a way to represent NULL. Otherwise a new type such as asetypes.NullDecimal needs to be created.
Current behaviour
*asetypes.Decimal does not have a way to represent a NULL. a null numeric field is scanned to a zero value
Steps to Reproduce
Steps to reproduce the behavior: create table DATATYPE_DECIMAL_TEST(Id int primary key, DecimalFld decimal(32,5) NULL, NumericFld numeric(32,10) NULL, NumericP10S0Fld numeric(10,0) NOT NULL) go insert into DATATYPE_DECIMAL_TEST(Id, NumericP10S0Fld) values(3, 333) go
export environment variables DB_USERNAME, DB_PASSWORD, DB_DATABASE, DB_HOSTNAME, DB_PORT
Environment
Client: OS: centos-7 go version: go1.16.3 linux/amd64 go-ase version / commit hash: v0.0.0-20210611100756-1778dda08c18
integer_validate.go.gz go-dblib version / commit hash: v0.0.0-20210610133137-f25b0f0fced0
Server: OS: centos-7 ASE version: 16.0_SP03PL09_EBF29247
decimal_validate.go.gz