Exemplo n.º 1
0
 public function delete(Entity $entity)
 {
     parent::delete($entity);
     // someone please slap me for doing this manually :P
     // we needz CASCADE + FKs please
     $sql = 'DELETE FROM `*PREFIX*news_items` WHERE `feed_id` = ?';
     $params = [$entity->getId()];
     $this->execute($sql, $params);
 }
Exemplo n.º 2
0
 public function delete(Entity $entity)
 {
     parent::delete($entity);
     // someone please slap me for doing this manually :P
     // we needz CASCADE + FKs please
     $sql = 'DELETE FROM `*PREFIX*news_feeds` WHERE `folder_id` = ?';
     $params = [$entity->getId()];
     $stmt = $this->execute($sql, $params);
     $stmt->closeCursor();
     $sql = 'DELETE FROM `*PREFIX*news_items` WHERE `feed_id` NOT IN ' . '(SELECT `feeds`.`id` FROM `*PREFIX*news_feeds` `feeds`)';
     $stmt = $this->execute($sql);
     $stmt->closeCursor();
 }
Exemplo n.º 3
0
 public function __construct(IDBConnection $db)
 {
     parent::__construct($db, 'news_items', '\\OCA\\News\\Db\\Item');
 }
Exemplo n.º 4
0
 public function __construct(IDBConnection $db)
 {
     parent::__construct($db, 'news_items', Item::class);
 }