thraxil.org:

Reply to: raw queries with SQLObject

Actually count(), max() and avg() are available. I've not used them for a while, so i don't remember exactly how to use them .. But they're sitting somewhere ;)
yeah, you can do stuff like <code>Table.select().max("some_column")</code>, but you can't build anything much more complex than that. the specific query that triggered my figuring out how to bypass SQLObject was one like "<code>SELECT n.id,count(k.id) as count FROM ... GROUP BY n.id ORDER BY count DESC LIMIT 5</code>" but it's also come in useful when i wanted to take advantage of some of postgresql's date formatting methods or access a database that uses stored procedures. in general, it just gives me a warm fuzzy feeling to know that as a last resort, i can always drop back to plain old SQL.

formatting is with Textile syntax. Comments are not displayed until they are approved by a moderator. Moderators will not approve unless the comment contributes value to the discussion.

namerequired
emailrequired
url
remember info?