[sqlalchemy] Session is already flushing

2009-06-05 Thread Michael Mileusnich
I am using a scoped session in my sql alchemy app. Can anybody help me with what this error means: Session is already flushing _mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now"5 --~--~-~--~~~---~--~~ You received this

[sqlalchemy] ForeignKey not saved - sqlite3, TG1.1

2009-06-05 Thread Adam Yee
I've got a simple mapping between User and Blog: # Parent user_table = Table('user', metadata, Column('id', Integer, primary_key=True), Column('username', String(50)), Column('password', Unicode(50)), ) # Child blog_table = Table('blog', metadata, Column('id', Integer, primary_key

[sqlalchemy] Reading in single columns as numpy arrays

2009-06-05 Thread Thomas
Hi, I'm trying to read in single columns from an SQL database as 1D numpy arrays with the correct types. So a FLOAT column would be returned as a numpy.float32 array, etc. Is there an easy way to do this? I tried to select a column from the whole table, and going through each element and appendi

[sqlalchemy] Mapping several properties to a select in declarative

2009-06-05 Thread Joakim Lundborg
Hi I have a few properties on an class specefied in declarative that are mapped to a select, but I have only figured out how to map them individually. I'd like to be able to specify the select only once, and then pick what property maps to which field name, and make sure they load simultaneously,

[sqlalchemy] Re: "Underscore tables" - odd table renaming

2009-06-05 Thread Mike Conley
Here is one approach I would start with: Maybe the metadata instance used to generate the SQL thinks tables have _1 appended to some of the table names. Look at metadata.tables.keys() to see if that is the case. If that is true, track back to how the metadata instance was built. If not, then it

[sqlalchemy] "Underscore tables" - odd table renaming

2009-06-05 Thread outlier
I'm not even sure where to start studying this problem but here goes: I have an application that uses a MySQL db wrapped with SA and it works fine. While writing new features, I've been working on a test database. Call it 'baz'. Content with the way things are working, I dump data from from the l

[sqlalchemy] oracle table space

2009-06-05 Thread sbard
hello.There's a very interesting feature in oracle. You can specify the table space you'd like to use for data or index of a Table for example : I use one table space for the data and another for the index sample for TABLE syntaxe Create table toto ( xx VARCHAR2(3), xxx VARCHAR