Michael,

Michael Bayer wrote:
....
First of all, thanks for this response.
> i'd embed the SP call explicitly in the select():
>
> select([table.c.id, table.c.foo, table.c.bar, func.convert_I18n 
> (table.c.data).label('data')]).where(...)
>
> if using the ORM, set up the column explicitly:
>
> mapper(SomeClass, sometable, properties={
>       'data':column_property(func.convert_I18n(table.c.data).label('data'))
> })
>   
I want to use the ORM.

My first go at this did not work, it might have to do with 
FB/kinterbasdb as it expects the stored procedures to be called in one 
of these ways.

cur.execute("select output1, output2 from the_proc(?, ?)", (input1, input2))

cur.callproc("the_proc", (input1, input2))

I'll spend some more time on this tomorrow.
> this way you dont add any statement overhead to the type conversion  
> (embedding in the TypeEngine means, number of I18N columns * total  
> number of rows number of SQL executions).
>
> If I were doing this I also might use TypeEngine for the conversion  
> but I'd move the I18N function into Python.
>   
Pity that the above is not reading "When I am going to ......" :-) .

Best regards
Werner

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to