]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
link to SqlSoup docs on the wiki
authorJonathan Ellis <jbellis@gmail.com>
Wed, 1 Nov 2006 05:28:43 +0000 (05:28 +0000)
committerJonathan Ellis <jbellis@gmail.com>
Wed, 1 Nov 2006 05:28:43 +0000 (05:28 +0000)
doc/build/content/plugins.txt
lib/sqlalchemy/ext/sqlsoup.py

index 565a3aea01114936b39372138c80a9ad62ba8f34..c5b094e542b06e4c6feeb067f1fa0e380f8df85e 100644 (file)
@@ -430,13 +430,11 @@ SqlSoup creates mapped classes on the fly from tables, which are automatically r
     >>> from sqlalchemy.ext.sqlsoup import SqlSoup
     >>> soup = SqlSoup('sqlite:///')
 
-    >>> users = soup.users.select()
-    >>> users.sort()
-    >>> users
-    [Class_Users(name='Bhargan Basepair',email='basepair@example.edu',password='basepair',classname=None,admin=1),
-     Class_Users(name='Joe Student',email='student@example.edu',password='student',classname=None,admin=0)]
+    >>> db.users.select(order_by=[db.users.c.name])
+    [MappedUsers(name='Bhargan Basepair',email='basepair@example.edu',password='basepair',classname=None,admin=1),
+     MappedUsers(name='Joe Student',email='student@example.edu',password='student',classname=None,admin=0)]
 
-Read more about SqlSoup on [Jonathan Ellis' Blog](http://spyced.blogspot.com/2006/04/introducing-sqlsoup.html).
+Full SqlSoup documentation is on the [SQLAlchemy Wiki](http://www.sqlalchemy.org/trac/wiki/SqlSoup).
 
 ### ProxyEngine
 
index 06c3efd25f927ef94c706e4ef10541bd358ca692..d83ecfb590192ea0c89789fe2f227f91cc1fef8e 100644 (file)
@@ -156,8 +156,8 @@ tables or other joins.  Here we combine our first join with the books table:
 If you join tables that have an identical column name, wrap your join with "with_labels",
 to disambiguate columns with their table name:
 
-    >>> db.with_labels(join1).select()
-    [MappedUsersLoansJoin(users_name='Joe Student',users_email='student@example.edu',users_password='student',users_classname=None,users_admin=0,loans_book_id=1,loans_user_name='Joe Student',loans_loan_date=datetime.datetime(2006, 7, 12, 0, 0))]
+    >>> db.with_labels(join1).c.keys()
+    ['users_name', 'users_email', 'users_password', 'users_classname', 'users_admin', 'loans_book_id', 'loans_user_name', 'loans_loan_date']
 
 
 Advanced Use