[sqlalchemy] Re: using Utf8 problem

2014-01-30 Thread Alexander Peprepelica
>Unknown character set: 'utf8mb4'" Versions Windows sqlalchemy 0.9.1 MySQL-python 1.2.3 Linux SQLAlchemy==0.9.1 MySQL-python==1.2.5 MySQL is connected bu ssh tunnel on windows and linux (but in linux I use putty+wine) -- You received this message because you are subscribed to the Google Groups

Re: [sqlalchemy] What is the best way to store runtime information in model?

2014-01-30 Thread Pavel Aborilov
I need to have access to this state in a whole life of app, but as I undestand it's not a good way to use one session all time. Proper way, to open session, do all my stuff with DB, then close session. But then I lost my state. In java I have DAO layer and business object, that store all my db f

[sqlalchemy] Re: PostgreSQL 9.1 on the horizon, cool new stuff

2014-01-30 Thread Lucas Taylor
Any notion of how one might instruct SQLAlchemy to (conditionally) create tables using UNLOGGED? I'd like to be able to modify the DDL for all CREATE TABLE statements under certain conditions (dialect=postgresql & testing=True) If not under test, then there would be no need to modify CREATE TABL

[sqlalchemy] Re: using Utf8 problem

2014-01-30 Thread Jameson Lee
I would highly encourage that you use utf8mb4 instead of utf8 http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html On Thursday, January 30, 2014 7:57:40 AM UTC-8, Jeff Dairiki wrote: > > > > On Thursday, January 30, 2014 6:11:15 AM UTC-8, Alexander Peprepelica > wrote: >> >> I hav

Re: [sqlalchemy] result of fetchone() in 0.9.1

2014-01-30 Thread Michael Bayer
On Jan 30, 2014, at 4:39 PM, jack2318 wrote: > Hi, > > I experience very strange behaviour in version 0.9.1 (no problem in version > 0.8.4) - I can't image that it is problem in SQLAlchemy but I don't see why I > am getting error running this code: > > > tbl_session = Table('SESSION', metad

[sqlalchemy] result of fetchone() in 0.9.1

2014-01-30 Thread jack2318
Hi, I experience very strange behaviour in version 0.9.1 (no problem in version 0.8.4) - I can't image that it is problem in SQLAlchemy but I don't see why I am getting error running this code: tbl_session = Table('SESSION', metadata, autoload=True) stmt = tbl_session.select(tbl_session).wher

Re: [sqlalchemy] What is the best way to store runtime information in model?

2014-01-30 Thread Michael Bayer
On Jan 30, 2014, at 1:58 PM, Pavel Aborilov wrote: > Hi! > > What is the best way to store runtime information in model? attributes and columns have an .info property you can use, if this is per-attribute User.fullname.info[‘some_info’] = ‘bar’ otherwise certainly, store any additional sta

[sqlalchemy] What is the best way to store runtime information in model?

2014-01-30 Thread Pavel Aborilov
Hi! What is the best way to store runtime information in model? And is it good idea to store one in a model(like online/offline, etc) for example: class User(Base):__tablename__ = 'users'id = Column(Integer, primary_key=True)username = Column(String, unique=True, nullable=False)

[sqlalchemy] Re: using Utf8 problem

2014-01-30 Thread Jeff Dairiki
On Thursday, January 30, 2014 6:11:15 AM UTC-8, Alexander Peprepelica wrote: > > I have such code > > engine = create_engine(u'mysql+mysqldb:// > login:pass@127.0.0.1:3307/mydb?charset=utf8&use_unicode=1') > > in windows all is fine > > But when I execute code in linux I have problem with unicode

[sqlalchemy] using Utf8 problem

2014-01-30 Thread Alexander Peprepelica
I have such code engine = create_engine(u'mysql+mysqldb://login:pass@127.0.0.1:3307/mydb?charset=utf8&use_unicode=1') in windows all is fine But when I execute code in linux I have problem with unicode What I do wrong? -- You received this message because you are subscribed to the Google Grou