From: Jonathan Ellis Date: Wed, 1 Nov 2006 05:28:43 +0000 (+0000) Subject: link to SqlSoup docs on the wiki X-Git-Tag: rel_0_3_1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcedb47e9022ceb18fab68e054c415db933d0b89;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git link to SqlSoup docs on the wiki --- diff --git a/doc/build/content/plugins.txt b/doc/build/content/plugins.txt index 565a3aea01..c5b094e542 100644 --- a/doc/build/content/plugins.txt +++ b/doc/build/content/plugins.txt @@ -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 diff --git a/lib/sqlalchemy/ext/sqlsoup.py b/lib/sqlalchemy/ext/sqlsoup.py index 06c3efd25f..d83ecfb590 100644 --- a/lib/sqlalchemy/ext/sqlsoup.py +++ b/lib/sqlalchemy/ext/sqlsoup.py @@ -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