Closed stdinltd closed 2 years ago
Hey!
We are using tables-to-go
in our project and I just stumble up on this PR.
Yes, it's PostgreSQL. If we have primary keys (that are never null) of type UUID, the tables-to-go
generates sql.NullString
(or *string
) instead of string
.
If we have a db table:
+-----------------+--------------------------+-----------+
| Column | Type | Modifiers |
|-----------------+--------------------------+-----------|
| id | uuid | not null |
The tables-to-go
output ID sql.NullString / *string....
. I think this PR corrects this to ID string ....
Fixed by #42
@stdinltd thanks for opening this PR.
Can you also provide at a unit test in the form of
func TestRun_UUIDColumns(t *testing.T)
to cover this new type? Check the existing ones for examples.Thanks!