[sqlalchemy] Re: SA (4.0) mssql table creation problems. No Python Errors?

2007-10-22 Thread Eddie
> yeah this is something configurational with your DBAPI. anything > wrong on the python side would throw an exception which you'd > see...that the program just ends, something native is going on. try > writing a simple DBAPI (no sqlalchemy) program that just imports the > driver and issues a co

[sqlalchemy] Re: multiple inserts of sqlalchemy instances?

2007-10-22 Thread Barry Hart
I've written code similar to this with no problems. Are you using assign_mapper? If so, the save() call is unnecessary. Do you get this error on the first object or on some subsequent object? Barry - Original Message From: Lukasz Szybalski <[EMAIL PROTECTED]> To: sqlalchemy@googlegroup

[sqlalchemy] multiple inserts of sqlalchemy instances?

2007-10-22 Thread Lukasz Szybalski
Hello, I need to save data multiple times in a for loop. I was trying to do something like this: You are able to select which group you want to be in: A,B,C,D for record in userchoice: new=model.User() #set some variables if record.group=='A': #set some more fields ne

[sqlalchemy] Re: Concurrency problem with SA 0.4

2007-10-22 Thread Michael Bayer
On Oct 22, 2007, at 1:43 PM, alain D. wrote: > > thanks a lot for you reply ... > > If I understand correctly, a simple "sess.begin()" in #2 executed > right after the #1 commit will work (?). But I tested it and I still > dont get the commited object ... > What am I missing no, a sess.rollback

[sqlalchemy] Re: convert_unicode problem

2007-10-22 Thread Moo
Michael, congratulations on releasing SA 0.4.0! I tried the code above with SA 0.4.0, no error occured and I got 'unicode' that I'd like to get! I don't know which change has resolved the problem, I'm so glad, though. Thanks! --~--~-~--~~~---~--~~ You received th

[sqlalchemy] Re: Concurrency problem with SA 0.4

2007-10-22 Thread alain D.
I forgot to say that I use mysql with InnoDB backend (autoflush=True,transactional=True) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegro

[sqlalchemy] Re: Concurrency problem with SA 0.4

2007-10-22 Thread alain D.
thanks a lot for you reply ... If I understand correctly, a simple "sess.begin()" in #2 executed right after the #1 commit will work (?). But I tested it and I still dont get the commited object ... What am I missing --~--~-~--~~~---~--~~ You received this messa

[sqlalchemy] Re: Reflecting Tables does not work with SQLite

2007-10-22 Thread Michael Bayer
rev 3651 On Oct 22, 2007, at 9:01 AM, Markus Gritsch wrote: > --~--~-~--~~~---~--~~ 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 fr

[sqlalchemy] Re: Concurrency problem with SA 0.4

2007-10-22 Thread Michael Bayer
On Oct 22, 2007, at 4:25 AM, alain D. wrote: > > Obj is a simple python object with on field (key : String(10)) mapped > to a table with on field (key) with is the primary key. > Session is defined like this : > engine = create_engine("**mysql_string**", strategy='threadlocal', > pool_size=50)

[sqlalchemy] Re: Missing escaping for '%' in execute

2007-10-22 Thread Michael Bayer
On Oct 22, 2007, at 7:18 AM, Steffen wrote: > > An '%' in a raw sql statement executed with execute will raise > following error because it is not properly escaped: > > : (TypeError) 'dict' object > is unindexable > 2007/10/22 12:55:01 - /usr/lib/python2.5/site-packages/ > SQLAlchemy-0.4.0-py2.5

[sqlalchemy] Re: Please add some __len__ methods

2007-10-22 Thread Michael Bayer
On Oct 22, 2007, at 6:32 AM, klaus wrote: > > Hi all, > I wonder why some classes/objects implement part of a list interface - > but without a __len__ method. Obvious examples are: > > Query has __iter__ and __getitem__, both of which access the database. > __len__ would be a nice alternative to

[sqlalchemy] Re: Reflecting Tables does not work with SQLite

2007-10-22 Thread Markus Gritsch
Hi, The attached patch for the sqlite backend would recognize DECIMAL columns as being of type Numeric. Kind regards, Markus On 10/19/07, Markus Gritsch <[EMAIL PROTECTED]> wrote: > On 10/18/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > > sqlite doesnt have DECIMAL or TINYINT types defined.

[sqlalchemy] Re: Deprecation warning when using SqlSoup (SessionContextExt)

2007-10-22 Thread Markus Gritsch
Hi, the examples in the polymorph directory also all issue deprecation warnings. Kind regards, Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch

[sqlalchemy] Deprecation warning when using SqlSoup (SessionContextExt)

2007-10-22 Thread Steffen
In the new release this warning is still there: /usr/lib/python2.5/site-packages/SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/ ext/sessioncontext.py:39: sqlalchemy.logging.SADeprecationWarning: SessionContextExt is deprecated. Use ScopedSession(enhance_classes=True) Shouldn't SqlSoup be cleaned up wit

[sqlalchemy] Missing escaping for '%' in execute

2007-10-22 Thread Steffen
An '%' in a raw sql statement executed with execute will raise following error because it is not properly escaped: : (TypeError) 'dict' object is unindexable 2007/10/22 12:55:01 - /usr/lib/python2.5/site-packages/ SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/engine/base.py:1115:execute 2007/10/22 12:55:

[sqlalchemy] Re: Please add some __len__ methods

2007-10-22 Thread King Simon-NFHD78
> -Original Message- > From: sqlalchemy@googlegroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of klaus > Sent: 22 October 2007 11:33 > To: sqlalchemy > Subject: [sqlalchemy] Please add some __len__ methods > > > Hi all, > I wonder why some classes/objects implement part of a list inte

[sqlalchemy] Please add some __len__ methods

2007-10-22 Thread klaus
Hi all, I wonder why some classes/objects implement part of a list interface - but without a __len__ method. Obvious examples are: Query has __iter__ and __getitem__, both of which access the database. __len__ would be a nice alternative to a basic count(). Session has __iter__ and __contains__.

[sqlalchemy] Concurrency problem with SA 0.4

2007-10-22 Thread alain D.
Hi, I've a problem using SQ version 0.4. I guess this is something I do wrong (since I'm a newbie with SA) ... but it might be a bug ... Basically the problem is the following : when I launch 2 sessions in parallel : after a successful commit in the first session, requesting the inserted ob