test(uuid): add integration tests for SqlUUID with database
* Implement tests for inserting, updating, and retrieving UUIDs in a SQLite database. * Verify that Value() returns a string representation of the UUID. * Ensure compatibility with custom types implementing fmt.Stringer. * Update type mapper imports to reflect new package path.
This commit is contained in:
@@ -461,9 +461,9 @@ func (tm *TypeMapper) NeedsFmtImport(generateGetIDStr bool) bool {
|
||||
return generateGetIDStr
|
||||
}
|
||||
|
||||
// GetSQLTypesImport returns the import path for the ResolveSpec spectypes package.
|
||||
// GetSQLTypesImport returns the import path for the spectypes package.
|
||||
func (tm *TypeMapper) GetSQLTypesImport() string {
|
||||
return "github.com/bitechdev/ResolveSpec/pkg/spectypes"
|
||||
return "git.warky.dev/wdevs/relspecgo/pkg/spectypes"
|
||||
}
|
||||
|
||||
// GetNullableTypeImportLine returns the full Go import line for the nullable type
|
||||
|
||||
@@ -505,9 +505,9 @@ func (tm *TypeMapper) NeedsFmtImport(generateGetIDStr bool) bool {
|
||||
return generateGetIDStr
|
||||
}
|
||||
|
||||
// GetSQLTypesImport returns the import path for the ResolveSpec spectypes package.
|
||||
// GetSQLTypesImport returns the import path for the spectypes package.
|
||||
func (tm *TypeMapper) GetSQLTypesImport() string {
|
||||
return "github.com/bitechdev/ResolveSpec/pkg/spectypes"
|
||||
return "git.warky.dev/wdevs/relspecgo/pkg/spectypes"
|
||||
}
|
||||
|
||||
// GetNullableTypeImportLine returns the full Go import line for the nullable type
|
||||
|
||||
@@ -23,7 +23,7 @@ type Writer interface {
|
||||
// NullableType constants control which Go package is used for nullable column types
|
||||
// in code-generation writers (Bun, GORM).
|
||||
const (
|
||||
// NullableTypeResolveSpec uses github.com/bitechdev/ResolveSpec/pkg/spectypes
|
||||
// NullableTypeResolveSpec uses git.warky.dev/wdevs/relspecgo/pkg/spectypes
|
||||
// (SqlString, SqlInt32, SqlVector, SqlStringArray, …).
|
||||
NullableTypeResolveSpec = "resolvespec"
|
||||
|
||||
@@ -52,7 +52,7 @@ type WriterOptions struct {
|
||||
|
||||
// NullableTypes selects the Go type package used for nullable columns in
|
||||
// code-generation writers (bun, gorm). Accepted values:
|
||||
// "resolvespec" (default) — github.com/bitechdev/ResolveSpec/pkg/spectypes
|
||||
// "resolvespec" (default) — git.warky.dev/wdevs/relspecgo/pkg/spectypes
|
||||
// "stdlib" — database/sql (sql.NullString, sql.NullInt32, …)
|
||||
// "baselib" — plain Go pointer types (*string, *int32, …)
|
||||
NullableTypes string
|
||||
|
||||
Reference in New Issue
Block a user