georgysavva / scany

Library for scanning data from a database into Go structs and more
MIT License
1.27k stars 67 forks source link

Type does not implement 'Querier' #22

Closed KirksFletcher closed 3 years ago

KirksFletcher commented 3 years ago

Wanted to make a fork to test some extensions like Insert etc but it seem this build is not working. Passing a PGX connection or pool results in: Type does not implement 'Querier'

Type does not implement 'Querier' need method: Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error) have method: Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)

A bit strange I must admit

KirksFletcher commented 3 years ago

Ignore me, broken import

georgysavva commented 3 years ago

Hi. Thanks for the issue, yes you must use pgx v4: https://pkg.go.dev/github.com/georgysavva/scany@v0.2.6/pgxscan#hdr-Supported_pgx_version