diff --git a/dal/sqlcgen/queries.sql.go b/dal/sqlcgen/queries.sql.go index 8f39d4f..fbbfbba 100644 --- a/dal/sqlcgen/queries.sql.go +++ b/dal/sqlcgen/queries.sql.go @@ -2164,7 +2164,7 @@ func (q *Queries) GetTokenById(ctx context.Context, accountid string) (Token, er const getUTMsWithPagination = `-- name: GetUTMsWithPagination :many SELECT ut.id, ut.amofieldid, ut.quizid, ut.accountid, ut.name, ut.deleted, ut.createdat, COUNT(*) OVER() as total_count FROM utms ut JOIN (SELECT AmoID FROM users WHERE users.AccountID = $1) u ON ut.AccountID = u.AmoID -WHERE ut.Deleted = false +WHERE ut.Deleted = false and ut.QuizID = $4 ORDER BY ut.ID OFFSET ($2 - 1) * $3 LIMIT $3 ` @@ -2172,6 +2172,7 @@ type GetUTMsWithPaginationParams struct { Accountid string `db:"accountid" json:"accountid"` Column2 interface{} `db:"column_2" json:"column_2"` Limit int32 `db:"limit" json:"limit"` + Quizid int32 `db:"quizid" json:"quizid"` } type GetUTMsWithPaginationRow struct { @@ -2186,7 +2187,12 @@ type GetUTMsWithPaginationRow struct { } func (q *Queries) GetUTMsWithPagination(ctx context.Context, arg GetUTMsWithPaginationParams) ([]GetUTMsWithPaginationRow, error) { - rows, err := q.db.QueryContext(ctx, getUTMsWithPagination, arg.Accountid, arg.Column2, arg.Limit) + rows, err := q.db.QueryContext(ctx, getUTMsWithPagination, + arg.Accountid, + arg.Column2, + arg.Limit, + arg.Quizid, + ) if err != nil { return nil, err }