Make query expressions compatible wth CRUD apis (fixes #7)