Re: [sqlalchemy] How can I declare the 'row_format' and 'key_block_size' during table creation?

2014-02-16 Thread DoDo
: > > t = Table('t', m, Column('q', Integer), > mysql_key_block_size="50", > mysql_row_format='COMPRESSED' > ) > > e = create_engine("mysql://scott:tiger@localhost/test", echo=True) > t.create(e) > >

[sqlalchemy] How can I declare the 'row_format' and 'key_block_size' during table creation?

2014-02-15 Thread DoDo
Hello all, May I know the way to declare the 'row_foramt' and 'key_block_size' during table creation? The parameter I'd like to use: ROW_FORMAT=compressed KEY_BLOCK_SIZE=8 Thank you. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscr

[sqlalchemy] Re: How can I get the query result filter_by the capital or lower letter?

2012-10-31 Thread DoDo
I find the answer that I need to use the utf_bin during the Column definition. Something like below: code = Column(VARCHAR(10, collation='utf8_bin'), nullable = False) then I can get the case sensitive support from the query filter. DoDo於 2012年10月27日星期六UTC+8下午11時41分06秒寫道: > &

[sqlalchemy] How can I get the query result filter_by the capital or lower letter?

2012-10-27 Thread DoDo
I try to use the query with filter_by function to grab the data from a table. But it can't get the correct return. session. query(testtable).filter_by(code = '1A') session. query(testtable).filter_by(code = '1a') How should I specify the capital letter or lower letter in filter_by function?

Re: [sqlalchemy] How can I handle 100 tables with same table structure in SQLAlchemy?

2012-10-22 Thread DoDo
Thanks. Michael! This works for me. DoDo Michael Bayer於 2012年10月21日星期日UTC+8下午11時41分06秒寫道: > > sure, you'd write a loop. I'm not sure if you're looking for core Table > objects or declarative classes, I'm guessing declarative classes: > > > from sqlalch

[sqlalchemy] How can I handle 100 tables with same table structure in SQLAlchemy?

2012-10-21 Thread DoDo
Hello all, I encounter a situation that I have 100 tables in the same database but with same table structure. With SQLAlchemy, I need to copy 100 different class in order to adopt these tables. Is there any better way to do that? For example, I can use a general class to describe a table struct