Update structure to domain driven architecture.

This commit is contained in:
2026-05-08 08:14:25 +02:00
parent 4f3692abd9
commit 2993cc04ef
21 changed files with 185 additions and 103 deletions
+19
View File
@@ -0,0 +1,19 @@
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,
}
}