add set float64 func
This commit is contained in:
parent
4f10c2063e
commit
43c6bb8d9e
8
set.go
8
set.go
|
@ -1,8 +1,10 @@
|
|||
package postgresql
|
||||
|
||||
import (
|
||||
"github.com/volatiletech/null/v8"
|
||||
"time"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
"github.com/volatiletech/null/v8"
|
||||
)
|
||||
|
||||
func SetString(val string) null.String {
|
||||
|
@ -45,3 +47,7 @@ func SetJSON(val []byte) (res null.JSON) {
|
|||
Valid: true,
|
||||
}
|
||||
}
|
||||
|
||||
func SetFloat64(val float64) decimal.Decimal {
|
||||
return decimal.NewFromFloat(val)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue