diff --git a/storage/sql/sql.go b/storage/sql/sql.go index c5cea8b..45f5b86 100644 --- a/storage/sql/sql.go +++ b/storage/sql/sql.go @@ -32,10 +32,7 @@ func Open(cfg *Cfg) *Storage { return &Storage{db} } -func QueryData[P interface { - *T - scanner -}, T any](db *Storage, q string, args ...interface{}) []T { +func QueryData[P sccon[T], T any](db *Storage, q string, args ...interface{}) []T { var data []T rp := P(new(T)) proc := func(r *sql.Rows) error {