Hello everyone,
session.query(Reservation,
Host).join(Reservation.hosts).filter(Reservation ...).all()
Reservation.hosts is not filled in, when I access .hosts collection in
individual Reservations, SQLA issues queries to fill in the collection
one Reservation by one.
Again, Reservation and
You right, i don't like chain, because i'm to lazy to import itertools
%) so i use 'map'.
On May 27, 5:13 pm, Gregg Lind gregg.l...@gmail.com wrote:
I believe by map function, Timothy may be implying that you should
use any of the python idioms for converting iterables of tuples to a
straight
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Marcin Krol
Sent: 28 May 2009 10:09
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] This join does not fill in the collection
Hello everyone,
Hello Simon,
This answered my question, thanks! (I don't know how I missed that in
docs..)
This is theoretically theoretical:
But suppose I *did* some selection on Hosts and still used
.options(eagerload('hosts')) on query - would that screw smth up?
In particular, if I called
Hello,
I want to add the alias for the columns is it possible in sqlalchemy.
Say i have select id as uid from xyz
so i do like this
t1 = Table(xyz, metadata)
id = Column(id)
Now i want to add alias to it
id = Column(id,alias_= uid) :( didnt work
Can i add it later like i make default say
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Marcin Krol
Sent: 28 May 2009 13:57
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: This join does not fill in the collection
Hello Simon,
This answered my
Hi,
maybe I've overlooked something very trivial, but how can I populate a
mapped class from a RowProxy?
Here's a simple example of what I'd like to do (using TurboGears):
class Foo(object):
pass
database.mapper(Foo, database.metadata.tables[footable])
Now I have a rather complex SQL that
sbard wrote:
hello,
i've got a database with one table per country.
for example :
part_es (for spain)
part_uk ()
part_it
each tables have got the same schema
(id, libel, description, part_numer)
same __init__ method
same __repr__ method
is there an easy way to avoid
SQLAlchemy SQL expressions have no need for JOIN USING which is just a
typing saver in straight SQL. you can approximate this in Python as
follows:
def using(t1, t2, *names):
return join(t1, t2, onclause=and_(*[t1.c[x]==t2.c[x] for x in names]))
Ash wrote:
Hello
I want to make a
Hi Michael,
I just installed 0.5.4p2 on my Mac 10.5.7 Intel with the Python bundled
pysqlite. Test suite ran without a single error.
From your post to psqlite, there is a way for memory and gc to be managed.
Hope they implement the change on the upcoming updates. Meanwhile, it's
probably safe
Thanks.
I have one more question do we have the option of making different
type of joins ?
i have seen in docs it says it have join and outer join only
What abbt left outer right outer natural cross and many ...
On May 28, 9:00 pm, Michael Bayer mike...@zzzcomputing.com wrote:
SQLAlchemy SQL
11 matches
Mail list logo