Re: [sqlalchemy] Oracle use_ansi=False inner join problem on inline views

2015-01-21 Thread Michael Bayer
Kent jkentbo...@gmail.com wrote: Mike, When using use_ansi=False for Oracle (8) in conjunction with joinedload-ing an inline view property, SQLAlchemy-0.8.7 renders an inner join instead of an outer join. This has been fixed in SQLAlchemy-0.9.0, but, as I'm not prepared for the

[sqlalchemy] Oracle use_ansi=False inner join problem on inline views

2015-01-21 Thread Kent
Mike, When using use_ansi=False for Oracle (8) in conjunction with joinedload-ing an inline view property, SQLAlchemy-0.8.7 renders an inner join instead of an outer join. This has been fixed in SQLAlchemy-0.9.0, but, as I'm not prepared for the migration yet, I was hoping and failing to find

Re: [sqlalchemy] Oracle use_ansi=False inner join problem on inline views

2015-01-21 Thread Kent
So, in 0.7 expression.py has a non-public, underscored class _FromGrouping instead of the public class FromGrouping That should be just fine to use, correct? On Wednesday, January 21, 2015 at 3:56:12 PM UTC-5, Michael Bayer wrote: wow that is awful, how often do I fix a full blown bug, even

Re: [sqlalchemy] Oracle use_ansi=False inner join problem on inline views

2015-01-21 Thread Kent
Here it is: commit 85368d25ed158c85bd19f4a63400884ab1cda26a Author: Mike Bayer m... Date: Sat Jun 8 18:54:14 2013 -0400 get nested joins to render on oracle 8 Sounds like the right commit notes. You still maintaining 0.8? Should that change be patchable in 0.7? On Wednesday,

Re: [sqlalchemy] Oracle use_ansi=False inner join problem on inline views

2015-01-21 Thread Kent
Hmmm 0.7 is missing expression.FromGrouping... I imagine that is a big deal, isn't it, like not really patchable? On Wednesday, January 21, 2015 at 3:11:29 PM UTC-5, Kent wrote: Here it is: commit 85368d25ed158c85bd19f4a63400884ab1cda26a Author: Mike Bayer m... Date: Sat Jun 8

Re: [sqlalchemy] Oracle use_ansi=False inner join problem on inline views

2015-01-21 Thread Michael Bayer
try it! Kent jkentbo...@gmail.com wrote: So, in 0.7 expression.py has a non-public, underscored class _FromGrouping instead of the public class FromGrouping That should be just fine to use, correct? On Wednesday, January 21, 2015 at 3:56:12 PM UTC-5, Michael Bayer wrote: wow that

Re: [sqlalchemy] SQL join between two tables from two databases

2015-01-21 Thread Brian Glogower
Simon, thanks for your response. Let me wrap my head around this and try it out. Brian On 21 January 2015 at 04:59, Simon King si...@simonking.org.uk wrote: You don't need to convert it to a Table object, but you probably do need to add 'schema': 'whatever' to the __table_args__ dictionary.

Re: [sqlalchemy] Oracle use_ansi=False inner join problem on inline views

2015-01-21 Thread Michael Bayer
wow that is awful, how often do I fix a full blown bug, even write tests for it, and don’t put anything in the changelog, no bug report or anything. You can probably patch it to 0.8. Not sure about 0.7, but if 0.7 doesn’t have FromGrouping there should still be some similar concept that can be

[sqlalchemy] Sharding, query_chooser and lazy select

2015-01-21 Thread Julien Meyer
Hello, I'm using sharding and it works fine except for the relationship. In my mapper, i define a relationship with lazy mode set to select. When I want to access to this relationship, my query_chooser implementation is called and I want to retrieve the parent instance but I don't know if

Re: [sqlalchemy] SQL join between two tables from two databases

2015-01-21 Thread Brian Glogower
Hi Michael, Do I need to redefined mapped class ssh_host_keys as a Table object? ssh_host_keys = Table('ssh_host_keys', metadata, Column('hostname', VARCHAR(30), primary_key=True), Column('pub', VARCHAR(1600)), Column('sha256', CHAR(64)), Column('priv', VARCHAR(2000)),

Re: [sqlalchemy] Sharding, query_chooser and lazy select

2015-01-21 Thread Michael Bayer
Julien Meyer julien.mey...@gmail.com wrote: Hello, I'm using sharding and it works fine except for the relationship. In my mapper, i define a relationship with lazy mode set to select. When I want to access to this relationship, my query_chooser implementation is called and I want to

Re: [sqlalchemy] SQL join between two tables from two databases

2015-01-21 Thread Simon King
You don't need to convert it to a Table object, but you probably do need to add 'schema': 'whatever' to the __table_args__ dictionary. In answer to your second question, I very much doubt you can use query.join() with 2 DB connections. query.join() simply adds an SQL JOIN clause to the query that

Re: [sqlalchemy] Permanent before_execute Dialect Event

2015-01-21 Thread Michael Bayer
there’s a lot of places you could set that up. The dialect has an initialize(Connection) hook called, you could do the listen on connection.engine at that point. Lycovian mfwil...@gmail.com wrote: Given a custom dialect how can I associate a before_execute event listener for all Engine