Rich expressions in sqlite k/v -- fixes and tests