yes. but i'll always have to use a bind anyway. this routing style has a
problem to identify what entity you're querying (and then the mapper)
when using functions, either at column level
session.query(func.count(MyObj.attribute)) or at the query level
itself
thats why I have a hard time with your questions, you seem to have some deeply
unusual and intricate application that is lending itself to needing all these
new patterns. That's not to say I don't have some unusual patterns in some of
my applications, but when those use cases come up I had to
thanks Mike for your help, and I'm very, very sorry for consuming your
time with my awkard questions.
anyway, what i said about my app is just part of it. imagine that i have
a lot of mapped classes to integrate my application (online, cloud
based, message based, etc etc) against some other
On May 18, 2014, at 12:10 PM, Richard Gerd Kuesters rich...@humantech.com.br
wrote:
well, this part is still working, as long as i remember. my biggest problem
now - and has been for the last couple of years - is to manage this mayhem of
classes and engines AND sessions, because everyone
yeah, well, i was using implicit for little things and explicit for the
bigger ones, but it seems that even small things are error prone :) i
was just wondering if there's a faster way to do it, even explicit, so
i can get a class (whatever it is) to query against an engine i know (so
there's
well if you're working with the RoutingSession example you can manufacture
get_bind() and using_bind() to work in any way you want. If you have the
engine, as the example shows, session.using_bind(some_bind).query(...)
hi! sorry for bringing this up so late - sometimes we just have no time to
get in sync with all threads :) this is a subject that interests me. i
mean, let me explain my current condition:
i have a set of declarative classes that i get by calling a function,
passing it's declarative base as
Just a thought if you're really mapping tons of classes on the fly as some kind
of en masse table gateway maybe look at automap
Sent from my iPhone
On May 17, 2014, at 1:43 PM, Richard Kuesters rkuest...@gmail.com wrote:
hi! sorry for bringing this up so late - sometimes we just have no
in fact, i map classes against different metadata for different schemas,
since i like to have specialized parts of my app distributed in the
database (the postgres part). another part of my app generated sqlite
databases on the fly, based on the same structures conceived earlier.
kinda strange
Thank you very much for your advice.
Le mardi 6 mai 2014 17:21:55 UTC+2, Michael Bayer a écrit :
set_shard is a special method added by the horizontal sharding extension.
you can do cross schema queries if you organize the schema names in terms
of which ones apply to the “dynamic” shard
My real database schema is a little more complex.
In reality, I have one database by company. In each database, I have
multiple schemas who contain the same table structure.
The solution schema name execution will not work in the case when I need
to access to more than one schema by request.
set_shard is a special method added by the horizontal sharding extension.
you can do cross schema queries if you organize the schema names in terms of
which ones apply to the dynamic shard and which ones to the fixed shard, if
that's how it works.
If OTOH you literally need to join against
I need some help and advices to create a mapping.
The context :
- Multiple schemas on postgresql (dynamic number and name) who store the
same tables.
- SQLAlchemy used into a pyramid web application.
Example :
A table Customer and a table CustomerOrder (link by customer.id) and a
schema by
part of a feature that will make this kind of thing more direct is the schema
name execution argument feature, which is
https://bitbucket.org/zzzeek/sqlalchemy/issue/2685/default-schema-as-an-execution-argument.
This application is somewhat of a multi-tenancy application; technically its
14 matches
Mail list logo