Are we OK to define custom SQL aggregate functions for nixtape? They seem to have reasonably good support in both PostgreSQL and MySQL. Support in sqlite is non-existent, but it already has a built- in aggregate function close to what I want. So I should be able to provide the functionality in all three of these databases.
Here's a demonstration of what I'm talking about: CREATE AGGREGATE group_concat ( basetype = text, sfunc = textcat, stype = text, initcond = '' ); SELECT ur.uid1, ur.uid2, ur.established, group_concat(flag||',') AS flags FROM user_relationships ur LEFT JOIN user_relationship_flags urf ON ur.uid1=urf.uid1 AND ur.uid2=urf.uid2 GROUP BY ur.uid1, ur.uid2, ur.established; Aggregating like this seems to be the most elegant way of achieving what I need. -- Toby A Inkster <mailto:[email protected]> <http://tobyinkster.co.uk> _______________________________________________ Libre-fm mailing list [email protected] http://lists.autonomo.us/mailman/listinfo/libre-fm
