Complete the code to insert seed data into a Supabase table.
await supabase.from('users').insert({ name: [1] })
The insert method requires the actual data value to be inserted. Here, 'Alice' is the correct string to insert as the name.
Complete the code to select all rows from the 'products' table.
const { data, error } = await supabase.from('products').[1]()The select() method retrieves rows from a table. Here, it fetches all rows from 'products'.
Fix the error in the seed script to correctly insert multiple rows.
await supabase.from('orders').insert([1])
To insert multiple rows, pass an array of objects. Option A correctly uses an array with two objects.
Fill both blanks to update a user's email where id equals 5.
await supabase.from('users').update({ email: [1] }).[2]('id', 5)
The update method needs the new email value as a string. The eq method filters rows where 'id' equals 5.
Fill all three blanks to delete rows from 'sessions' where 'active' is false.
await supabase.from([1]).delete().[2]('active', [3], false)
The table name is 'sessions'. The eq method applies a condition where 'active' equals false.