Re: [sqlalchemy] Subclass all dialect sqltypes

2017-08-23 Thread Mike Bayer
On Wed, Aug 23, 2017 at 5:00 PM, Richard Postelnik wrote: > I was looking into an issue with a package and noticed that what was > supposed to be an MSSQL timestamp specific case was being applied to all > timestamps. Upon further investigation I found that the mssql.TIMESTAMP was > equal to sa.TI

[sqlalchemy] Subclass all dialect sqltypes

2017-08-23 Thread Richard Postelnik
I was looking into an issue with a package and noticed that what was supposed to be an MSSQL timestamp specific case was being applied to all timestamps. Upon further investigation I found that the *mssql.TIMESTAMP* was equal to *sa.TIMESTAMP*. Both yield a *sqlalchemy.sql.sqltypese.TIMESTAMP*.

Re: [sqlalchemy] Problem with undefer_group

2017-08-23 Thread Mike Bayer
I've got the first half of a fix for this issue up in gerrit review but unfortunately there are additional issues entirely on top of the thing I just fixed specific to your example in that it involves correlated subqueries that have to be matched. Was hoping to report a fix today but again I have

Re: [sqlalchemy] horizontal sharding and bulk_insert

2017-08-23 Thread Mike Bayer
On Wed, Aug 23, 2017 at 2:01 AM, Антонио Антуан wrote: > > > > So, and now we always make queries without shard_id chosing: we always make > queries on 'default' database. One exception: when we run app on master and > read statistics from geo-slaves, we point it explicitly: > "Session.query(...)

Re: [sqlalchemy] Set up a composite key using a foreign key and another column with Python

2017-08-23 Thread Joshua Peppeman
That worked! I'd still like to know about orderinglist though. Am I going to run into problems if I end up with a lot of data? -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and V

Re: [sqlalchemy] Set up a composite key using a foreign key and another column with Python

2017-08-23 Thread Joshua Peppeman
Hey Mike, thanks for getting back with me. I have to go to work soon but I'll try that out as soon as possible. Can you elaborate a little on what you mean by getting tripped up if I push it too far? On Tuesday, August 22, 2017 at 9:26:42 PM UTC-5, Mike Bayer wrote: > > On Tue, Aug 22, 2017 at 9

Re: [sqlalchemy] Re: getting model's grandparent after persistent_to_deleted event has fired.

2017-08-23 Thread Felix Ruiz de Arcaute
ok thanks. Unfortunately, I'll have to mess with my data model, but if there is no other way, I'll do it like that. On Wed, Aug 23, 2017 at 4:19 AM, Mike Bayer wrote: > On Tue, Aug 22, 2017 at 6:46 PM, cecemel wrote: > > Hello, > > > > thanks again for the answer. Perhaps my case was not clear