Update for pgx v5

Jack Christensen 2022-09-17 08:46:26 -05:00
parent 28fe4c34fe
commit 4a88418606

@ -6,7 +6,7 @@ Import the following package:
```go
import (
pgtypeuuid "github.com/jackc/pgtype/ext/gofrs-uuid"
pgxuuid "github.com/jackc/pgx-gofrs-uuid"
)
```
@ -18,11 +18,7 @@ if err != nil {
// handle error
}
dbconfig.AfterConnect = func(ctx context.Context, conn *pgx.Conn) error {
conn.ConnInfo().RegisterDataType(pgtype.DataType{
Value: &pgtypeuuid.UUID{},
Name: "uuid",
OID: pgtype.UUIDOID,
})
pgxuuid.Register(conn.TypeMap())
return nil
}
```