Added query decorator to facilitate writing CRUD