add new varible to getting question title
This commit is contained in:
parent
a84f95429f
commit
6e6e28d492
@ -171,7 +171,7 @@ WHERE
|
||||
qid = $1;
|
||||
|
||||
-- name: GetQuestionTitle :one
|
||||
SELECT title, questiontype FROM question WHERE id = $1;
|
||||
SELECT title, questiontype,page FROM question WHERE id = $1;
|
||||
|
||||
-- name: WorkerTimeoutProcess :exec
|
||||
UPDATE quiz SET status = 'timeout' WHERE deleted = false AND due_to <> 0 AND due_to < EXTRACT(epoch FROM CURRENT_TIMESTAMP);
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.25.0
|
||||
// sqlc v1.26.0
|
||||
|
||||
package sqlcgen
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.25.0
|
||||
// sqlc v1.26.0
|
||||
|
||||
package sqlcgen
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.25.0
|
||||
// sqlc v1.26.0
|
||||
// source: queries.sql
|
||||
|
||||
package sqlcgen
|
||||
@ -1102,18 +1102,19 @@ func (q *Queries) GetQuestionHistory(ctx context.Context, arg GetQuestionHistory
|
||||
}
|
||||
|
||||
const getQuestionTitle = `-- name: GetQuestionTitle :one
|
||||
SELECT title, questiontype FROM question WHERE id = $1
|
||||
SELECT title, questiontype,page FROM question WHERE id = $1
|
||||
`
|
||||
|
||||
type GetQuestionTitleRow struct {
|
||||
Title string `db:"title" json:"title"`
|
||||
Questiontype interface{} `db:"questiontype" json:"questiontype"`
|
||||
Title string `db:"title" json:"title"`
|
||||
Questiontype interface{} `db:"questiontype" json:"questiontype"`
|
||||
Page sql.NullInt16 `db:"page" json:"page"`
|
||||
}
|
||||
|
||||
func (q *Queries) GetQuestionTitle(ctx context.Context, id int64) (GetQuestionTitleRow, error) {
|
||||
row := q.db.QueryRowContext(ctx, getQuestionTitle, id)
|
||||
var i GetQuestionTitleRow
|
||||
err := row.Scan(&i.Title, &i.Questiontype)
|
||||
err := row.Scan(&i.Title, &i.Questiontype, &i.Page)
|
||||
return i, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user