. * */ namespace OCA\Tasks\Db; use OCP\IDb; use OCP\AppFramework\Db\Mapper; class TasksMapper extends Mapper { public function __construct(IDb $db) { parent::__construct($db, 'tasks_tasks', '\OCA\Tasks\Db\Tasks'); } public function findAllVTODOs($calendarID, $limit=null, $offset=null) { $sql = 'SELECT * FROM `*PREFIX*clndr_objects` WHERE `calendarid` = ? AND `objecttype`= ?'; return $this->findEntities($sql, array($calendarID, 'VTODO'), $limit, $offset); } public function findVTODOById($taskID, $limit=null, $offset=null) { $sql = 'SELECT * FROM `*PREFIX*clndr_objects` WHERE `id` = ? AND `objecttype`= ?'; return $this->findEntity($sql, array($taskID, 'VTODO'), $limit, $offset); } }