remove insert privilegeWC

This commit is contained in:
Pavel 2024-04-07 11:51:07 +03:00
parent 38eec37140
commit da9b7336d2
4 changed files with 3 additions and 27 deletions

@ -179,9 +179,6 @@ UPDATE quiz SET status = 'timeout' WHERE deleted = false AND due_to <> 0 AND due
-- name: GetQuizById :one
SELECT * FROM quiz WHERE id=$1 AND accountId=$2;
-- name: InsertPrivilegeWC :exec
UPDATE privileges SET amount = $1, created_at = $2 WHERE account_id = $3 AND privilegeID = $4;
-- name: GetPrivilegesByAccountIDWC :many
SELECT p.id,p.privilegeID,p.privilege_name,p.amount, p.created_at FROM privileges as p JOIN account as a on p.account_id = a.id WHERE a.user_id = $1;

@ -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
@ -1475,27 +1475,6 @@ func (q *Queries) InsertPrivilege(ctx context.Context, arg InsertPrivilegeParams
return err
}
const insertPrivilegeWC = `-- name: InsertPrivilegeWC :exec
UPDATE privileges SET amount = $1, created_at = $2 WHERE account_id = $3 AND privilegeID = $4
`
type InsertPrivilegeWCParams struct {
Amount sql.NullInt32 `db:"amount" json:"amount"`
CreatedAt sql.NullTime `db:"created_at" json:"created_at"`
AccountID uuid.NullUUID `db:"account_id" json:"account_id"`
Privilegeid sql.NullString `db:"privilegeid" json:"privilegeid"`
}
func (q *Queries) InsertPrivilegeWC(ctx context.Context, arg InsertPrivilegeWCParams) error {
_, err := q.db.ExecContext(ctx, insertPrivilegeWC,
arg.Amount,
arg.CreatedAt,
arg.AccountID,
arg.Privilegeid,
)
return err
}
const insertQuestion = `-- name: InsertQuestion :one
INSERT INTO question (
quiz_id,