]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
doctest fixups rel_0_4_1
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 18 Nov 2007 22:47:55 +0000 (22:47 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 18 Nov 2007 22:47:55 +0000 (22:47 +0000)
doc/build/content/ormtutorial.txt
doc/build/content/sqlexpression.txt

index c65338f05b60c2e94edfff3700be1e7a9404b561..225536d5c53aabfd96b995e584dbde0f3dd40822 100644 (file)
@@ -901,7 +901,7 @@ Now when we load Jack, removing an address from his `addresses` collection will
     BEGIN
     SELECT users.id AS users_id, users.name AS users_name, users.fullname AS users_fullname, users.password AS users_password 
     FROM users 
-    WHERE users.id = ? ORDER BY users.oid 
+    WHERE users.id = ?
     [5]
     {stop}
     
@@ -1073,12 +1073,12 @@ We can now look up all blog posts with the keyword 'firstpost'.   We'll use a sp
 
     {python}
     {sql}>>> session.query(BlogPost).filter(BlogPost.keywords.any(keyword='firstpost')).all()
+    INSERT INTO posts (user_id, headline, body) VALUES (?, ?, ?)
+    [2, "Wendy's Blog Post", 'This is a test']
     INSERT INTO keywords (keyword) VALUES (?)
     ['wendy']
     INSERT INTO keywords (keyword) VALUES (?)
     ['firstpost']
-    INSERT INTO posts (user_id, headline, body) VALUES (?, ?, ?)
-    [2, "Wendy's Blog Post", 'This is a test']
     INSERT INTO post_keywords (post_id, keyword_id) VALUES (?, ?)
     [[1, 1], [1, 2]]
     SELECT posts.id AS posts_id, posts.user_id AS posts_user_id, posts.headline AS posts_headline, posts.body AS posts_body 
index 67fe213082a1d8239c7e9e8697acc76e51b3a459..317296a56b75ee478ed1ccad07624a7005f1bcc9 100644 (file)
@@ -787,7 +787,7 @@ To embed a SELECT in a column expression, use `as_scalar()`:
     ...    ])).fetchall()
     SELECT users.name, (SELECT count(addresses.id) 
     FROM addresses 
-    WHERE users.id = addresses.user_id) 
+    WHERE users.id = addresses.user_id) AS anon_1 
     FROM users
     []
     {stop}[(u'jack', 2), (u'wendy', 2), (u'fred', 0), (u'mary', 0)]