[sqlalchemy] Re: Inheritance over more than one level

2009-11-04 Thread Michael Bayer
On Nov 4, 2009, at 7:33 PM, exhuma.twn wrote: > > Hi, > > All the docs only explain how to do inheritance using a simple "parent >> child" model. But what about "parent > child > grandchild"? I tried > the following but I get an error: > > > > thing_table = Table( 'thing', metadata, > Colu

[sqlalchemy] Re: Determine what joins are in select statement

2009-11-04 Thread Kalium
Thanks Michael. On Oct 28, 1:21 am, "Michael Bayer" wrote: > Kalium wrote: > > > Hi, > > Just wondering if there is an easy way to determine what tables are > > joined in a query? > > > I'm doing something like this > > > query = session.query(System, dynamic_obj).select_from(self.j) > > > Where

[sqlalchemy] Inheritance over more than one level

2009-11-04 Thread exhuma.twn
Hi, All the docs only explain how to do inheritance using a simple "parent > child" model. But what about "parent > child > grandchild"? I tried the following but I get an error: thing_table = Table( 'thing', metadata, Column( 'uuid', String(36), primary_key=True, default=func.uuid_gener

[sqlalchemy] Re: Multi table select?

2009-11-04 Thread AF
On Oct 27, 8:03 am, Mike Conley wrote: > On Mon, Oct 26, 2009 at 10:09 PM, Bobby Impollonia wrote: > > Let's say you have 2 mapped classes > class Stuff1(Base): >      --- etc. > class Stuff2(Base) >      --- etc. > > You can do something like this > > q1 = session.query(Stuff1.co

[sqlalchemy] Re: Something wrong with pool. Got "Connection is already closed None None" with copy_from and big file.

2009-11-04 Thread Michael Bayer
sector119 wrote: > > I use sqlalchemy 0.6 and psycopg2 2.0.13. > > When I try to copy from some little file it's ok, when from some > bigger one I got error and log posted below. > When I use pgbouncer and pass poolclass=pool.NullPool to create_engine > everything wor perfect with large file too.

[sqlalchemy] Something wrong with pool. Got "Connection is already closed None None" with copy_from and big file.

2009-11-04 Thread sector119
I use sqlalchemy 0.6 and psycopg2 2.0.13. When I try to copy from some little file it's ok, when from some bigger one I got error and log posted below. When I use pgbouncer and pass poolclass=pool.NullPool to create_engine everything wor perfect with large file too. My query is: session.connec

[sqlalchemy] Re: not expected generated update query values

2009-11-04 Thread Michael Bayer
sector119 wrote: > > Oh, I forgot about that, it wasn't that behaviour that I realy > axpect.. > I modify sql/compiller.py a bit to show what I mean. If I specify some > bindparam'eters at value(...) I want _only_ that columns to be at > update SET or insert VALUES.. > > --- compiler.py.orig20

[sqlalchemy] Re: ForeignKey and ForeignKeyConstraint copy() method make FK copy without arguments

2009-11-04 Thread sector119
done. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegr

[sqlalchemy] Re: not expected generated update query values

2009-11-04 Thread sector119
Oh, I forgot about that, it wasn't that behaviour that I realy axpect.. I modify sql/compiller.py a bit to show what I mean. If I specify some bindparam'eters at value(...) I want _only_ that columns to be at update SET or insert VALUES.. --- compiler.py.orig2009-11-02 18:00:17.548954070 +020

[sqlalchemy] Re: ForeignKey and ForeignKeyConstraint copy() method make FK copy without arguments

2009-11-04 Thread Michael Bayer
can you attach this to the ticket please (http://www.sqlalchemy.org/trac/ticket/1605 ) On Nov 4, 2009, at 7:09 AM, sector119 wrote: > > --- schema.py 2009-11-04 13:27:37.124466356 +0200 > +++ schema.py 2009-11-04 13:27:21.486350738 +0200 > @@ -909,7 +909,17 @@ > def copy(self

[sqlalchemy] Re: ForeignKey and ForeignKeyConstraint copy() method make FK copy without arguments

2009-11-04 Thread sector119
--- schema.py 2009-11-04 13:27:37.124466356 +0200 +++ schema.py 2009-11-04 13:27:21.486350738 +0200 @@ -909,7 +909,17 @@ def copy(self, schema=None): """Produce a copy of this ForeignKey object.""" -return ForeignKey(self._get_colspec(schema=schema)) +ret

[sqlalchemy] ForeignKey and ForeignKeyConstraint copy() method make FK copy without arguments

2009-11-04 Thread sector119
Hi All ForeignKey and ForeignKeyConstraint copy() method make FK copy without arguments, for example deferrable, ... class ForeignKey: def copy(self, schema=None): """Produce a copy of this ForeignKey object.""" return ForeignKey(self._get_colspec(schema=schema)) class Forei

[sqlalchemy] Re: Forced quoting for all identifiers

2009-11-04 Thread Julian Scheid
On Wed, Nov 4, 2009 at 3:25 AM, Michael Bayer wrote: > Assuming hsqldb supports case insensitive identifiers as UPPERCASE, use > the same approach taken in the Firebird and Oracle dialects which both > work the same way, that is, include "requires_name_normalize=True", and > implement normalize_n