This commit is contained in:
oneao committed 2026-01-18 21:20:51 +08:00
1 parent 78c7a812be
commit 1934225c53
24 files changed
+711 -654

No files matched your search

+11 -2
View File
@@ -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()
}