u
This commit is contained in:
1 parent
78c7a812be
commit
1934225c53
24 files changed
+711
-654
No files matched your search
@@ -1,10 +1,11 @@
|
||||
package pgtypex
|
||||
|
||||
import (
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
"github.com/shopspring/decimal"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
func NumericToString(n pgtype.Numeric) string {
|
||||
@@ -123,3 +124,11 @@ func StringToDate(s string) pgtype.Date {
|
||||
Valid: true,
|
||||
}
|
||||
}
|
||||
|
||||
func TimestampToMillis(ts pgtype.Timestamp) int64 {
|
||||
return ts.Time.UnixMilli()
|
||||
}
|
||||
|
||||
func DateToString(s pgtype.Date) string {
|
||||
return s.Time.String()
|
||||
}
|
||||
Reference in new issue
Block a user