| 1082 | | Note that ``db`` and ``cursor`` simply use the standard `Python DB-API`_. |
|---|
| 1083 | | |
|---|
| 1084 | | If you're not familiar with the Python DB-API, note that the SQL statement in |
|---|
| | 1082 | If your custom SQL statement alters the data in your database -- for example, |
|---|
| | 1083 | via a ``DELETE``, ``INSERT`` or ``UPDATE`` -- you'll need to call |
|---|
| | 1084 | ``db.commit()``. example:: |
|---|
| | 1085 | |
|---|
| | 1086 | def my_custom_sql2(self): |
|---|
| | 1087 | cursor = db.cursor() |
|---|
| | 1088 | cursor.execute("DELETE FROM bar WHERE baz = %s", [self.baz]) |
|---|
| | 1089 | db.commit() |
|---|
| | 1090 | |
|---|
| | 1091 | ``db`` and ``cursor`` simply use the standard `Python DB-API`_. If you're not |
|---|
| | 1092 | familiar with the Python DB-API, note that the SQL statement in |
|---|