Allow customizing the query.