[sqlalchemy] Mixing declarative style with expression language

2013-02-12 Thread Oltmans
Greetings, I trust everyone is doing well. Our code base uses SQLAlchemy and some of the old code uses expression language style code e.g. appts = Table(Appointment, META, autoload=True, autoload_with=DB) statement = select([appts.c.appointmentId], and_( appts.c.appointmentId ==

[sqlalchemy] How to make sure all connections are closed?

2012-07-18 Thread Oltmans
Hi all, I've a Django app, structure of which looks something like http://codepad.org/Tha7ySNL . This app is serving few hundred customers and lately network admin said he's been seeing lot of open connections. What can I do to make sure there are no open connections? Is there anything that

[sqlalchemy] Please help in completely converting raw sql to SQLAlchemy code(I tried but not there yet)

2012-04-06 Thread Oltmans
Greetings, I hope all are well. First off, all I'm sorry that my SQL isn't great. I've a raw SQL that looks like following select a.appointmentId, a.patientId, r.MaxTime from ( select appointmentid, patientid, max(apptDate) as MaxTime from appointment where

[sqlalchemy] How to fix mapped entity is required error?

2012-04-03 Thread Oltmans
Greetings, I'm using SQLAlchemy 0.6 with Python 2.6 medical-app/ facility/ recalls.py common/ __init__.py patient.py common.py settings.py So the application I'm working on has directory structure as

[sqlalchemy] (Newbie)About loading a table only once

2011-07-01 Thread Oltmans
Greetings, First, many thanks for creating such an awesome library. Secondly, I'm very new to this and I've a basic question. I've a method that looks like following def test_table_load(self): doctor = Table('TestTable', META, autoload=True, autoload_with=DB) Now while the software runs,

[sqlalchemy] (Newbie)About loading a table only once

2011-07-01 Thread Oltmans
Greetings, First, many thanks for creating such an awesome library. Secondly, I'm very new to this and I've a basic question. I've a method that looks like following def test_table_load(self): doctor = Table('TestTable', META, autoload=True, autoload_with=DB) Now while the software runs,