summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/sqlsoup.py
diff options
context:
space:
mode:
authorJonathan Ellis <jbellis@gmail.com>2006-07-30 04:15:55 +0000
committerJonathan Ellis <jbellis@gmail.com>2006-07-30 04:15:55 +0000
commite4061ef22e6b9a3ffb77e736d1f5fa60fe5b05c1 (patch)
tree4124ff13819dd64bf35b82f476808555db41fef4 /lib/sqlalchemy/ext/sqlsoup.py
parent8681f2a135abffb130c2670f61c9035828e96671 (diff)
downloadsqlalchemy-e4061ef22e6b9a3ffb77e736d1f5fa60fe5b05c1.tar.gz
doc update
Diffstat (limited to 'lib/sqlalchemy/ext/sqlsoup.py')
-rw-r--r--lib/sqlalchemy/ext/sqlsoup.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ext/sqlsoup.py b/lib/sqlalchemy/ext/sqlsoup.py
index 6fd718a05..ab19f6e3c 100644
--- a/lib/sqlalchemy/ext/sqlsoup.py
+++ b/lib/sqlalchemy/ext/sqlsoup.py
@@ -48,7 +48,9 @@ select by a key or other field:
All the SqlAlchemy Query select variants (select, select_by, selectone, selectone_by, selectfirst, selectfirst_by)
are available. See the SqlAlchemy documentation for details:
-http://www.sqlalchemy.org/docs/datamapping.myt#datamapping_query
+http://www.sqlalchemy.org/docs/datamapping.myt#datamapping_query for general info and examples,
+and http://www.sqlalchemy.org/docs/sqlconstruction.myt for details on construction WHERE clauses.
+
Modifying objects
@@ -75,7 +77,10 @@ To finish covering the basics, let's insert a new loan, then delete it:
>>> db.flush()
You can also delete rows that have not been loaded as objects. Let's do our insert/delete cycle once more,
-this time using the loans table's delete method:
+this time using the loans table's delete method. (For SQLAlchemy experts:
+note that no flush() call is required since this
+delete acts at the SQL level, not at the Mapper level.) The same where-clause construction rules
+apply here as to the select methods.
>>> db.loans.insert(book_id=book_id, user_name=user.name)
MappedLoans(book_id=2,user_name='Bhargan Basepair',loan_date=None)
>>> db.flush()