[sqlalchemy] db:unicode, app:some-encoding

2008-06-28 Thread az
how can i get such thing going? convert_unicode=... and friends suggests the other way round, i.e app:unicode and db:some_encoding. should i make my own StringType? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "s

[sqlalchemy] sa0.5 __init__ replacement

2008-06-28 Thread az
hi i have class X(object): X.__init__ = setattr_kargs where def setattr_kargs( *args, **kargs): assert len(args)==1 x = args[0] for k,v in kargs.iteritems(): setattr( x, k, v) when SA comes to play, it fails to find a 'self' in "__init__" arguments. in format_argspec_plus()

[sqlalchemy] MySQL 5.0 DateTime initialization during Table creation is failing.

2008-06-28 Thread Gloria W
Hi All, Looking back in these posts, I tried several older variants of MySQL datetime column initialization discussed here, and they're not working. This works in Postgresql: sqlalchemy.Column('date_created', sqlalchemy.DateTime, sqlalchemy.PassiveDefault(sqlalchemy.sql.func.now()), nullabl

[sqlalchemy] MySQL 5.0 DateTime initialization during Table creation is failing.

2008-06-28 Thread Gloria W
Hi All, Looking back in these posts, I tried several older variants of MySQL datetime column initialization discussed here, and they're not working. This works in Postgresql: sqlalchemy.Column('date_created', sqlalchemy.DateTime, sqlalchemy.PassiveDefault(sqlalchemy.sql.func.now()), nullabl

[sqlalchemy] Using the with statement with sessions

2008-06-28 Thread [EMAIL PROTECTED]
Hi all, I really like the idea of the with statement thats coming in Python 2.6 and want to use it in my SQLAlchemy code. However I can't seem to get it to work for commits. I have tried the below code (snipped): Session = sessionmaker(bind=engine) def loadData(filename): sess = Session()