2024-09-09 03:32:10 +05:00

20 lines
405 B
Go

package widget
import (
"context"
)
type Pool interface {
Exec(ctx context.Context, query string, args ...interface{}) (interface{}, error)
Query(ctx context.Context, query string, args ...interface{}) (interface{}, error)
QueryRow(ctx context.Context, query string, args ...interface{}) interface{}
}
type Repository struct {
Pool
}
func New(pool Pool) *Repository {
return &Repository{pool}
}