delete()
Signature
builder.delete(): thisAlways chain .eq() or another filter — without a filter, delete() will attempt to delete every row in the table.
Examples
// Delete by IDconst { error } = await massi .from('posts') .delete() .eq('id', postId)
// Delete all drafts for the current userconst { data } = await massi .from('posts') .delete() .eq('draft', true) .eq('user_id', userId)RLS
The row must pass the USING clause of any DELETE policy for the current user.
Response
{ data: T[] | null, // The deleted rows (if return=representation) error: MassiError | null,}