Browse files

Removed section in docs/model-api.txt about connection.commit(), whic…

…h no longer exists

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 3c72a46 commit be0032f5bafb58bc055ef21910e197aa6547a96b @adrianholovaty adrianholovaty committed May 6, 2006
Showing with 0 additions and 9 deletions.
  1. +0 −9 docs/model-api.txt
@@ -1581,15 +1581,6 @@ rows. Example::
row = cursor.fetchone()
return row
-If your custom SQL statement alters the data in your database -- for example,
-via a ``DELETE`` or ``UPDATE`` -- you'll need to call ``db.commit()``. Example::
- def my_custom_sql2(self):
- from django.db import connection
- cursor = connection.cursor()
- cursor.execute("DELETE FROM bar WHERE baz = %s", [self.baz])
- connection.commit()
``connection`` and ``cursor`` simply use the standard `Python DB-API`_. If
you're not familiar with the Python DB-API, note that the SQL statement in
``cursor.execute()`` uses placeholders, ``"%s"``, rather than adding parameters

0 comments on commit be0032f

Please sign in to comment.