You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type User struct {
ID int json:"id"
UID pgtype.UUID json:"uid"
Email string json:"email"
FirstName string json:"first_name"
LastName string json:"last_name"
PhoneNumber *string json:"phone_number"
Properties pgtype.JSONB json:"properties,omitempty" db:"properties"
}
I get a undefined: pgtype.JSONB error. Am I importing that correctly? I can see the file in the github repo and it seems it should be available but it looks like only JSONBCodec is available.
The text was updated successfully, but these errors were encountered:
I am trying to define a type in a struct with JSONB and it seems the struct isn't available with pgtype.
import (
"github.com/jackc/pgx/v5/pgtype"
)
type User struct {
ID int
json:"id"
UID pgtype.UUID
json:"uid"
Email string
json:"email"
FirstName string
json:"first_name"
LastName string
json:"last_name"
PhoneNumber *string
json:"phone_number"
Properties pgtype.JSONB
json:"properties,omitempty" db:"properties"
}
I get a undefined: pgtype.JSONB error. Am I importing that correctly? I can see the file in the github repo and it seems it should be available but it looks like only JSONBCodec is available.
The text was updated successfully, but these errors were encountered: