Page MenuHomeMusing Studio

sql.go
No OneTemporary

package converter
import (
"database/sql"
"reflect"
)
func SQLNullString(value string) reflect.Value {
v := sql.NullString{}
if err := v.Scan(value); err != nil {
return reflect.Value{}
}
return reflect.ValueOf(v)
}
func SQLNullBool(value string) reflect.Value {
v := sql.NullBool{}
if err := v.Scan(value); err != nil {
return reflect.Value{}
}
return reflect.ValueOf(v)
}
func SQLNullInt64(value string) reflect.Value {
v := sql.NullInt64{}
if err := v.Scan(value); err != nil {
return reflect.Value{}
}
return reflect.ValueOf(v)
}
func SQLNullFloat64(value string) reflect.Value {
v := sql.NullFloat64{}
if err := v.Scan(value); err != nil {
return reflect.Value{}
}
return reflect.ValueOf(v)
}

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 25, 1:02 AM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3214539

Event Timeline