diff --git a/dal/sqlcgen/queries.sql.go b/dal/sqlcgen/queries.sql.go index 8a9e2f8..d265e04 100644 --- a/dal/sqlcgen/queries.sql.go +++ b/dal/sqlcgen/queries.sql.go @@ -989,6 +989,17 @@ func (q *Queries) GetPrivilegesQuizAccount(ctx context.Context, id int64) ([]Get return items, nil } +const getQidOwner = `-- name: GetQidOwner :one +SELECT accountid FROM quiz where qid=$1 +` + +func (q *Queries) GetQidOwner(ctx context.Context, qid uuid.NullUUID) (string, error) { + row := q.db.QueryRowContext(ctx, getQidOwner, qid) + var accountid string + err := row.Scan(&accountid) + return accountid, err +} + const getQuestionHistory = `-- name: GetQuestionHistory :many SELECT id, quiz_id, title, description, questiontype, required, deleted, page, content, version, parent_ids, created_at, updated_at FROM question WHERE question.id = $1 OR question.id = ANY( SELECT unnest(parent_ids) FROM question WHERE id = $1