// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.28.0 // source: sites.sql package dbq import ( "context" ) const getSiteWithID = `-- name: GetSiteWithID :one SELECT id, name, title, url, theme, props FROM site WHERE id = $1 LIMIT 1 ` func (q *Queries) GetSiteWithID(ctx context.Context, id int64) (Site, error) { row := q.db.QueryRow(ctx, getSiteWithID, id) var i Site err := row.Scan( &i.ID, &i.Name, &i.Title, &i.Url, &i.Theme, &i.Props, ) return i, err } const listSites = `-- name: ListSites :one SELECT id, name, title, url, theme, props FROM site ` func (q *Queries) ListSites(ctx context.Context) (Site, error) { row := q.db.QueryRow(ctx, listSites) var i Site err := row.Scan( &i.ID, &i.Name, &i.Title, &i.Url, &i.Theme, &i.Props, ) return i, err } const newSite = `-- name: NewSite :one INSERT INTO site ( name, title, url, theme, props ) VALUES ($1, $2, $3, $4, $5) RETURNING id ` type NewSiteParams struct { Name string Title string Url string Theme string Props []byte } func (q *Queries) NewSite(ctx context.Context, arg NewSiteParams) (int64, error) { row := q.db.QueryRow(ctx, newSite, arg.Name, arg.Title, arg.Url, arg.Theme, arg.Props, ) var id int64 err := row.Scan(&id) return id, err }