[sqlalchemy] Re: convert_unicode and Query strings with a helping of PyODBC and FreeTDS on OS X

2009-07-07 Thread John Hampton
John Hampton wrote: > So, the problem that I am having is that when I try to do a query, I get > back the following error: > > sqlalchemy.exc.ProgrammingError: (ProgrammingError) ('The SQL contains 0 > parameter markers, but 1 parameters were supplied', 'HY000') Due to ticket #1313 I tried out t

[sqlalchemy] convert_unicode and Query strings with a helping of PyODBC and FreeTDS on OS X

2009-07-07 Thread John Hampton
So, the problem that I am having is that when I try to do a query, I get back the following error: sqlalchemy.exc.ProgrammingError: (ProgrammingError) ('The SQL contains 0 parameter markers, but 1 parameters were supplied', 'HY000') Yet, in the query output, it is clear that there is a value sup

[sqlalchemy] Re: cascades and mappers

2009-07-07 Thread Michael Bayer
On Jul 7, 2009, at 9:23 PM, Michael Mileusnich wrote: > To get foreign keys in my python app I am doing the following: > > ForeignKeyConstraint(['USERID'], ['USERS.USERID'], ondelete="CASCADE") I would suggest using lowercase names there, i.e. "userid", "users.userid", which indicates a case

[sqlalchemy] cascades and mappers

2009-07-07 Thread Michael Mileusnich
To get foreign keys in my python app I am doing the following: ForeignKeyConstraint(['USERID'], ['USERS.USERID'], ondelete="CASCADE") and my mappers are nothing more than mapper(class, table). Is there anything wrong with not defining the relation in the mapper as well? Also, is there a way for

[sqlalchemy] Re: Unique parent class and various subclasses

2009-07-07 Thread Mike Conley
Not seeing your table definition, the problem appears to be a data modeling issue. The constraint says each ("sentence_id","start","end") combination is unique, and the integrity exception is complaining that the data supplied is not unique. The code snippet for the inserts does have duplicate data

[sqlalchemy] Unique parent class and various subclasses

2009-07-07 Thread Nathan Harmston
Hi, Currently I have a mapper like this: class Entity: def __init__(self, type, create, sentence_id, start, end): self.type = type self.create = create self.sentence_id = sentence_id self.start = start self.end = end class Interval: def __init

[sqlalchemy] Re: Commiting inserts made through Stored Procedure calls

2009-07-07 Thread Rodney Haynie
Michael Bayer wrote: > Rodney Haynie wrote: > >>> >> Ok, tried it. Still no data being committed. >> No errors popping either. >> > > its likely a turbogears usage issue so check with their list. I know > they have their own idea about transactional scope. > > For what its