In case of interface type of the field need to map any type from DB response.
It works in the original PGX driver so need to support for proper unit testing.
For example:
This type of code is properly works with real pgx driver.
type Record map[string]interface{}
func (b *Bind) list(ctx context.Context, ectx keypattern.ExecContext) ([]Record, error) {
res := make([]Record, 0, 10)
err := pgxscan.Select(ctx, b.conn, &res, b.listQuery.String(), b.listQuery.args(ectx)...)
return res, err
}
The pool request makes possible to work such kind of tests
In case of interface type of the field need to map any type from DB response. It works in the original PGX driver so need to support for proper unit testing.
For example: This type of code is properly works with real pgx driver.
The pool request makes possible to work such kind of tests