working on ron-example
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
"ron-pets/internal/sqlc"
|
||||
)
|
||||
|
||||
type pgxRepository struct {
|
||||
*sqlc.Queries
|
||||
db *pgxpool.Pool
|
||||
}
|
||||
|
||||
func NewPGXRepo(db *pgxpool.Pool) ExtendedQuerier {
|
||||
return &pgxRepository{
|
||||
Queries: sqlc.New(db),
|
||||
db: db,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user