Re: [sqlalchemy] Checking the availablity of a booked Item

2010-10-13 Thread Thadeus Burgess
For outer joins you need a where clause on the joined tables. http://www.codinghorror.com/blog/2007/10/a-visual-explanation-of-sql-joins.html Using a full outer join should return the expected results. -- Thadeus On Tue, Oct 12, 2010 at 1:41 PM, chaouche yacine yacinechaou...@yahoo.comwrote:

[sqlalchemy] Fwd: [Gnukhata-devel] Error installing gnukhata

2010-10-13 Thread Krishnakant Mane
Don't know why this might be happening on an Ubuntu 10.04 machine? Can some one help solve this? happy hacking. Krishnakant. Original Message Subject:[Gnukhata-devel] Error installing gnukhata Date: Wed, 13 Oct 2010 11:06:00 +0400 From: pooja bakshi

Re: [sqlalchemy] Fwd: [Gnukhata-devel] Error installing gnukhata

2010-10-13 Thread Chris Withers
On 13/10/2010 08:29, Krishnakant Mane wrote: Don't know why this might be happening on an Ubuntu 10.04 machine? Can some one help solve this? How were any of the involved packages installed? Chris -- Simplistix - Content Management, Batch Processing Python Consulting -

Re: [sqlalchemy] Dynamic query

2010-10-13 Thread Julien Cigar
On 10/12/2010 18:05, Julien Cigar wrote: On 10/12/2010 17:09, Michael Bayer wrote: On Oct 12, 2010, at 7:39 AM, Julien Cigar wrote: Hello, any idea why with # Query class BaseQuery(orm.Query): @dynamic def method_a(self): ... def method_b(self): ... class FooQuery(BaseQuery): ... class

Re: [sqlalchemy] Checking the availablity of a booked Item

2010-10-13 Thread chaouche yacine
Thank you Thadeus, I believe Face.query.filter(filter_cond).outerjoin(join_clause).all() does a full outerjoin, or is there another way to do it ? Y.Chaouche --- On Wed, 10/13/10, Thadeus Burgess thade...@thadeusb.com wrote: From: Thadeus Burgess thade...@thadeusb.com Subject: Re:

[sqlalchemy] Altering schema for tables at runtime

2010-10-13 Thread Eskil Andréen
Hello! I have a couple of models that I use with a MySQL database. For testing purposes I would like to set up in-memory fixtures for these models using SQLite. Unfortunately the models are declared with different schemas. Since SQLite doesn't seem to support schemas I'd like to somehow normalize

Re: [sqlalchemy] Altering schema for tables at runtime

2010-10-13 Thread Michael Bayer
On Oct 13, 2010, at 3:59 AM, Eskil Andréen wrote: Hello! class A(Base): __tablename__ = 'table_a' __table_args__ = {'schema':'schema_a'} id = Column(Integer, primary_key=True) class B(Base): __tablename__ = 'table_b' __table_args__ = {'schema':'schema_b'} id =

[sqlalchemy] getting floats instead of decimals from session.execute

2010-10-13 Thread Chris Withers
Hi All, If I'm doing: session.execute('select some_numeric from some_table') ...how do I get floats back in the result instead of decimals? Chris -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] MapperExtension.[before|after]_update problem

2010-10-13 Thread Christophe de Vienne
Hi all, I am running into an issue with MapperExtension.[before|after]_update. Context --- SQLAlchemy 0.5.8 TurboGears 1.1.1 Description --- I will attempt a simple description first, as I don't think my actual code will help (I know it is not a thing to say, but really). We have

Re: [sqlalchemy] MapperExtension.[before|after]_update problem

2010-10-13 Thread Conor
On 10/13/2010 10:55 AM, Christophe de Vienne wrote: Hi all, I am running into an issue with MapperExtension.[before|after]_update. Context --- SQLAlchemy 0.5.8 TurboGears 1.1.1 Description --- I will attempt a simple description first, as I don't think my actual code will help

[sqlalchemy] Cannot retrieve PostgreSQL array column with session.query() : TypeError: unhashable type: 'list'

2010-10-13 Thread Julien Demoor
Hello, The problem I'm seeing is illustrated by the code below. I tried a workaround using TypeDecorator with process_result_value returning a tuple rather than a list, to no avail. Any help will be greatly appreciated. Regards. Traceback : Traceback (most recent call last): File

Re: [sqlalchemy] Cannot retrieve PostgreSQL array column with session.query() : TypeError: unhashable type: 'list'

2010-10-13 Thread Michael Bayer
The Query runs the result through unique_list() anytime there are mapped entities in the columns list. The ARRAY result, returning a Python list [], isn't hashable, so thats that. If you only queried for columns, it wouldn't be running through unique_list(). I suppose we'd modify ARRAY to

Re: [sqlalchemy] getting floats instead of decimals from session.execute

2010-10-13 Thread Michael Bayer
use text() with Numeric(as_decimal=False) On Oct 13, 2010, at 10:01 AM, Chris Withers wrote: Hi All, If I'm doing: session.execute('select some_numeric from some_table') ...how do I get floats back in the result instead of decimals? Chris -- You received this message because

Re: [sqlalchemy] getting floats instead of decimals from session.execute

2010-10-13 Thread Chris Withers
On 13/10/2010 22:37, Michael Bayer wrote: use text() with Numeric(as_decimal=False) I can't quite join the dots on this one... I get passed a bunch of sql to execute, I don't have control over that. Where do I wire in Numeric(as_decimal=False) and how do I tell where I need to given an