memories/lib/Db/TimelineQueryFavorites.php

17 lines
570 B
PHP
Raw Normal View History

2022-09-12 01:33:38 +00:00
<?php
declare(strict_types=1);
namespace OCA\Memories\Db;
use OCP\DB\QueryBuilder\IQueryBuilder;
trait TimelineQueryFavorites {
public function transformFavoriteFilter(IQueryBuilder $query) {
$query->innerJoin('m', 'vcategory_to_object', 'c',
$query->expr()->andX(
$query->expr()->eq('c.objid', 'm.fileid'),
$query->expr()->eq('c.categoryid', $query->createNamedParameter(2, IQueryBuilder::PARAM_INT)),
$query->expr()->eq('c.type', $query->createNamedParameter('files')),
));
}
}