Open
Description
What do you want to change?
Hi,
it would be great to allow add more imports when overriding db types. Let's say we have a Null
package like below.
package null
type Null[T any] struct {
V T
Valid bool
}
Now I want to set a custom nullable ts type in config as follows:
- db_type: "pg_catalog.timestamp"
nullable: true
go_type:
import: "github.com/myproject/null"
type: "Null[time.Time]"
But this won't import "time"
pkg.
Solution
Allow to specify imports
instead of import
. With this change config will look like:
- db_type: "pg_catalog.timestamp"
nullable: true
go_type:
imports:
- "time"
- "github.com/myproject/null"
type: "null.Null[time.Time]"
What database engines need to be changed?
N/A
What programming language backends need to be changed?
Go