mcq.NewRepository   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 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