Implement variable bindings for queries