|Subject:||Please add support for user-defined collations|
DBD::SQLite currently exports SQLite's interfaces for creating SQL functions and SQL aggregate functions. SQLite also has an interface for defining collations, that is, comparison functions used for sorting. I believe it would be very helpful to export this interface, given that SQLite's internal string sorting is severely limited (it's basically just memcmp, which produces correct results mostly by accident, if at all). If such an interface is added, I further suggest to automatically create a collation called "perl" on every connect that simply uses perl's cmp operator. That way, one could write "ORDER BY foo COLLATE perl" in an SQL statement and transparently and reliably have the strings sorted the same way calling "sort" in perl would have. A workaround currently exists, in that you can simply pull the data from the database unsorted and then call sort from perl. Obviously, that is a less than elegant solution.