Skip to content

Counting number of rows returned by a SELECT #50

Open
@K02D

Description

@K02D

How to count the number of rows returned by a select query? The following code throws error "failed to count messages in thread: PGRST200: Could not find a relationship between 'message' and 'COUNT' in the schema cache":

var messageCount int64
err = s.supabaseClient.DB.From("message").Select("COUNT(*)").Eq("thread_id", threadID).Execute(&messageCount)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions