0
0
Supabasecloud~5 mins

CRUD operations with supabase-js - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does CRUD stand for in database operations?
CRUD stands for Create, Read, Update, and Delete. These are the four basic operations to manage data in a database.
Click to reveal answer
beginner
How do you create a new record using supabase-js?
Use the insert() method on a table reference. For example: supabase.from('table').insert([{ column: 'value' }]) adds a new row.
Click to reveal answer
beginner
How do you read or fetch data from a table using supabase-js?
Use the select() method on a table reference. For example: supabase.from('table').select('*') fetches all columns from all rows.
Click to reveal answer
intermediate
How do you update existing data with supabase-js?
Use the update() method with eq() or other filters to specify which rows to update. Example: supabase.from('table').update({ column: 'new' }).eq('id', 1).
Click to reveal answer
intermediate
How do you delete records using supabase-js?
Use the delete() method with filters to specify which rows to remove. Example: supabase.from('table').delete().eq('id', 1) deletes the row with id 1.
Click to reveal answer
Which method is used to add new data in supabase-js?
Ainsert()
Bselect()
Cupdate()
Ddelete()
How do you fetch all columns from a table in supabase-js?
Adelete('*')
Binsert('*')
Cselect('*')
Dupdate('*')
Which method updates existing rows in supabase-js?
Aupdate()
Binsert()
Cselect()
Ddelete()
What is needed to specify which rows to update or delete?
Ainsert()
Bselect()
CNo filter needed
DFilters like eq()
Which method removes data from a table?
Aselect()
Bdelete()
Cupdate()
Dinsert()
Explain how to perform each CRUD operation using supabase-js with simple examples.
Think about which method matches each operation and how to specify rows.
You got /4 concepts.
    Describe why filters like eq() are important when updating or deleting data in supabase-js.
    Consider what happens if you update or delete without telling which rows.
    You got /3 concepts.