mirror of
https://github.com/nxshock/csv2db.git
synced 2024-11-27 03:31:00 +05:00
Add support for NULL values
This commit is contained in:
parent
219a519ff8
commit
22e7c395ec
4
types.go
4
types.go
@ -22,6 +22,10 @@ const (
|
|||||||
func (ft FieldType) ParseValue(s string) (any, error) {
|
func (ft FieldType) ParseValue(s string) (any, error) {
|
||||||
s = strings.TrimSpace(s)
|
s = strings.TrimSpace(s)
|
||||||
|
|
||||||
|
if s == "" {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
switch ft {
|
switch ft {
|
||||||
case String:
|
case String:
|
||||||
return s, nil
|
return s, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user