Skip to content
This repository was archived by the owner on Jun 18, 2020. It is now read-only.
This repository was archived by the owner on Jun 18, 2020. It is now read-only.

insert 'null' into 'datetime2(7)' column (or other date/time types), fetches data as empty string instead of null #35

@wread

Description

@wread

insert 'null' insto 'datetime2(7)' column, fetches data as empty string instead of null

Test log:

CREATE TABLE types_table (id int identity, col2 datetime2(7))
INSERT INTO types_table (col2) VALUES (null)
INSERT INTO types_table (col2) VALUES ('2001-04-10 10:12:59.1234567')
SELECT * FROM types_table ORDER BY id

Expected:
{ meta:
[ { name: 'id', size: 10, nullable: false, type: 'number' },
{ name: 'col2', size: 26, nullable: true, type: 'binary' } ],
rows: [ [ 1, null ], [ 2, '2001-04-10 10:12:59.1234567' ] ] }

Received:
{ meta:
[ { name: 'id', size: 10, nullable: false, type: 'number' },
{ name: 'col2', size: 27, nullable: true, type: 'binary' } ],
rows: [ [ 1, '' ], [ 2, '2001-04-10 10:12:59.1234567' ] ] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions