by the way
I read some document about how to use text()
but it seems when I use text().I got records from database,not instances of
class object.
I want to get instance
anyone can help me ?
2010/4/20 Cancer k.cancer.2...@gmail.com
Hi Michael~
thank you very much for your answer~
o yeah!
I solved the question~
these are codes.hope it's useful to someone who have the same question~
crew = query.from_statement(text(SELECT * from crew_member where +
rtrim(crew_member.lastname)
|| rtrim(crew_member.firstname) +
I have a custom type NormalDate which uses to convert Integer Date
type to String Date type.
but when I use form_statement to query the date.it did't work!
however,it will work, if I use a query method...
for example.
crew = query.from_statement(SELECT * from crew_member where +
use a text() construct as the argument to your from_statement() call, and
specify a typemap of {'birthday':NormalDate} along with it.
http://www.sqlalchemy.org/docs/reference/sqlalchemy/expressions.html?highlight=text#sqlalchemy.sql.expression.text
On Apr 19, 2010, at 5:38 AM, Rita Liang