-
Notifications
You must be signed in to change notification settings - Fork 52
Remove statement
Ravi Teja Gudapati edited this page Jan 18, 2019
·
3 revisions
Remove
statement builder is used to remove records from a table. The table from which the records shall be removed is provided during construction of the statement.
final st = Remove('person');
where
method is used to specify conditional expression to filter which records will be removed by the statement.
final st = Remove('person').where(eq('id', 1));
The above statement is equivalent to:
DELETE FROM person WHERE id = 1;
Refer Conditional expressions article to learn how to write conditions for Remove statement's 'where' clause.
Remove
statement also provides various convenience methods to add where conditions with less code using methods eq
, ne
, gt
, gtEq
, ltEq
, lt
, like
and between
. Use and
and or
methods to build nested conditional expressions.
final st = Remove('person').where(eq('id', 1));
await st.exec(adapter);