[sqlalchemy] implementation of periodic task or time triggered update

2011-11-29 Thread Tate Kim
Hello everyone, I think this question may be for the database side, but i 'd like to post here if you don't mind. I have a certain periodic task that bult updates a couple of columns has expired in License table. ( It doesn't matter what it is. ) In this situation, time accuracy was really

Re: [sqlalchemy] multiple many-to-one to same class

2011-11-29 Thread Michael Bayer
On Nov 29, 2011, at 11:19 AM, Nathan Finstein wrote: teacher has two many-to-one relationships with student. A teacher can have a favorite student and a worst student. A student can be the favorite (or worst) of many teachers 1) Error is not surprising, since there is nothing to indicate

Re: [sqlalchemy] implementation of periodic task or time triggered update

2011-11-29 Thread Michael Bayer
On Nov 29, 2011, at 3:51 AM, Tate Kim wrote: Hello everyone, I think this question may be for the database side, but i 'd like to post here if you don't mind. I have a certain periodic task that bult updates a couple of columns has expired in License table. ( It doesn't matter what

[sqlalchemy] Re: Sybase prepared statements

2011-11-29 Thread Firass Asad
To give this thread closure: The vendor said that Sybase 11 makes a distinction between creating procedures and creating temporary procedures, and Sybase 9 treats all procedure creating the same and thus they can't give our read-only account this permission. So we plan on upgrading to Sybase 11

Re: [sqlalchemy] How to revert all changes on an object before Session.merge(o, load=False) ?

2011-11-29 Thread Michael Bayer
On Nov 29, 2011, at 2:35 PM, Łukasz Czuja wrote: Hello, I'm trying to figure out a way to use Session.merge(o, load=False), on an object which is not bound to a session (Session.remove() used after the object was modified, but the changes were not commited). When the object's state is

[sqlalchemy] Re: How to revert all changes on an object before Session.merge(o, load=False) ?

2011-11-29 Thread Łukasz Czuja
On 29 Lis, 20:53, Michael Bayer mike...@zzzcomputing.com wrote: On Nov 29, 2011, at 2:35 PM, Łukasz Czuja wrote: Hello, I'm trying to figure out a way to use Session.merge(o, load=False), on an object which is not bound to a session (Session.remove() used after the object was modified,

[sqlalchemy] UnicodeDecodeError during reflection

2011-11-29 Thread Dirk Makowski
Hello, using SQLAlchemy 0.7.3's Inspector, I'm reflecting the columns of a table, and it fails with this trace: File ./main.py, line 106, in module dbmgr.reflect() File ./main.py, line 32, in reflect self.fetch_tables(schema='eg') File ./main.py, line 58, in fetch_tables cols0

Re: [sqlalchemy] UnicodeDecodeError during reflection

2011-11-29 Thread Michael Bayer
On Nov 29, 2011, at 9:51 PM, Dirk Makowski wrote: Hello, using SQLAlchemy 0.7.3's Inspector, I'm reflecting the columns of a table, and it fails with this trace: File ./main.py, line 106, in module dbmgr.reflect() File ./main.py, line 32, in reflect

[sqlalchemy] Re: UnicodeDecodeError during reflection

2011-11-29 Thread Dirk Makowski
Thanks for the quick reply. Passing use_native_unicode=False to create_engine() indeed prevents this error. Is this parameter missing in the docs for create_engine() (http://www.sqlalchemy.org/docs/core/engines.html#engine-creation-api)? I had assumed the encoding parameter to set the wanted

Re: [sqlalchemy] Re: UnicodeDecodeError during reflection

2011-11-29 Thread Michael Bayer
On Nov 29, 2011, at 10:39 PM, Dirk Makowski wrote: Thanks for the quick reply. Passing use_native_unicode=False to create_engine() indeed prevents this error. Is this parameter missing in the docs for create_engine() (http://www.sqlalchemy.org/docs/core/engines.html#engine-creation-api)?

[sqlalchemy] Re: UnicodeDecodeError during reflection

2011-11-29 Thread Dirk Makowski
I see. Thanks for the explanation. I totally forgot to read the dialect specific docs... ;) Maybe it would be nice to have the general docs point out that specialities for a certain subject like encodings are also handled by some dialects. E.g. for create_engine(): Some dialects may have

[sqlalchemy] Re: UnicodeDecodeError during reflection

2011-11-29 Thread Dirk Makowski
P.S. for completeness: As you had suggested, create_engine(encoding='utf-8', convert_unicode=False, client_encoding='utf8') runs perfectly without use_native_unicode. -- Dirk -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To view this discussion

[sqlalchemy] Re: UnicodeDecodeError during reflection

2011-11-29 Thread Dirk Makowski
Ah, there already is such a paragraph at create_engine(). Please ignore my suggestion :) -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/VUPx-eF5CkMJ. To post

Re: [sqlalchemy] Re: UnicodeDecodeError during reflection

2011-11-29 Thread Michael Bayer
On Nov 29, 2011, at 11:18 PM, Dirk Makowski wrote: I see. Thanks for the explanation. I totally forgot to read the dialect specific docs... ;) Maybe it would be nice to have the general docs point out that specialities for a certain subject like encodings are also handled by some