[sqlalchemy] What is declarative_base() exactly?

2013-09-23 Thread Edward Kim
'sqlalchemy.ext.declarative.api.Base' How this function is return class, not instance? Is it kind of design pattern? I know It is not a big deal for just using SQLAlchemy, but I can't explain what it is and how can return the class. Please let me know what I need to know about this pattern or style. Thanks, Edward

Re: [sqlalchemy] What is declarative_base() exactly?

2013-09-23 Thread Edward Kim
Oh, I see! It is return class literally. Thanks for your code. On Monday, 23 September 2013 23:28:11 UTC+10, Klauss wrote: On Mon, Sep 23, 2013 at 10:22 AM, Edward Kim onward...@gmail.comjavascript: wrote: Base = declarative_base() Base class 'sqlalchemy.ext.declarative.api.Base

[sqlalchemy] Re: Building queries programmatically

2010-10-03 Thread Edward Williams
On Oct 3, 5:40 pm, Conor conor.edward.da...@gmail.com wrote: On 10/01/2010 10:00 PM, Edward Williams wrote: I'm trying to wrap my head around building the WHERE clause. I find that when a function returns a condition (age 18 for example) it comes with brackets around it. However, when I

[sqlalchemy] Building queries programmatically

2010-10-01 Thread Edward Williams
and adjust a specific piece of a query? Like, the second element of a nested where clause? If it is, my separate class system may be unnecessary overhead (unless I decide the ability to port to other libraries is really important...). Thanks, Edward -- You received this message because you

[sqlalchemy] How can i build a connection wtih Persistent

2010-04-08 Thread edward
Hi,all I have a cronjob to run,and it may be executed over half an hour... but at 10 min I found i lost connection from mysql,And How can i build a connection wtih Persistent? -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this

[sqlalchemy] How can i use insert/update with transactions

2009-10-29 Thread edward
Hi,I can't use transaction with class Insert()/Update,someone can help me ?thanks! When i run Insert().execute() then will auto commit the transaction,I don't want it auto commit... code import sqlalchemy as sa from sqlalchemy import MetaData from