Handling comparison/range queries

@EPedrotti, not yet.