diff --git a/backend/db/users.sql.go b/backend/db/users.sql.go new file mode 100644 index 0000000..82b37d2 --- /dev/null +++ b/backend/db/users.sql.go @@ -0,0 +1,37 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.27.0 +// source: users.sql + +package db + +import ( + "context" +) + +const getUserByID = `-- name: GetUserByID :one +SELECT id, email, role, email_verified, token_salt +FROM users +WHERE id = $1 +` + +type GetUserByIDRow struct { + ID string + Email string + Role UserRole + EmailVerified bool + TokenSalt []byte +} + +func (q *Queries) GetUserByID(ctx context.Context, id string) (GetUserByIDRow, error) { + row := q.db.QueryRow(ctx, getUserByID, id) + var i GetUserByIDRow + err := row.Scan( + &i.ID, + &i.Email, + &i.Role, + &i.EmailVerified, + &i.TokenSalt, + ) + return i, err +}