Tim Romano wrote:
> You can accomplish this on the front-end, of course, but it would be
> much more convenient and efficient to have a built-in function.

It is difficult to define a "reverse" operation on arbitrary Unicode strings in 
a useful way. E.g., consider the string 'Á' (U+0041 Lating Capital Letter A + 
U+0301 Combining Acute Accent). Should flip() keep it as is, or reverse it to a 
meaningless sequence U+0301 U+0041 ?

Or 'fi' (U+FB01 Latin Small Ligature Fi): should it be kept as is, or broken 
apart and reversed to 'if'?

If your particular application deals with a subset of Unicode strings for which 
flip() would be well defined (say, ASCII strings), it should be easy to 
implement it as a custom function.

> Given the range of possible uses for it, this flip(string) function
> would be far more versatile than a REVERSED collation sequence.

Note that you can create indexes on a collation, but not on a function.

Igor Tandetnik


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to