update sqlc gen

This commit is contained in:
Pavel 2024-06-01 20:54:33 +03:00
parent 8bca2a49aa
commit 16ea424441
3 changed files with 29 additions and 7 deletions

@ -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
@ -2793,7 +2793,7 @@ func (q *Queries) GettingAmoUsersTrueResults(ctx context.Context) ([]GettingAmoU
return items, nil
}
const insertAnswers = `-- name: InsertAnswers :exec
const insertAnswers = `-- name: InsertAnswers :one
INSERT INTO answer(
content,
quiz_id,
@ -2810,6 +2810,7 @@ INSERT INTO answer(
start,
utm
) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14)
RETURNING id, content, quiz_id, question_id, fingerprint, session, created_at, result, new, deleted, email, device_type, device, os, browser, ip, start, utm
`
type InsertAnswersParams struct {
@ -2829,8 +2830,8 @@ type InsertAnswersParams struct {
Utm json.RawMessage `db:"utm" json:"utm"`
}
func (q *Queries) InsertAnswers(ctx context.Context, arg InsertAnswersParams) error {
_, err := q.db.ExecContext(ctx, insertAnswers,
func (q *Queries) InsertAnswers(ctx context.Context, arg InsertAnswersParams) (Answer, error) {
row := q.db.QueryRowContext(ctx, insertAnswers,
arg.Content,
arg.QuizID,
arg.QuestionID,
@ -2846,7 +2847,28 @@ func (q *Queries) InsertAnswers(ctx context.Context, arg InsertAnswersParams) er
arg.Start,
arg.Utm,
)
return err
var i Answer
err := row.Scan(
&i.ID,
&i.Content,
&i.QuizID,
&i.QuestionID,
&i.Fingerprint,
&i.Session,
&i.CreatedAt,
&i.Result,
&i.New,
&i.Deleted,
&i.Email,
&i.DeviceType,
&i.Device,
&i.Os,
&i.Browser,
&i.Ip,
&i.Start,
&i.Utm,
)
return i, err
}
const insertPrivilege = `-- name: InsertPrivilege :exec