Re: [sqlalchemy] [ANN] SQLTap - SQL profiling and introspection for SQLAlchemy applications

2014-03-11 Thread limodou
To post to this group, send email to sqlalchemy@googlegroups.com. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "s

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-08 Thread limodou
On Thu, Jan 9, 2014 at 12:20 AM, Michael Bayer wrote: > > On Jan 8, 2014, at 7:54 AM, limodou wrote: > > I think there are two things here: >> > > 1. Should None be converted to NULL when deal with "condition & None" or > "and_(condition, None)&qu

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-08 Thread limodou
x27;, None) id=3 AND NULL >>> print and_('id=3', '') id=3 >>> print and_('id=3', true()) id=3 So empty string is the same as true(), and why empty string can be treated as true() but None is treated as NULL? Commonly, python will treat None, empty str

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-07 Thread limodou
On Wed, Jan 8, 2014 at 3:31 PM, Wichert Akkerman wrote: > > On 08 Jan 2014, at 01:26, limodou wrote: > > > But I don't know why make this decision. Because "where NULL" will get > nothing. And in 0.8.X version, I need to combine multiple condition > accordin

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-07 Thread limodou
tml#improved-rendering-of-boolean-constants-null-constants-conjunctions > > > On Jan 7, 2014, at 4:13 AM, limodou wrote: > > I found a problem in 0.9.1 version: > > in 0.8.x : > >>> print (Blog.c.id <http://blog.c.id/>==5) & None > blog.id = :id_1 > >

Re: [sqlalchemy] Re: SQLAlchemy 0.9.1 released

2014-01-07 Thread limodou
> To post to this group, send email to sqlalchemy@googlegroups.com. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/groups/opt_out. > -- I like python! UliPad <>: http://code.google.com/p/ulipad/ UliWeb <>:

Re: [sqlalchemy] CreateTable display is not right for autoincrement in mysql

2013-10-04 Thread limodou
Thank you very much. This fixes my problem. So it's not a bug? On Sat, Oct 5, 2013 at 2:17 PM, Michael Bayer wrote: > > On Oct 5, 2013, at 1:58 AM, limodou wrote: > > Today I found if I have an id column in a table, and the autoincrement > attribute is True, when I created

[sqlalchemy] CreateTable display is not right for autoincrement in mysql

2013-10-04 Thread limodou
Pad <>: http://code.google.com/p/ulipad/ UliWeb <>: https://github.com/limodou/uliweb My Blog: http://my.oschina.net/limodou -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emai

Re: [sqlalchemy] How to label const in select statement?

2013-01-12 Thread limodou
oh, thank you very much. On Sun, Jan 13, 2013 at 7:23 AM, Michael Bayer wrote: > > On Jan 12, 2013, at 1:47 AM, limodou wrote: > > > I have a select just like : > > > > select([User, 0]) > > > > and I don't know how to label 0 as real sql statemen

[sqlalchemy] How to label const in select statement?

2013-01-11 Thread limodou
I have a select just like : select([User, 0]) and I don't know how to label 0 as real sql statement like this: select User.*, 0 as age; How to do that with label? Thanks. -- I like python! UliPad <>: http://code.google.com/p/ulipad/ UliWeb <>: https://github.com/limodou/uli

[sqlalchemy] Alembic Hack

2012-11-19 Thread limodou
27;ve done? This is the changeset https://github.com/limodou/alembic/commit/dd68c12bf2c738e079d1611ea216db63ff7667e4 I've done two places: 1. Fix PickleType code bug 2. Format some types to unified string format, so that the comparetype will more accurately, for example: decimal will be

Re: [sqlalchemy] Alembic 0.4.0 Released

2012-10-01 Thread limodou
s a generated > SQL expression. Courtesy Moriyoshi Koizumi. > > - [feature] Added support for alteration of MySQL > columns that have AUTO_INCREMENT, as well as enabling > this flag. Courtesy Moriyoshi Koizumi. > > Thanks a lot, alembic is very useful for me. -- I like

Re: [sqlalchemy] Thread local connection garbage collection problem

2012-05-23 Thread limodou
ython! UliPad <>: http://code.google.com/p/ulipad/ UliWeb <>: http://code.google.com/p/uliweb/ My Blog: http://hi.baidu.com/limodou -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchem

[sqlalchemy] Thread local connection garbage collection problem

2012-05-23 Thread limodou
http://code.google.com/p/ulipad/ UliWeb <>: http://code.google.com/p/uliweb/ My Blog: http://hi.baidu.com/limodou -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. T

Re: [sqlalchemy] Wired connection problem

2012-05-17 Thread limodou
On Thu, May 17, 2012 at 8:59 PM, Michael Bayer wrote: > > On May 16, 2012, at 8:33 PM, limodou wrote: > >> On Thu, May 17, 2012 at 8:03 AM, limodou wrote: >>> On Thu, May 17, 2012 at 7:46 AM, Michael Bayer >>> wrote: >>>> >>>> On May 1

Re: [sqlalchemy] Wired connection problem

2012-05-16 Thread limodou
On Thu, May 17, 2012 at 8:03 AM, limodou wrote: > On Thu, May 17, 2012 at 7:46 AM, Michael Bayer > wrote: >> >> On May 16, 2012, at 7:32 PM, limodou wrote: >> >>>> >>>> OK you need to use two different connections here, for the "read fro

Re: [sqlalchemy] Wired connection problem

2012-05-16 Thread limodou
On Thu, May 17, 2012 at 7:46 AM, Michael Bayer wrote: > > On May 16, 2012, at 7:32 PM, limodou wrote: > >>> >>> OK you need to use two different connections here, for the "read from one >>> connection, persist on another in a short transaction&quo

Re: [sqlalchemy] Wired connection problem

2012-05-16 Thread limodou
On Wed, May 16, 2012 at 11:27 PM, Michael Bayer wrote: > > On May 16, 2012, at 11:11 AM, limodou wrote: > >> Thank you for the detail explains. And I tried like this again: >> >> 1. if there are only select statements it will ok,  and the select >> statements w

Re: [sqlalchemy] Wired connection problem

2012-05-16 Thread limodou
On Wed, May 16, 2012 at 9:42 PM, Michael Bayer wrote: > > On May 15, 2012, at 8:13 PM, limodou wrote: > >> Recently I found a wired problem in my application, something like >> this: I have a long time deamon program, it'll be an infinite loop, >> just li

[sqlalchemy] Wired connection problem

2012-05-15 Thread limodou
like me? I don't know if I need to recreate connection every time in the loop? -- I like python! UliPad <>: http://code.google.com/p/ulipad/ UliWeb <>: http://code.google.com/p/uliweb/ My Blog: http://hi.baidu.com/limodou -- You received this message because you are subscribed to

Re: [sqlalchemy] Does alembic support multiple databases?

2012-04-29 Thread limodou
On Sun, Apr 29, 2012 at 11:13 PM, Michael Bayer wrote: > > On Apr 29, 2012, at 10:56 AM, limodou wrote: > >> On Sun, Apr 29, 2012 at 10:42 PM, Michael Bayer >> wrote: >>> You would assemble a multi-database scheme of your choosing in env.py.   If >>> you

Re: [sqlalchemy] Does alembic support multiple databases?

2012-04-29 Thread limodou
On Sun, Apr 29, 2012 at 10:56 PM, limodou wrote: > On Sun, Apr 29, 2012 at 10:42 PM, Michael Bayer > wrote: >> You would assemble a multi-database scheme of your choosing in env.py.   If >> you do "alembic init multidb" you'll see an example of one.     Ho

Re: [sqlalchemy] Does alembic support multiple databases?

2012-04-29 Thread limodou
/ulipad/ UliWeb <>: http://code.google.com/p/uliweb/ My Blog: http://hi.baidu.com/limodou -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this g

[sqlalchemy] Does alembic support multiple databases?

2012-04-29 Thread limodou
I can't find how to enable alembic support multiple databases. -- I like python! UliPad <>: http://code.google.com/p/ulipad/ UliWeb <>: http://code.google.com/p/uliweb/ My Blog: http://hi.baidu.com/limodou -- You received this message because you are subscribed to

Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread limodou
On Fri, Apr 13, 2012 at 8:48 AM, Michael Bayer wrote: > > On Apr 12, 2012, at 8:07 PM, limodou wrote: > >> >> For example, in my case, when I made some changes and I want to test >> them, so I can run "revision --autogenerate" and "upgrade" the >

Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread limodou
On Thu, Apr 12, 2012 at 11:59 PM, Michael Bayer wrote: > > On Apr 12, 2012, at 10:54 AM, limodou wrote: > >>>>> 2. If I can merge the current changes into head revision, before I >>>>> execute upgrade, so that I can combine several changes into one >&g

Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread limodou
On Thu, Apr 12, 2012 at 11:52 PM, Michael Bayer wrote: > > On Apr 12, 2012, at 10:50 AM, limodou wrote: > > On Thu, Apr 12, 2012 at 10:39 PM, Michael Bayer > wrote: > > > On Apr 12, 2012, at 4:18 AM, limodou wrote: > > > I also have other requirements: > >

Re: [sqlalchemy] About alembic alter column problem

2012-04-12 Thread limodou
On Thu, Apr 12, 2012 at 11:38 PM, Michael Bayer wrote: > > On Apr 12, 2012, at 10:42 AM, limodou wrote: > >> On Thu, Apr 12, 2012 at 10:37 PM, Michael Bayer >> wrote: >>> >>> On Apr 12, 2012, at 4:07 AM, limodou wrote: >>> >>>> I&#x

Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread limodou
e some patches for these two demands. -- I like python! UliPad <>: http://code.google.com/p/ulipad/ UliWeb <>: http://code.google.com/p/uliweb/ My Blog: http://hi.baidu.com/limodou -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group

Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread limodou
On Thu, Apr 12, 2012 at 10:39 PM, Michael Bayer wrote: > > On Apr 12, 2012, at 4:18 AM, limodou wrote: > >> I also have other requirements: >> >> 1. if there is no changes should it can create nothing, not like this: >> >> def upgrade(): >>    ##

Re: [sqlalchemy] About alembic alter column problem

2012-04-12 Thread limodou
On Thu, Apr 12, 2012 at 10:37 PM, Michael Bayer wrote: > > On Apr 12, 2012, at 4:07 AM, limodou wrote: > >> I'm using alembic today, and I found a problem, if I changed the >> column, it'll automatically create add and drop statment, just like >> this:

[sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread limodou
nk is that : if the user has manually changed the revision file, the changes will be lost. -- I like python! UliPad <>: http://code.google.com/p/ulipad/ UliWeb <>: http://code.google.com/p/uliweb/ My Blog: http://hi.baidu.com/limodou -- You received this message because you are

[sqlalchemy] About alembic alter column problem

2012-04-12 Thread limodou
exists in my database, so when it excute the first statement it'll be fail. So I think drop should be put in front of add. -- I like python! UliPad <>: http://code.google.com/p/ulipad/ UliWeb <>: http://code.google.com/p/uliweb/ My Blog: http://hi.baidu.com/limodou -- You rece

Re: [sqlalchemy] Alembic 0.3.1 released

2012-04-08 Thread limodou
On Sun, Apr 8, 2012 at 9:53 PM, Michael Bayer wrote: > > On Apr 7, 2012, at 8:50 PM, limodou wrote: > > I've tested today, and I felt very good. And I have a question, if I've > autogenerated once, and havn't upgrade to the database, so if I rerun the > autogene

Re: [sqlalchemy] Alembic 0.3.1 released

2012-04-07 Thread limodou
ize alembic init process? Thanks such a good tool. -- I like python! UliPad <>: http://code.google.com/p/ulipad/ UliWeb <>: http://code.google.com/p/uliweb/ My Blog: http://hi.baidu.com/limodou -- You received this message because you are subscribed to the Google Groups "sqlalchemy&

Re: [sqlalchemy] 'MySQL server has gone away' problem

2011-08-24 Thread limodou
On Wed, Aug 24, 2011 at 9:49 PM, Michael Bayer wrote: > > On Aug 23, 2011, at 11:21 PM, limodou wrote: > >> On Sat, Oct 23, 2010 at 9:22 PM, Michael Bayer >> wrote: >>> >>> pool recycle means a connnection that is 3600 seconds old will be thrown &g

Re: [sqlalchemy] 'MySQL server has gone away' problem

2011-08-23 Thread limodou
de.google.com/p/ulipad/ UliWeb <>: http://code.google.com/p/uliweb/ My Blog: http://hi.baidu.com/limodou -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscrib

[sqlalchemy] Re: Create Table errors on mysql...

2009-10-14 Thread limodou
ER, `Status` VARCHAR, > `Summary` VARCHAR, `uid` VARCHAR, `url` V' > > Since the syntax seems to be correct and Sequence is Quoted with BackQuotes > (`). I am puzzled what to do to fix this. > Please help, > Martijn > I think VARCHAR need a length, but most of your table field has no lengt

[sqlalchemy] Re: Bypass checking to database structure (metadata.create_all)

2009-10-01 Thread limodou
INTEGER NOT > NULL >  AUTO_INCREMENT, \n\tnom VARCHAR, \n\tcp VARCHAR, \n\tlatitude VARCHAR, > \n\tlong > itude VARCHAR, \n\teloignement VARCHAR, \n\turl VARCHAR, \n\tPRIMARY KEY > (`IdVil > le`)\n)\n\n' () > > It seems that there is no length for VARCHAR, the right sy

[sqlalchemy] Re: How to display table creation sql statement?

2009-02-03 Thread limodou
2009/2/4 limodou : > 2009/2/3 Sergei Beilin : >> >> On 3 фев, 09:31, limodou wrote: >>> Thanks and I want to know if I must call meta.create_all(engine), >>> because this code will create the tables, but I just want to see the >>> SQL statements,

[sqlalchemy] Re: How to display table creation sql statement?

2009-02-03 Thread limodou
2009/2/3 Sergei Beilin : > > On 3 фев, 09:31, limodou wrote: >> Thanks and I want to know if I must call meta.create_all(engine), >> because this code will create the tables, but I just want to see the >> SQL statements, but not create the tables. > > Note the add

[sqlalchemy] Re: How to display table creation sql statement?

2009-02-02 Thread limodou
ate_all(engine), because this code will create the tables, but I just want to see the SQL statements, but not create the tables. -- I like python! UliPad <>: http://code.google.com/p/ulipad/ UliWeb <>: http://uliwebproject.appspot.com My Blog: (new)http://http://hi.baidu.com/limodo

[sqlalchemy] How to display table creation sql statement?

2009-02-02 Thread limodou
ct.appspot.com My Blog: (new)http://http://hi.baidu.com/limodou (old)http://www.donews.net/limodou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sql