Skip to content

fix: proper nullable types for Go code gen #1606

fix: proper nullable types for Go code gen

fix: proper nullable types for Go code gen #1606

Re-run triggered February 25, 2025 08:18
Status Failure
Total duration 2m 48s
Artifacts

ci.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

2 errors
test/index.test.ts > typegen: go: test/server/typegen.ts#L1630
Error: Snapshot `typegen: go 1` mismatched - Expected + Received @@ -1,79 +1,77 @@ "package database - import "database/sql" - type PublicUsersSelect struct { - Id int64 `json:"id"` + Id int64 `json:"id"` - Name sql.NullString `json:"name"` + Name *string `json:"name"` - Status sql.NullString `json:"status"` + Status *string `json:"status"` } type PublicUsersInsert struct { - Id sql.NullInt64 `json:"id"` + Id *int64 `json:"id"` - Name sql.NullString `json:"name"` + Name *string `json:"name"` - Status sql.NullString `json:"status"` + Status *string `json:"status"` } type PublicUsersUpdate struct { - Id sql.NullInt64 `json:"id"` + Id *int64 `json:"id"` - Name sql.NullString `json:"name"` + Name *string `json:"name"` - Status sql.NullString `json:"status"` + Status *string `json:"status"` } type PublicTodosSelect struct { - Details sql.NullString `json:"details"` + Details *string `json:"details"` - Id int64 `json:"id"` + Id int64 `json:"id"` - UserId int64 `json:"user-id"` + UserId int64 `json:"user-id"` } type PublicTodosInsert struct { - Details sql.NullString `json:"details"` + Details *string `json:"details"` - Id sql.NullInt64 `json:"id"` + Id *int64 `json:"id"` - UserId int64 `json:"user-id"` + UserId int64 `json:"user-id"` } type PublicTodosUpdate struct { - Details sql.NullString `json:"details"` + Details *string `json:"details"` - Id sql.NullInt64 `json:"id"` + Id *int64 `json:"id"` - UserId sql.NullInt64 `json:"user-id"` + UserId *int64 `json:"user-id"` } type PublicUsersAuditSelect struct { - CreatedAt sql.NullString `json:"created_at"` + CreatedAt *string `json:"created_at"` - Id int64 `json:"id"` + Id int64 `json:"id"` - PreviousValue interface{} `json:"previous_value"` + PreviousValue interface{} `json:"previous_value"` - UserId sql.NullInt64 `json:"user_id"` + UserId *int64 `json:"user_id"` } type PublicUsersAuditInsert struct { - CreatedAt sql.NullString `json:"created_at"` + CreatedAt *string `json:"created_at"` - Id sql.NullInt64 `json:"id"` + Id *int64 `json:"id"` - PreviousValue interface{} `json:"previous_value"` + PreviousValue interface{} `json:"previous_value"` - UserId sql.NullInt64 `json:"user_id"` + UserId *int64 `json:"user_id"` } type PublicUsersAuditUpdate struct { - CreatedAt sql.NullString `json:"created_at"` + CreatedAt *string `json:"created_at"` - Id sql.NullInt64 `json:"id"` + Id *int64 `json:"id"` - PreviousValue interface{} `json:"previous_value"` + PreviousValue interface{} `json:"previous_value"` - UserId sql.NullInt64 `json:"user_id"` + UserId *int64 `json:"user_id"` } type PublicUserDetailsSelect struct { - Details sql.NullString `json:"details"` + Details *string `json:"details"` - UserId int64 `json:"user_id"` + UserId int64 `json:"user_id"` } type PublicUserDetailsInsert struct { - Details sql.NullString `json:"details"` + Details *string `json:"details"` - UserId int64 `json:"user_id"` + UserId int64 `json:"user_id"` } type PublicUserDetailsUpdate struct { - Details sql.NullString `json:"details"` + Details *string `json:"details"` - UserId sql.NullInt64 `json:"user_id"` + UserId *int64 `json:"user_id"` } type PublicEmptySelect struct { } @@ -100,86 +98,86 @@ Col1 interface{} `json:"col1"` Col2 interface{} `json:"col2"` } type PublicTableWithPrimaryKeyOtherThanIdSelect struct { - Name sql.NullString `json:"name"` + Name *string `json:"name"` - OtherId int64 `json:"other_id"` + OtherId int64 `json:"other_id"` } type PublicTableWithPrimaryKeyOtherThanIdInsert struct { - Name
Test
Process completed with exit code 1.