[sqlalchemy] Migrating from 0.4.8 (yes 0.4.8)

2011-04-18 Thread Mathieu Tozer
We're still using 0.4.8 in a shipping desktop application and are suffering performance issues. I'm new to the project and python in general, and are moving away from it slowly, although we're going to be keeping our model implemented in python and therefore the ORM will probably stay too. Thus

[sqlalchemy] Support for SPARSE columns of SQL SERVER

2011-04-18 Thread krishna Banka
Hi, Is there a way to specify that a column of a table being created be SPARSE as supported by SQL SERVER ? Thanks, Krishna -- 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

[sqlalchemy] Re: How to find columns being updated/inserted given a Update/Insert object

2011-04-18 Thread bool
Thanks Michael. But this wont probably work if I want to find the columns within @Compiles(Insert) I have a use-case for the below. Can you help @compiles(Insert) def contextual_insert(insert, compiler, **kw): print insert.compile().params- This will

Re: [sqlalchemy] Facing problem with aliasing while using union_all

2011-04-18 Thread Michael Bayer
On Apr 18, 2011, at 1:50 AM, monster jacker wrote: Hi Micheal, As per your comment you want to say this issue whatever i am facing is resolved in 0.7 version of sqlalchemy? If i use the 0.7beta version this issue can be resolved? that is the case What i

[sqlalchemy] Re: Migrating from 0.4.8 (yes 0.4.8)

2011-04-18 Thread Daniel Holth
You should expect better ORM performance in newer versions. You should go straight to 0.6 and see what happens, with an eye on the 0.5 and 0.6 release notes for the things that most people have to change (it shouldn't be a big deal). RunSnakeRun is supposed to be a nifty profiler. Can you

Re: [sqlalchemy] Re: How to find columns being updated/inserted given a Update/Insert object

2011-04-18 Thread Michael Bayer
On Apr 18, 2011, at 6:56 AM, bool wrote: @compiles(Insert) def contextual_insert(insert, compiler, **kw): print insert.compile().params- This will gointo infinite loop. return compiler.visit_insert(insert, **kw) OK this is useful detail, that you're

[sqlalchemy] Exception instead of warning when uselist=False returns more than one

2011-04-18 Thread Kent
For relations that aren't fully normalized, you occasionally need uselist=False to specify one to one relationships (and maybe other reasons). Currently these issue warnings like Multiple rows returned with uselist=False for lazily-loaded attribute Would you be in favor of a setting which

Re: [sqlalchemy] Exception instead of warning when uselist=False returns more than one

2011-04-18 Thread Michael Bayer
On Apr 18, 2011, at 1:30 PM, Kent wrote: For relations that aren't fully normalized, you occasionally need uselist=False to specify one to one relationships (and maybe other reasons). Currently these issue warnings like Multiple rows returned with uselist=False for lazily-loaded

Re: [sqlalchemy] Support for SPARSE columns of SQL SERVER

2011-04-18 Thread Michael Trier
Is there a way to specify that a column of a table being created be SPARSE as supported by SQL SERVER ? You want a User Defined Type as described here: http://www.sqlalchemy.org/docs/core/types.html#creating-new-types It's simple to do and allows you to extend your column definition to add

[sqlalchemy] Re: Exception instead of warning when uselist=False returns more than one

2011-04-18 Thread Kent
Excellent. Thanks. On Apr 18, 1:50 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Apr 18, 2011, at 1:30 PM, Kent wrote: For relations that aren't fully normalized, you occasionally need uselist=False to specify one to one relationships  (and maybe other reasons). Currently these

[sqlalchemy] Support for tuple expressions?

2011-04-18 Thread bukzor
SQL-92 defines a row value constructor expression like (1,2,3) which looks and behaves exactly like a Python tuple, as far as I can tell. These are implemented correctly in mysql at least, and I believe PostgreSQL and Oracle as well, although I don't have access to those systems. What would be