Add option of using custom SQL when searching on a virtual column.

Fixes #22.