xtablo-source/backend/sqlc.yaml
Arthur Belleville 799c26099e
feat(02-01): add sqlc queries + citext/uuid overrides; generate bindings
- sqlc.yaml: overrides citext→string and uuid→uuid.UUID (Pattern 10, Pitfall 3)
- users.sql: InsertUser :one and GetUserByEmail :one
- sessions.sql: InsertSession :exec, GetSessionWithUser :one (expires_at > now() per D-07),
  DeleteSession :exec, DeleteSessionsByUser :exec, ExtendSession :exec
- sqlc generate produces Email string (not pgtype.Text) and uuid.UUID in bindings
- go build ./internal/db/... exits 0
2026-05-14 21:52:48 +02:00

19 lines
468 B
YAML

version: "2"
sql:
- engine: postgresql
schema: "migrations"
queries: "internal/db/queries"
gen:
go:
package: "sqlc"
out: "internal/db/sqlc"
sql_package: "pgx/v5"
emit_json_tags: false
emit_interface: false
overrides:
- db_type: "citext"
go_type: "string"
- db_type: "uuid"
go_type:
import: "github.com/google/uuid"
type: "UUID"