Add logic for where clauses.