feat: add first query

This commit is contained in:
Vinicius Souza 2024-08-09 11:44:15 +00:00
parent 2dd5f6fa60
commit cc6ac32324

View file

@ -0,0 +1,26 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.27.0
// source: queries.sql
package pgstore
import (
"context"
"github.com/google/uuid"
)
const getRoom = `-- name: GetRoom :one
SELECT
"id", "theme"
FROM rooms
WHERE id = $1
`
func (q *Queries) GetRoom(ctx context.Context, id uuid.UUID) (Room, error) {
row := q.db.QueryRow(ctx, getRoom, id)
var i Room
err := row.Scan(&i.ID, &i.Theme)
return i, err
}