I am beginning to thing this may be the way...
http://docs.sqlalchemy.org/en/latest/orm/tutorial.html
>>> stmt = text("SELECT name, id, fullname, password "... "FROM
>>> users where name=:name")>>> stmt = stmt.columns(User.name, User.id,
>>> User.fullname, User.password)SQL
>>> <http://docs.sqlalchemy.org/en/latest/orm/tutorial.html#>>>>
>>> session.query(User).from_statement(stmt).params(name='ed').all()[<User(name='ed',
>>> fullname='Ed Jones', password='f8s7ccs')>]>>> stmt = text("SELECT name, id
>>> FROM users where name=:name")
>>> stmt = stmt.columns(User.name, User.id)SQL
>>> <http://docs.sqlalchemy.org/en/latest/orm/tutorial.html#>>>>
>>> session.query(User.id, User.name).\...
>>> from_statement(stmt).params(name='ed').all()[(1, u'ed')]
Because the code gives no namespace to things like text, your tutorial makes
the product arduous to learn.. Have to go searching for things.
It's like you lookup 'a', then find you need 'b' then 'c' .... etc..
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.