On Thu, 2010-01-14 at 05:29 -0800, Kosu wrote:
try this:
user.__table__.c.keys()
should work
Kos Rafal
AttributeError: 'User' object has no attribute '__table__'
thanks anyway
On 14 Sty, 11:39, laurent FRANCOIS lau.franc...@worldonline.fr
wrote:
Hello everybody
Let's say
Hi,
I use a global session instance to work with my DB, so all module
import it and use it. But at some point I sometimes need to
reconfigure the engine to use another DB. I want to reconfigure the
existing instance so other modules can still use the same session
object to work with the DB.
can
sqlsoup explicitly used a scoped session, but i would like to use a
shardedsession for my horizontally partitioned db. is this supported
at all? thanks.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to
On Thu, Jan 21, 2010 at 9:08 AM, laurent FRANCOIS
lau.franc...@worldonline.fr wrote:
On Thu, 2010-01-14 at 05:29 -0800, Kosu wrote:
try this:
user.__table__.c.keys()
should work
Kos Rafal
AttributeError: 'User' object has no attribute '__table__'
from sqlalchemy import *
metadata =
Tarek Ziadé wrote:
Hi,
I use a global session instance to work with my DB, so all module
import it and use it. But at some point I sometimes need to
reconfigure the engine to use another DB. I want to reconfigure the
existing instance so other modules can still use the same session
object
razamatan wrote:
sqlsoup explicitly used a scoped session, but i would like to use a
shardedsession for my horizontally partitioned db. is this supported
at all? thanks.
sure in 0.5 just swap out the Session global in sqlsoup. in 0.6 you can
set a session on a per-SqlSoup basis:
The limit() function behaves in a way that is possibly unexpected:
If you ask sqlalchemy to query limit(3) where a join is involved,
for example, and 2 of the top-3 are actually the same primary key,
sqlalchemy gets the 3 results, throws out the duplicate and your query
size ends up as 2. This
Kent wrote:
The limit() function behaves in a way that is possibly unexpected:
If you ask sqlalchemy to query limit(3) where a join is involved,
for example, and 2 of the top-3 are actually the same primary key,
sqlalchemy gets the 3 results, throws out the duplicate and your query
size ends
Unfortunately, in the case I noticed this happen, the join needs to be
applied first since the filter's where clause and the order by both
depend on the joined tables. Don't think your solution is helpful in
that case, but informative nonetheless.
I can imagine a DISTINCT helping (I am using
Kent wrote:
Unfortunately, in the case I noticed this happen, the join needs to be
applied first since the filter's where clause and the order by both
depend on the joined tables. Don't think your solution is helpful in
that case, but informative nonetheless.
I can imagine a DISTINCT
10 matches
Mail list logo