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)
}
func ConvertSQLNullString(value string) reflect.Value {
v := sql.NullString{}
if err := v.Scan(value); err != nil {
return reflect.Value{}
}
return reflect.ValueOf(v)
}
func ConvertSQLNullBool(value string) reflect.Value {
v := sql.NullBool{}
if err := v.Scan(value); err != nil {
return reflect.Value{}
}
return reflect.ValueOf(v)
}
func ConvertSQLNullInt64(value string) reflect.Value {
v := sql.NullInt64{}
if err := v.Scan(value); err != nil {
return reflect.Value{}
}
return reflect.ValueOf(v)
}
func ConvertSQLNullFloat64(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
Sun, Apr 6, 7:45 AM (8 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3185998

Event Timeline