[sqlalchemy] Re: How to query data from a relational table according to a list of matched conditions?

2009-12-23 Thread Olli Wang
'])) \                .filter(articlecount = 2) \                .order_by(articlecount.desc()): (Untested, but I believe that's about right)     - G. On Dec 23, 7:03 am, Olli Wang olliw...@ollix.com wrote: Thanks for reply. I finally got the right result as following: for article

[sqlalchemy] Re: How to query data from a relational table according to a list of matched conditions?

2009-12-23 Thread Olli Wang
) you need to use having() and not filter() to filter aggregates.     - G. On Dec 23, 7:03 am, Olli Wang olliw...@ollix.com wrote: Thanks for reply. I finally got the right result as following: for article in session.query(Article, func.count(Article.id).label ('count')) \ .join

[sqlalchemy] Re: How to query data from a relational table according to a list of matched conditions?

2009-12-22 Thread Olli Wang
Bayer mike...@zzzcomputing.com wrote: On Dec 22, 2009, at 1:39 AM, Olli Wang wrote: Hi, is it possible to query data from a relational table according to a list of matched conditions? For example, assume I have two tables, Article and Keywords, in a Many-to-Many relationship, and have data like

[sqlalchemy] miruku 0.1a6 released.

2008-07-11 Thread Olli Wang
miruku is a migration toolkit for SQLAlchemy. I'm pleased to release miruku 0.1a6. There are several bugs fixed since 0.1a3. You may need to re-read the tutorial to adapt some not backward-compatible updates. If you have any suggestion or question, welcome to report at

[sqlalchemy] A new SQLAlchemy migration toolkit - miruku 0.1a3 has been released

2008-07-02 Thread Olli Wang
Hi, I've just created a new migration toolkit - miruku. The goal of miruku project is to do the migration work automatically by just one simple command. There is no need to write upgrade script manually and there is no version control mechanism. All you have to do is just keep modifying your

[sqlalchemy] Any way to determine whether the url exists or not?

2008-04-30 Thread Olli Wang
Hi, I'm trying to determine whether the url's database exists or not, but didn't find any approach. I created a sqlite engine: engine = create_engine('sqlite:///test.sqlite') And tried to connect it: engine.connect() But it just created the database file if not existed. So is there any way to