remove insert privilegeWC
This commit is contained in:
parent
38eec37140
commit
da9b7336d2
@ -179,9 +179,6 @@ UPDATE quiz SET status = 'timeout' WHERE deleted = false AND due_to <> 0 AND due
|
|||||||
-- name: GetQuizById :one
|
-- name: GetQuizById :one
|
||||||
SELECT * FROM quiz WHERE id=$1 AND accountId=$2;
|
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
|
-- 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;
|
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.
|
// Code generated by sqlc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// sqlc v1.25.0
|
// sqlc v1.26.0
|
||||||
|
|
||||||
package sqlcgen
|
package sqlcgen
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Code generated by sqlc. DO NOT EDIT.
|
// Code generated by sqlc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// sqlc v1.25.0
|
// sqlc v1.26.0
|
||||||
|
|
||||||
package sqlcgen
|
package sqlcgen
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Code generated by sqlc. DO NOT EDIT.
|
// Code generated by sqlc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// sqlc v1.25.0
|
// sqlc v1.26.0
|
||||||
// source: queries.sql
|
// source: queries.sql
|
||||||
|
|
||||||
package sqlcgen
|
package sqlcgen
|
||||||
@ -1475,27 +1475,6 @@ func (q *Queries) InsertPrivilege(ctx context.Context, arg InsertPrivilegeParams
|
|||||||
return err
|
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
|
const insertQuestion = `-- name: InsertQuestion :one
|
||||||
INSERT INTO question (
|
INSERT INTO question (
|
||||||
quiz_id,
|
quiz_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user