[sqlalchemy] Re: Creating a custom type

2008-12-22 Thread Kless
Thank you. Your aid is incalculable as always. I'll use a descriptor for this case as you well advise. On 22 dic, 03:40, Michael Bayer mike...@zzzcomputing.com wrote: oh, yeah for that recipe you'd have to use a flag on the mapper()   called batch=False.    But don't use that, its inefficient.

[sqlalchemy] Re: Creating a custom type

2008-12-22 Thread Kless
Although it's necessary to consider that continues being necessary a custom type to add a new argument (in this case is 'cost'). And I prefer a custom type before that a subclass of Column for this one. Now well, to get the another argument which is at instance-level surely will be better make

[sqlalchemy] Re: retrying queries and 'Lost connection to MySQL server'

2008-12-22 Thread Michael Bayer
On Dec 22, 2008, at 12:22 AM, Bobby Impollonia wrote: This code isn't using transactions so retrying a failed query should be as simple as creating a new connection to replace the failed one and executing the query again. Still, I would much prefer to figure out the real cause, as you

[sqlalchemy] Renaming Columns and Union - possible bug

2008-12-22 Thread Eoghan Murray
The following example uses an elixir class: class MyE(Entity): id = Field(Integer, primary_key=True) f_1 = ManyToOne('OtherE') f_2 = ManyToOne('OtherE') date = Field(Date) MyE.query.select_from(union(MyE.table.select(), select([MyE.id,

[sqlalchemy] Re: Renaming Columns and Union - possible bug

2008-12-22 Thread Gaetan de Menten
On Mon, Dec 22, 2008 at 17:06, Eoghan Murray eoghanomur...@gmail.com wrote: The following example uses an elixir class: class MyE(Entity): id = Field(Integer, primary_key=True) f_1 = ManyToOne('OtherE') f_2 = ManyToOne('OtherE') date = Field(Date)

[sqlalchemy] Re: MSSQL default_schema

2008-12-22 Thread Randall Smith
Michael Bayer wrote: just FTR, the current expected behavior of default schemas is that if your tables are known to exist in the default schema configured on the database connection, you leave the schema attribute on Table blank. otherwise, you set it. The mssql dialect does not ask the

[sqlalchemy] Re: MSSQL default_schema

2008-12-22 Thread Michael Bayer
On Dec 22, 2008, at 6:36 PM, Randall Smith wrote: Michael Bayer wrote: just FTR, the current expected behavior of default schemas is that if your tables are known to exist in the default schema configured on the database connection, you leave the schema attribute on Table blank.

[sqlalchemy] Re: MSSQL default_schema

2008-12-22 Thread Empty
On Dec 22, 2008, at 6:36 PM, Randall Smith wrote: Michael Bayer wrote: just FTR, the current expected behavior of default schemas is that if your tables are known to exist in the default schema configured on the database connection, you leave the schema attribute on Table blank.

[sqlalchemy] Re: MSSQL default_schema

2008-12-22 Thread Empty
On Mon, Dec 22, 2008 at 8:46 PM, Empty mtr...@gmail.com wrote: On Dec 22, 2008, at 6:36 PM, Randall Smith wrote: Michael Bayer wrote: just FTR, the current expected behavior of default schemas is that if your tables are known to exist in the default schema configured on the

[sqlalchemy] Re: MSSQL default_schema

2008-12-22 Thread Randall Smith
Michael Bayer wrote: Shouldn't mssql do something similar to Postgres here? it certainly should. Ticket 1258 -Randall --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this

[sqlalchemy] Re: MSSQL default_schema

2008-12-22 Thread Empty
On Mon, Dec 22, 2008 at 10:00 PM, Randall Smith rand...@tnr.cc wrote: Michael Bayer wrote: Shouldn't mssql do something similar to Postgres here? it certainly should. Ticket 1258 Nice. Thank you very much. Michael --~--~-~--~~~---~--~~ You received

[sqlalchemy] Re: MSSQL default_schema

2008-12-22 Thread Empty
On Mon, Dec 22, 2008 at 10:45 PM, Empty mtr...@gmail.com wrote: On Mon, Dec 22, 2008 at 10:00 PM, Randall Smith rand...@tnr.cc wrote: Michael Bayer wrote: Shouldn't mssql do something similar to Postgres here? it certainly should. Ticket 1258 Fixed in r5527. Thanks again,