Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package mcq |
||
2 | |||
3 | import ( |
||
4 | "context" |
||
5 | |||
6 | "github.com/jackc/pgx/v5/pgxpool" |
||
7 | db "github.com/memnix/memnix-rest/db/sqlc" |
||
8 | "github.com/memnix/memnix-rest/domain" |
||
9 | ) |
||
10 | |||
11 | // SQLRepository is the repository for the deck. |
||
12 | type SQLRepository struct { |
||
13 | q *db.Queries // q is the sqlc queries. |
||
14 | } |
||
15 | |||
16 | func (r SQLRepository) GetByID(_ context.Context, _ uint) (domain.Mcq, error) { |
||
17 | return domain.Mcq{}, nil |
||
18 | } |
||
19 | |||
20 | // NewRepository returns a new repository. |
||
21 | func NewRepository(dbConn *pgxpool.Pool) IRepository { |
||
22 | q := db.New(dbConn) |
||
23 | return &SQLRepository{q: q} |
||
24 | } |
||
25 |