Saturday, November 29, 2008

Other ORM Goodies

In addition to the aggregate work, the GSOC student had time to finish ticket 7210, which adds support for expressions to filter() and update(). This means you'll be able to execute queries in the form of:

SELECT * FROM table WHERE height > width;

or similar UPDATE queries. This has a syntax similar to that of Q objects, using a new F object. So the above query would look like:


or an update query could look like:


these objects support the full range of arithmetic operations. These are slated to be a part of Django 1.1.

1 comment:

  1. Are these changes in the head trunk to be able to play with them right now ?


Note: Only a member of this blog may post a comment.