MCPcopy
hub / github.com/piccolo-orm/piccolo / delete

Method delete

piccolo/table.py:1145–1158  ·  view source on GitHub ↗

Delete rows from the table. .. code-block:: python await Band.delete().where(Band.name == 'Pythonistas') :param force: Unless set to ``True``, deletions aren't allowed without a ``where`` clause, to prevent accidental mass deletions.

(cls, force=False)

Source from the content-addressed store, hash-verified

1143
1144 @classmethod
1145 def delete(cls, force=False) -> Delete:
1146 """
1147 Delete rows from the table.
1148
1149 .. code-block:: python
1150
1151 await Band.delete().where(Band.name == 'Pythonistas')
1152
1153 :param force:
1154 Unless set to ``True``, deletions aren't allowed without a
1155 ``where`` clause, to prevent accidental mass deletions.
1156
1157 """
1158 return Delete(table=cls, force=force)
1159
1160 @classmethod
1161 def create_table(

Callers 15

removeMethod · 0.80
runMethod · 0.80
runMethod · 0.80
_run_comparisonMethod · 0.80
test_operatorsMethod · 0.80
test_deleteMethod · 0.80
test_delete_returningMethod · 0.80
test_validationMethod · 0.80
test_queriesMethod · 0.80

Calls 1

DeleteClass · 0.90

Tested by 14

_run_comparisonMethod · 0.64
test_operatorsMethod · 0.64
test_deleteMethod · 0.64
test_delete_returningMethod · 0.64
test_validationMethod · 0.64
test_queriesMethod · 0.64
run_queriesMethod · 0.64
test_deleteMethod · 0.64
test_delete_altMethod · 0.64