Re: [sqlalchemy] Secialists question: how to do implement stock-management

2010-11-25 Thread Chris Withers
On 30/10/2010 02:43, Warwick Prince wrote: We can continue this one-on-one outside the group. Send your questions to me. I prefer Skype for this type of thing - see my Skype id below. ...except the rest of the group doesn't then benefit fgrom the discussion ;-) The discussion is only

[sqlalchemy] Table name without quoting with upper case

2010-11-25 Thread Tony Moutaux
Hi there ! I'm a newby du SA and try to make it work with our production platform, using Sybase and old and scarry database schema, with table names like Prestation , with 1 upper case. Sybase does not allow (to my knowledge) tu use something like select Prestation.id So I try to figure how to

[sqlalchemy] SQLite 'DATETIME' adapter timezone awareness

2010-11-25 Thread Pedro Romano
Needing timezone aware 'DateTime' columns in my 'SQLite' database, I noticed that the aware 'datetime's I was storing in the SQLite database in the 'DateTime(timezone=True)' columns were being stored as naive timestamps without timezone information. I also checked that in the source code

Re: [sqlalchemy] SQLite 'DATETIME' adapter timezone awareness

2010-11-25 Thread Michael Bayer
I would qualify that as a missing feature. The timezone=True flag is so far only implemented for Postgresql's TIMESTAMP type which features this option natively.SQLite's type could support this flag as well so I've added ticket #1985. For now you'd have to subclass sqlite.DATETIME and

Re: [sqlalchemy] Table name without quoting with upper case

2010-11-25 Thread Michael Bayer
On Nov 25, 2010, at 4:30 AM, Tony Moutaux wrote: Hi there ! I'm a newby du SA and try to make it work with our production platform, using Sybase and old and scarry database schema, with table names like Prestation , with 1 upper case. Sybase does not allow (to my knowledge) tu use

[sqlalchemy] Idempotent updating (Update or insert)

2010-11-25 Thread Nickle
I'm trying to get my head around idempotent updating. ie I'm creating some objects, I want to store them. These objects might or might not be already stored in the database. If they are, I want to update them if necessary (a field has changed), or insert them if they do not exist. What's the

Re: [sqlalchemy] Idempotent updating (Update or insert)

2010-11-25 Thread Michael Bayer
On Nov 25, 2010, at 11:02 AM, Nickle wrote: I'm trying to get my head around idempotent updating. ie I'm creating some objects, I want to store them. These objects might or might not be already stored in the database. If they are, I want to update them if necessary (a field has changed),

Re: [sqlalchemy] Idempotent updating (Update or insert)

2010-11-25 Thread Nick Leaton
Thanks Michael, I'll check the two articles out tonight Nick On 25 November 2010 17:05, Michael Bayer mike...@zzzcomputing.com wrote: On Nov 25, 2010, at 11:02 AM, Nickle wrote: I'm trying to get my head around idempotent updating. ie I'm creating some objects, I want to store them. These

[sqlalchemy] query error

2010-11-25 Thread Alexander Zhabotinskiy
Hello This is oracle table and query. I have no idea why the query isn't work. Where it takes unicode? Regards sqlplus desc staff; NCL NOT NULL NUMBER(17) FAMILYNAMEVARCHAR2(40) FIRSTNAME VARCHAR2(40)

Re: [sqlalchemy] query error

2010-11-25 Thread Michael Bayer
The 'Text' type implies the usage of CLOB on oracle, which with cx_ oracle implies a LOB object that has a 'read()' method. With a varchar just use the sqlalchemy String or VARCHAR types with your table metadata to handle the incoming data appropriately. On Nov 25, 2010, at 1:33 PM,

[sqlalchemy] Re: SQLite 'DATETIME' adapter timezone awareness

2010-11-25 Thread Domingo Aguilera
Somewhat related to this Michael, is there a way to express a server_default meaning native engine's timestamp for DateTime columns? A value that would mean getutcdate() in sql server, current_timestamp in postgresql and so on? -- You received this message because you are subscribed to the

Re: [sqlalchemy] Re: SQLite 'DATETIME' adapter timezone awareness

2010-11-25 Thread Michael Bayer
On Nov 25, 2010, at 8:40 PM, Domingo Aguilera wrote: Somewhat related to this Michael, is there a way to express a server_default meaning native engine's timestamp for DateTime columns? A value that would mean getutcdate() in sql server, current_timestamp in postgresql and so on?

[sqlalchemy] Re: query error

2010-11-25 Thread Alexander Zhabotinskiy
Thanks, It works fine! On 26 ноя, 02:58, Michael Bayer mike...@zzzcomputing.com wrote: The 'Text' type implies the usage of CLOB on oracle, which with cx_ oracle implies a LOB object that has a 'read()' method.   With a varchar just use the sqlalchemy String or VARCHAR types with your table