[sqlalchemy] Re: Using custom functions and threading (v. 0.4.6)

2008-07-02 Thread Ryan Ginstrom
[mailto:[EMAIL PROTECTED] On Behalf Of Ryan Ginstrom If I start my method calls with begin() would I be able to create functions in the connection object, then use my session object to run queries? Founds this one out for myself: no, it doesn't work g Regards, Ryan Ginstrom

[sqlalchemy] Re: Using custom functions and threading (v. 0.4.6)

2008-07-02 Thread Michael Bayer
On Jul 1, 2008, at 10:38 PM, Ryan Ginstrom wrote: Thanks a lot for the information. I'm creating my session class like so: SessionClass = scoped_session(sessionmaker(bind=engine, autoflush=True, transactional=True)) I'm closing out each exposed method call with a

[sqlalchemy] Re: Using custom functions and threading (v. 0.4.6)

2008-07-01 Thread Michael Bayer
On Jul 1, 2008, at 9:00 PM, Ryan Ginstrom wrote: I'm a newbie to SQLAlchemy, so please excuse me if this is common knowledge. Using the sqlite backend, I'm creating custom functions and then running queries with them. I started by using the connection's create_function method, and

[sqlalchemy] Re: Using custom functions and threading (v. 0.4.6)

2008-07-01 Thread Ryan Ginstrom
[mailto:[EMAIL PROTECTED] On Behalf Of Michael Bayer Theres some things you're doing that would specifically cause you to get back a different connection than the one you created the function on, even within a single thread; except that the SQLite dialect uses the SingletonThreadPool pool