now with separate constraint definition for scanner as pointer
This commit is contained in:
parent
75dab21163
commit
d45f6866b7
1 changed files with 1 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue