Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Management of NULL value #40

Open
tmtben opened this issue Feb 15, 2020 · 1 comment
Open

Management of NULL value #40

tmtben opened this issue Feb 15, 2020 · 1 comment

Comments

@tmtben
Copy link

tmtben commented Feb 15, 2020

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

@aswinkarthik
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants