[sqlalchemy] Re: Tagging example

2007-01-28 Thread Damjan
I'm a SA newbie, so bare with me :) This is the SQL query for a tag cloud, returning each tag_name and it's weight (the count of page tagged with this tag). SELECT tag_name, COUNT(page_id) AS quantity FROM pages_tags JOIN tags USING (tag_id) GROUP BY tags.tag_id ORDER BY quantity

[sqlalchemy] Re: Tagging example

2007-01-27 Thread Michael Bayer
i have some notes on how to create instances that are unique to some identity: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/UniqueObject as far as it being a list of normal strings, thats a feature we havent implemented as of yet. hibernate does it, you can make collections of ints

[sqlalchemy] Re: Tagging example

2007-01-27 Thread Damjan
Well in this case, the Tag class is really unnecesseary --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: Tagging example

2007-01-26 Thread Christopher Arndt
Damjan schrieb: Now, creating pages and then adding tags to them like so: p1.tags.append(Tag('test')) p2.tags.append(Tag('test')) will actually create two 'test' tags in the database... Have a look at my tagging tutorial at http://paddyland.serveblog.net/article/16#updating-tags Although