You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
390 B

package mysql
import (
"database/sql"
"git.aiterp.net/rpdata2-take2/rpdata2/internal/genutils"
)
func toNullString(s *string) sql.NullString {
if s != nil {
return sql.NullString{Valid: true, String: *s}
} else {
return sql.NullString{Valid: false}
}
}
func fromNullString(ns sql.NullString) *string {
if ns.Valid {
return genutils.Ptr(ns.String)
} else {
return nil
}
}