Passwords!

This commit is contained in:
2025-03-11 19:54:00 +02:00
parent 647edb6d25
commit 6661fdf89b
10 changed files with 128 additions and 18 deletions

View File

@@ -0,0 +1,27 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.28.0
// source: GetUserByEmail.sql
package database
import (
"context"
)
const getUserByEmail = `-- name: GetUserByEmail :one
SELECT id, created_at, updated_at, email, hashed_password FROM users WHERE email = $1
`
func (q *Queries) GetUserByEmail(ctx context.Context, email string) (User, error) {
row := q.db.QueryRowContext(ctx, getUserByEmail, email)
var i User
err := row.Scan(
&i.ID,
&i.CreatedAt,
&i.UpdatedAt,
&i.Email,
&i.HashedPassword,
)
return i, err
}