Complete the code to initialize a Supabase client with your URL and key.
const supabase = createClient('[1]', 'your-public-anon-key');
You must use your Supabase project URL to connect the client properly.
Complete the code to fetch data from a Supabase table named 'users'.
const { data, error } = await supabase.from('[1]').select('*');The table name must match the one you want to query, here 'users'.
Fix the error in the code to insert a new user into the 'users' table.
const { data, error } = await supabase.from('users').[1]({ name: 'Alice', age: 30 });To add new data, use the 'insert' method.
Fill the blank to filter users older than 25 and order by name ascending.
const { data, error } = await supabase.from('users').select('*').[1]('age', 25).order('name', { ascending: true });'gt' means greater than. Here we want users with age greater than 25.
Fill both blanks to update the user's email where id equals 5.
const { data, error } = await supabase.from('users').[1]({ email: 'new@example.com' }).[2]('id', 5);Use 'update' to change data and 'eq' to filter by id equals 5.
