Re: [sqlalchemy] accessing base class on hybrid expressions from the class side

2016-05-10 Thread Mike Bayer
On 05/10/2016 04:14 PM, Brian Cherinka wrote: Ok, thanks for the response. What's the timeframe for the 1.1 release? it will bethis year :) hopefully before the summer is over. I try to get one major version each year, and I'm pretty busy as this is the first full year in a long

Re: [sqlalchemy] accessing base class on hybrid expressions from the class side

2016-05-10 Thread Brian Cherinka
Ok, thanks for the response. What's the timeframe for the 1.1 release? In the meantime, I will have a look into adding my own class_ attribute, or using the Comparator. I tried something like setattr(datadb.Cube.plateifu, "class_", datadb.Cube.id.class_) but it didn't seem to work. But

Re: [sqlalchemy] accessing base class on hybrid expressions from the class side

2016-05-10 Thread Mike Bayer
in 1.1 these hybrids will have the class_ attribute like other attributes. Until then you can probably add your own class_ attribute to the object which you are returning. Also, using a custom Comparator class (see the example in the hybrid docs) will also return an instrumented attribute

[sqlalchemy] accessing base class on hybrid expressions from the class side

2016-05-10 Thread Brian Cherinka
I'm trying to build a query system where given a filter parameter name, I can figure out which DeclarativeBase class it is attached to. I need to do this for a mix of standard InstrumentedAttributes and Hybrid Properties/Expressions. I have several Declarative Base classes with hybrid

Re: [sqlalchemy] Re: MSSQL OperationalError when offsetting and ordering by an aggregated column

2016-05-10 Thread Mike Bayer
On 05/10/2016 01:10 PM, Craig Weber wrote: Great; do you know when this will be released? I'm unfamiliar with SQLAlchemy's release cadence. the minor fix releases generally come as a particular point version has either had about 6-8 weeks in development, or if it accumulates any

[sqlalchemy] Re: MSSQL OperationalError when offsetting and ordering by an aggregated column

2016-05-10 Thread Craig Weber
Great; do you know when this will be released? I'm unfamiliar with SQLAlchemy's release cadence. On Tuesday, May 10, 2016 at 10:22:48 AM UTC-5, Craig Weber wrote: > > Hello, > > I believe I've encountered a bug, but I wanted to verify it here before > polluting the issue tracker. > > When I

Re: [sqlalchemy] MSSQL OperationalError when offsetting and ordering by an aggregated column

2016-05-10 Thread Mike Bayer
On 05/10/2016 11:22 AM, Craig Weber wrote: Hello, I believe I've encountered a bug, but I wanted to verify it here before polluting the issue tracker. When I compile the following SQLAlchemy query for postgres, everything seems to work as expected; however, it fails for MSSQL. | |price_sum

[sqlalchemy] MSSQL OperationalError when offsetting and ordering by an aggregated column

2016-05-10 Thread Craig Weber
Hello, I believe I've encountered a bug, but I wanted to verify it here before polluting the issue tracker. When I compile the following SQLAlchemy query for postgres, everything seems to work as expected; however, it fails for MSSQL. price_sum = sqlalchemy.func.sum( table.c['Opportunity

Re: [sqlalchemy] How to generate a file with DDL in the engine's SQL dialect? How to copy engine?

2016-05-10 Thread Simon King
On Tue, May 10, 2016 at 12:37 PM, Piotr Dobrogost wrote: > On Monday, May 9, 2016 at 5:05:11 PM UTC+2, Mike Bayer wrote: >> >> >> the only thing that is sigificant with "mock" is the first part of the >> URL. You can just send the whole URL though, so just

Re: [sqlalchemy] How to generate a file with DDL in the engine's SQL dialect? How to copy engine?

2016-05-10 Thread Piotr Dobrogost
On Monday, May 9, 2016 at 5:05:11 PM UTC+2, Mike Bayer wrote: > > > the only thing that is sigificant with "mock" is the first part of the > URL. You can just send the whole URL though, so just like this: > > mock_engine = create_engine(real_engine.url, strategy="mock", ...) > Thanks Mike.