Files
nfeeder/internal/db/store.go
T
jasonhilder a8862721cd Initial project structure commit.
Static directory for public folders and business logic for the app
within internal, split into domain specific folders to keep clear
seperation of concerns.
2026-04-23 08:09:09 +02:00

20 lines
310 B
Go

package db
import (
"github.com/jackc/pgx/v5/pgxpool"
)
type Store struct {
// embedded field, for easier access ie store.GetUser
*Queries
// named field for explicit calles ie db.Begin
db *pgxpool.Pool
}
func NewStore(db *pgxpool.Pool) *Store {
return &Store{
Queries: New(db),
db: db,
}
}