MCPcopy Index your code
hub / github.com/clips/pattern / delete

Method delete

pattern/db/__init__.py:980–989  ·  view source on GitHub ↗

Removes the row which primary key equals the given id.

(self, id, commit=True)

Source from the content-addressed store, hash-verified

978 self.db.execute(q, commit)
979
980 def delete(self, id, commit=True):
981 """ Removes the row which primary key equals the given id.
982 """
983 # Table.delete(1)
984 # Table.delete(ALL)
985 # Table.delete(all(("type","cat"), ("age",15,">")))
986 q = "delete from `%s` where %s" % (self.name,
987 not isinstance(id, Group) and cmp(self.primary_key, id, "=", self.db.escape) \
988 or id.SQL(escape=self.db.escape))
989 self.db.execute(q, commit)
990
991 append, edit, remove = insert, update, delete
992

Callers 2

__init__Method · 0.80

Calls 3

cmpFunction · 0.85
SQLMethod · 0.45
executeMethod · 0.45

Tested by 1