summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/hybrid.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-04-17 13:22:33 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-04-17 13:22:33 -0400
commitfcded554dfbb102ee6c34982e3449592718ba921 (patch)
treee0c93423479ddead8a0bd1ee9273809573068979 /lib/sqlalchemy/ext/hybrid.py
parent4f6f0edd7843939c055bcfb7c2ff47ae7eec58f8 (diff)
downloadsqlalchemy-fcded554dfbb102ee6c34982e3449592718ba921.tar.gz
- rework setup.py script to work with:
- Python 3 - Python 3 builds if Distribute isn't installed - rework install documentation again - raise if doc build with mako < 0.4.1 - Python 3.1 builds force doctest parse but then fails due to distribute bug, so remove usage of backslash \\ in hybrid.py docstring - put in the latest ez_setup.py
Diffstat (limited to 'lib/sqlalchemy/ext/hybrid.py')
-rw-r--r--lib/sqlalchemy/ext/hybrid.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/ext/hybrid.py b/lib/sqlalchemy/ext/hybrid.py
index 136d7d506..c16c38b2c 100644
--- a/lib/sqlalchemy/ext/hybrid.py
+++ b/lib/sqlalchemy/ext/hybrid.py
@@ -104,7 +104,7 @@ SQL expression-level boolean behavior::
FROM interval
WHERE interval.start <= :start_1 AND interval."end" > :end_1
- >>> ia = aliased(Interval)
+ >>> ia = aliased(Interval)
>>> print Session().query(Interval, ia).filter(Interval.intersects(ia))
SELECT interval.id AS interval_id, interval.start AS interval_start,
interval."end" AS interval_end, interval_1.id AS interval_1_id,
@@ -240,8 +240,8 @@ is even present, this issue expresses itself differently at the SQL expression l
would use an outer join::
>>> from sqlalchemy import or_
- >>> print Session().query(User, User.balance).outerjoin(User.accounts).\\
- ... filter(or_(User.balance < 5000, User.balance == None))
+ >>> print (Session().query(User, User.balance).outerjoin(User.accounts).
+ ... filter(or_(User.balance < 5000, User.balance == None)))
SELECT "user".id AS user_id, "user".name AS user_name, account.balance AS account_balance
FROM "user" LEFT OUTER JOIN account ON "user".id = account.user_id
WHERE account.balance < :balance_1 OR account.balance IS NULL