naco-api/internal/store/GetStyleProfile.sql.go
2025-12-02 19:33:03 +00:00

39 lines
860 B
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.30.0
// source: GetStyleProfile.sql
package store
import (
"context"
"github.com/lib/pq"
)
const getStyleProfile = `-- name: GetStyleProfile :one
SELECT id, user_id, platform, embedding, top_keywords, style_summary, post_count, modified_at, created_at FROM user_style_profiles
WHERE user_id = $1 AND platform = $2
`
type GetStyleProfileParams struct {
UserID string
Platform string
}
func (q *Queries) GetStyleProfile(ctx context.Context, arg GetStyleProfileParams) (UserStyleProfile, error) {
row := q.db.QueryRowContext(ctx, getStyleProfile, arg.UserID, arg.Platform)
var i UserStyleProfile
err := row.Scan(
&i.ID,
&i.UserID,
&i.Platform,
&i.Embedding,
pq.Array(&i.TopKeywords),
&i.StyleSummary,
&i.PostCount,
&i.ModifiedAt,
&i.CreatedAt,
)
return i, err
}