update sqlc gen
This commit is contained in:
parent
b7afcb01b1
commit
f056b6ffcc
@ -849,3 +849,6 @@ ON CONFLICT (AmoID) DO NOTHING;
|
||||
|
||||
-- name: UpdateUsers :exec
|
||||
UPDATE users SET Name = $2, Email = $3, Role = $4, "Group" = $5, AmoUserID = $6 WHERE AmoID = $1;
|
||||
|
||||
-- name: GetTokenById :exec
|
||||
SELECT * FROM tokens WHERE accountID = $1;
|
||||
|
||||
@ -2116,6 +2116,15 @@ func (q *Queries) GetTagsWithPagination(ctx context.Context, arg GetTagsWithPagi
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const getTokenById = `-- name: GetTokenById :exec
|
||||
SELECT accountid, refreshtoken, accesstoken, authcode, expiration, createdat FROM tokens WHERE accountID = $1
|
||||
`
|
||||
|
||||
func (q *Queries) GetTokenById(ctx context.Context, accountid string) error {
|
||||
_, err := q.db.ExecContext(ctx, getTokenById, accountid)
|
||||
return err
|
||||
}
|
||||
|
||||
const getUsersWithPagination = `-- name: GetUsersWithPagination :many
|
||||
SELECT id, accountid, amoid, name, email, role, "Group", deleted, createdat, subdomain, amouserid, country, COUNT(*) OVER() as total_count FROM users WHERE Deleted = false ORDER BY ID OFFSET ($1 - 1) * $2 LIMIT $2
|
||||
`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user