Move query constructors to interface extension methods

This allows for chaining operations in a more flexible way than before
without having to re-implement the query constructors for every class.