Test fix.

This commit is contained in:
go-jet 2026-05-03 12:17:06 +02:00
parent 88fe61e7e2
commit e9db63ab20

View file

@ -1126,8 +1126,8 @@ func TestScanToPrimitiveElementsSlice(t *testing.T) {
// https://github.com/go-jet/jet/issues/127 // https://github.com/go-jet/jet/issues/127
func TestValuerTypeDebugSQL(t *testing.T) { func TestValuerTypeDebugSQL(t *testing.T) {
type customer struct { type customer struct {
CustomerID null.Int32 `sql:"primary_key"` CustomerID null.Int `sql:"primary_key"`
StoreID null.Int16 StoreID null.Int
FirstName null.String FirstName null.String
LastName string LastName string
Email null.String Email null.String
@ -1135,14 +1135,14 @@ func TestValuerTypeDebugSQL(t *testing.T) {
Activebool null.Bool Activebool null.Bool
CreateDate null.Time CreateDate null.Time
LastUpdate null.Time LastUpdate null.Time
Active null.Int8 Active null.Int
} }
stmt := Customer.INSERT(). stmt := Customer.INSERT().
MODEL( MODEL(
customer{ customer{
CustomerID: null.Int32From(1234), CustomerID: null.IntFrom(1234),
StoreID: null.Int16From(0), StoreID: null.IntFrom(0),
FirstName: null.StringFrom("Joe"), FirstName: null.StringFrom("Joe"),
LastName: "", LastName: "",
Email: null.StringFromPtr(nil), Email: null.StringFromPtr(nil),
@ -1150,7 +1150,7 @@ func TestValuerTypeDebugSQL(t *testing.T) {
Activebool: null.BoolFrom(true), Activebool: null.BoolFrom(true),
CreateDate: null.TimeFrom(time.Date(2020, 2, 2, 10, 0, 0, 0, time.UTC)), CreateDate: null.TimeFrom(time.Date(2020, 2, 2, 10, 0, 0, 0, time.UTC)),
LastUpdate: null.TimeFromPtr(nil), LastUpdate: null.TimeFromPtr(nil),
Active: null.Int8From(1), Active: null.IntFrom(1),
}, },
) )