*Sorry, just noticed that I replied directly, instead of to the list. Here are the contents for everyone:*
Thanks for you help. Using the FunctionElement worked quite well, but I had to tweak the constructor and assign the base parameter to self.key to make it work properly (failing stack trace at https://gist.github.com/Turbo87/b5f49ffeedb3fa288b4f). Now I've tried the same approach using the declarative method (https://gist.github.com/Turbo87/e7fb19b8e532d3e3b6f3) but I get the next error: "TypeError: Boolean value of this clause is not defined" (stack trace for that is at https://gist.github.com/Turbo87/ab5f0ef5159dc85dd0b3 and what I got out of the debugger is at https://gist.github.com/Turbo87/bef75287f67c0f1f948a) I hope I'm not stealing too much of your time. Thanks again for the great help already! -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.