Skip to content

Commit

Permalink
Add additional info for nullable pgtype types
Browse files Browse the repository at this point in the history
Additional information warns about using nullable types being
used as parameters to query with Valid set to false.
  • Loading branch information
mateuszkowalke committed Aug 23, 2024
1 parent 4f7e19d commit 4171f55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pgtype/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ similar fashion to database/sql. The second is to use a pointer to a pointer.
return err
}
When using nullable pgtype types as parameters for queries, one has to remember
to explicitly set their Valid field to true, otherwise the parameter's value will be NULL.
JSON Support
pgtype automatically marshals and unmarshals data from json and jsonb PostgreSQL types.
Expand Down

0 comments on commit 4171f55

Please sign in to comment.