I'm getting an error when trying to create an SQL subscriber with pgx. I can't find any example of a Postgres subscriber so I've followed the simple MySQL forwarder example to no success.
cannot use db (variable of type pgxpool.Pool) as "github.com/ThreeDotsLabs/watermill-sql/v2/pkg/sql".Beginner value in argument to sql.NewSubscriber: pgxpool.Pool does not implement "github.com/ThreeDotsLabs/watermill-sql/v2/pkg/sql".Beginner (wrong type for method BeginTx)
have BeginTx(context.Context, pgx.TxOptions) (pgx.Tx, error)
want BeginTx(context.Context, "database/sql".TxOptions) ("database/sql".Tx, error)compilerInvalidIfaceAssign
I'm getting an error when trying to create an SQL subscriber with pgx. I can't find any example of a Postgres subscriber so I've followed the simple MySQL forwarder example to no success.
Here's the code :
The error :