its not really a bug. use real column objects for your order by
expression, i.e.:
order_by=_username,
this is because when using declarative, string arguments used in
relation()/backref() where there are ordinarily class or SQL
expression objects are interpreted to be part of the
Hi,
Are there any approach to get columns names from query result ?
I'm executing a dynamic sql statemet using text function and execute.
s = 'select * from foo where foo.name like = :name'
txt = text(s, bind=database.metadata.bind)
p = {'name':u'some name'}
result = txt.execute(p).fetchall()
Thanks for this response. I do need all of the data available at once.
Specifically, here is what I'm trying to do. I'm following this
example right from the docs:
from sqlalchemy import ForeignKey
from sqlalchemy.orm import relation, backref
class Address(Base):
... __tablename__ =
Don't know if this will work in your case.. but to handle joins to so
many static tables.
Note.. I didn't need to update these tables, nor query from them back
to the data tables. (i.e. no need to call Gender.member_profiles())
I did something like the following:
class MemberProfile(Base):
On Feb 4, 6:53 am, Michael Bayer mike...@zzzcomputing.com wrote:
its not really a bug. use real column objects for your order by
expression, i.e.:
order_by=_username,
Oh, that makes sense. Thanks for the explanation.
-Ken
--~--~-~--~~~---~--~~
You
Excellent, thank you! Getting closer. I now use the same
declarative_base on all instances, and I can now successfully refer to
the relation() classes as actual class names instead of strings.
During this query:
memberProfile = session.query(MemberProfile).filter_by
(memberID=81017).first()
I
Just to make it easier to read, I'm missing a FROM clause:
sqlalchemy.exc.ProgrammingError: (ProgrammingError) missing FROM-
clause entry for table member_profiles at character 5151
I read from the archive that this was a bug in 0.4.
Thanks again,
Gloria
Hi.
After working out my metadata issues (and scrapping four revisions and
a Tomboy notepad of plans for my framework), I've realized that I am
going to need something that is like FormAlchemy, but will convert
models to a WTForms form instead. I've got the basis of the form field
extraction code
maxi wrote:
Hi,
Are there any approach to get columns names from query result ?
I'm executing a dynamic sql statemet using text function and execute.
s = 'select * from foo where foo.name like = :name'
txt = text(s, bind=database.metadata.bind)
p = {'name':u'some name'}
result =
PacSci wrote:
Hi.
After working out my metadata issues (and scrapping four revisions and
a Tomboy notepad of plans for my framework), I've realized that I am
going to need something that is like FormAlchemy, but will convert
models to a WTForms form instead. I've got the basis of the form
10 matches
Mail list logo