csvdiff icon indicating copy to clipboard operation
csvdiff copied to clipboard

Management of NULL value

Open tmtben opened this issue 5 years ago • 1 comments
trafficstars

Hello,

Thanks again for this great tool. I've got one suggestion to make it even better.

By my side, when I create a csv file, I try to tell apart NULL value and empty string. Here is an example with comma separator: • ,, means NULL • ,"", means empty string

In fact, all my strings are encapsulated by double quotes: ,"My string",

For me, numerical values, booleans and timestamps are not string: ,1234567890,

For my use case, the solution could be: If input field of csvdiff is encapsulated by double quotes, output field of csvdiff must be encapsulated too (even if output value is empty).

Best regards, Ben

tmtben avatar Feb 15 '20 08:02 tmtben

In Golang, nulls cannot be stored as a string. It is read as an empty string by the csvreader. Only a pointer can store nils. I will think about a solution for this.

aswinkarthik avatar Feb 23 '20 11:02 aswinkarthik