Addng query functionality to keystone.View class