Adding a shared way to define methods on query operations.