0

I want this

const { data, error } = await supabase
        .from('users')
        .select(`*`)
        .eq('id', 5)
        .single();

to print out this

SELECT * FROM users WHERE id=5

in console.

or atleast where can i find it in the supabase dashboard logs

1 Answer 1

2

The query will not look like that. PostgREST will write a CTE query for most of these. The syntax you have from the SDK isn't directly related to SQL, it's a Rest API url builder. If you want to see the query you can look in your Postgres logs inside the Supabase dashboard. Supabase also has a tool for converting SQL to the REST API https://supabase.com/docs/guides/api/sql-to-rest, however they don't have a tool that does the opposite.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.