[SQL-CVS] r4314 - SQLObject/trunk/docs
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2010-12-24 12:55:40
|
Author: phd Date: Fri Dec 24 05:55:32 2010 New Revision: 4314 Log: Documented Delete. Modified: SQLObject/trunk/docs/SQLBuilder.txt Modified: SQLObject/trunk/docs/SQLBuilder.txt ============================================================================== --- SQLObject/trunk/docs/SQLBuilder.txt Fri Dec 24 05:51:52 2010 (r4313) +++ SQLObject/trunk/docs/SQLBuilder.txt Fri Dec 24 05:55:32 2010 (r4314) @@ -197,6 +197,25 @@ # UPDATE person SET name='Test', age=42 WHERE id=1 >> connection.query(query) +Delete +~~~~~~ + +A class to build DELETE FROM queries. Accepts a number of parameters. +Use connection.query(query) to execute the query. + +`table`: + A string that names the table to UPDATE. + +`where`: + A string or an SQLExpression, represents the WHERE clause. + +Example:: + + >> update = Delete('person', where='id=1') + >> query = connection.sqlrepr(update) + # DELETE FROM person WHERE id=1 + >> connection.query(query) + Nested SQL statements (subqueries) ================================== |