update sqlc gen

This commit is contained in:
Pavel 2024-04-22 18:15:03 +03:00
parent cc0512de5e
commit fe83874203

@ -2164,7 +2164,7 @@ func (q *Queries) GetTokenById(ctx context.Context, accountid string) (Token, er
const getUTMsWithPagination = `-- name: GetUTMsWithPagination :many 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 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 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 ORDER BY ut.ID OFFSET ($2 - 1) * $3 LIMIT $3
` `
@ -2172,6 +2172,7 @@ type GetUTMsWithPaginationParams struct {
Accountid string `db:"accountid" json:"accountid"` Accountid string `db:"accountid" json:"accountid"`
Column2 interface{} `db:"column_2" json:"column_2"` Column2 interface{} `db:"column_2" json:"column_2"`
Limit int32 `db:"limit" json:"limit"` Limit int32 `db:"limit" json:"limit"`
Quizid int32 `db:"quizid" json:"quizid"`
} }
type GetUTMsWithPaginationRow struct { type GetUTMsWithPaginationRow struct {
@ -2186,7 +2187,12 @@ type GetUTMsWithPaginationRow struct {
} }
func (q *Queries) GetUTMsWithPagination(ctx context.Context, arg GetUTMsWithPaginationParams) ([]GetUTMsWithPaginationRow, error) { 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 { if err != nil {
return nil, err return nil, err
} }