[sqlalchemy] Re: SA and IBM DB2

2011-07-07 Thread Christian Klinger
Hi Michael, thanks for input. If i find some time i will start... Christian On Jul 6, 2011, at 11:19 AM, Christian Klinger wrote: Hi Michael, i am intrested in writing a dialect for DB2. Is there any howto which covers what is needed to start. Do you think we should write an extension, or

[sqlalchemy] Re: pymssql and decimal support

2011-07-07 Thread Emmanuel Cazenave
All right, I'm going to try pyodbc + freetds. Thank you very much for your response. On 6 juil, 19:39, Michael Bayer mike...@zzzcomputing.com wrote: On Jul 6, 2011, at 12:57 PM, emmanuelCAZENAVEwrote: Hello, I'm facing problems with mssql+pymssql: it seems that pymssql has poor decimal

[sqlalchemy] type safety using sqlite

2011-07-07 Thread Ben Sizer
I have a Column(Integer) called object_id. I assign to it a string or unicode value, eg. object_id = unot an integer. To my surprise, this doesn't raise any kind of exception when the row is committed. I can then expunge the session and request that row back, getting a Unicode object for that

Re: [sqlalchemy] type safety using sqlite

2011-07-07 Thread Michael Bayer
On Jul 7, 2011, at 12:43 PM, Ben Sizer wrote: I have a Column(Integer) called object_id. I assign to it a string or unicode value, eg. object_id = unot an integer. To my surprise, this doesn't raise any kind of exception when the row is committed. I can then expunge the session and request

[sqlalchemy] Re: type safety using sqlite

2011-07-07 Thread Ben Sizer
Thanks very much Michael, that should be more than enough information for me to find a solution. -- Ben Sizer -- 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

[sqlalchemy] Explicit main table

2011-07-07 Thread Bryan
I'm having trouble telling an orm query which table is the main table when I only use a single column from the main table and it is wrapped up in an SQL function. It's almost like SqlAlchemy can't see that I am using a column from that table because it is inside of a function:: # -- Schema

[sqlalchemy] Re: type safety using sqlite

2011-07-07 Thread Ben Sizer
Ok, this seems to do the trick for my use case, but I'd be curious to see if there's a better way or if there are things that should be fixed here. from types import IntType, LongType from sqlalchemy.exc import ArgumentError from sqlalchemy import event from sqlalchemy.orm import mapper def

[sqlalchemy] Numeric value error on blank field with sqlite

2011-07-07 Thread Fabrizio Pollastri
When I read a record where a field declared as numeric is a blank string, sqlalchemy gives the error ValueError: could not convert string to float:. Instead, I wish to get something like NaN or None. I am using sqlite. TIA, Fabrizio -- You received this message because you are

Re: [sqlalchemy] Explicit main table

2011-07-07 Thread Michael Bayer
On Jul 7, 2011, at 2:16 PM, Bryan wrote: I'm having trouble telling an orm query which table is the main table when I only use a single column from the main table and it is wrapped up in an SQL function. It's almost like SqlAlchemy can't see that I am using a column from that table

[sqlalchemy] hybrid, relationships and inheritance.

2011-07-07 Thread James Studdart
Hi all, I've got a question regarding hybrid properties and how to use them with single table inheritance. I've got a class hierarchy like this (in semi-pseudo code): class MyBase(object): # This has the tablename declared attr, id as primary key, generic table args etc. class

[sqlalchemy] Re: Explicit main table

2011-07-07 Thread Bryan
Thanks, that worked. On Jul 7, 11:57 am, Michael Bayer mike...@zzzcomputing.com wrote: On Jul 7, 2011, at 2:16 PM, Bryan wrote: I'm having trouble telling an orm query which table is the main table when I only use a single column from the main table and it is wrapped up in an SQL

[sqlalchemy] Problem with eagerload and lazy='joined'

2011-07-07 Thread Ben Chess
I've hit a problem where eagerload() fails to load in a relation of a relation when lazy='joined' is involved. It's easiest just to show the test. It fails in 0.7.1, and an equivalent test also fails in 0.6.8. http://pastebin.com/ruq6SM1z Basically, A has relations to B, C, and D. C's

Re: [sqlalchemy] Problem with eagerload and lazy='joined'

2011-07-07 Thread Michael Bayer
On Jul 7, 2011, at 7:04 PM, Ben Chess wrote: I've hit a problem where eagerload() fails to load in a relation of a relation when lazy='joined' is involved. It's easiest just to show the test. It fails in 0.7.1, and an equivalent test also fails in 0.6.8. http://pastebin.com/ruq6SM1z