db: use 1 for literals
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/653/head
parent
5eb6115680
commit
0718a03ee0
|
@ -258,7 +258,7 @@ class FaceRecognitionBackend extends Backend
|
||||||
|
|
||||||
// By default it shows the people who were not hidden
|
// By default it shows the people who were not hidden
|
||||||
if (!$show_hidden) {
|
if (!$show_hidden) {
|
||||||
$query->andWhere($query->expr()->eq('frp.is_visible', $query->expr()->literal(true, \PDO::PARAM_BOOL)));
|
$query->andWhere($query->expr()->eq('frp.is_visible', $query->expr()->literal(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ORDER by number of faces in cluster and id for response stability.
|
// ORDER by number of faces in cluster and id for response stability.
|
||||||
|
|
|
@ -33,7 +33,7 @@ trait TimelineQueryFilters
|
||||||
|
|
||||||
public function transformVideoFilter(IQueryBuilder &$query, bool $aggregate)
|
public function transformVideoFilter(IQueryBuilder &$query, bool $aggregate)
|
||||||
{
|
{
|
||||||
$query->andWhere($query->expr()->eq('m.isvideo', $query->expr()->literal(true, \PDO::PARAM_BOOL)));
|
$query->andWhere($query->expr()->eq('m.isvideo', $query->expr()->literal(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function transformLimit(IQueryBuilder &$query, bool $aggregate, int $limit)
|
public function transformLimit(IQueryBuilder &$query, bool $aggregate, int $limit)
|
||||||
|
|
|
@ -80,7 +80,7 @@ trait TimelineWriteOrphans
|
||||||
$query = $this->connection->getQueryBuilder();
|
$query = $this->connection->getQueryBuilder();
|
||||||
$query->select(...$fields)
|
$query->select(...$fields)
|
||||||
->from('memories')
|
->from('memories')
|
||||||
->where($query->expr()->eq('orphan', $query->expr()->literal(true, IQueryBuilder::PARAM_BOOL)))
|
->where($query->expr()->eq('orphan', $query->expr()->literal(1)))
|
||||||
->setMaxResults($count)
|
->setMaxResults($count)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,7 @@ class Index
|
||||||
$query->leftJoin('f', $table, $alias, $query->expr()->andX(
|
$query->leftJoin('f', $table, $alias, $query->expr()->andX(
|
||||||
$query->expr()->eq('f.fileid', "{$alias}.fileid"),
|
$query->expr()->eq('f.fileid', "{$alias}.fileid"),
|
||||||
$query->expr()->eq('f.mtime', "{$alias}.mtime"),
|
$query->expr()->eq('f.mtime', "{$alias}.mtime"),
|
||||||
$query->expr()->eq("{$alias}.orphan", $query->expr()->literal(false, IQueryBuilder::PARAM_BOOL))
|
$query->expr()->eq("{$alias}.orphan", $query->expr()->literal(0))
|
||||||
));
|
));
|
||||||
|
|
||||||
$query->andWhere($query->expr()->isNull("{$alias}.fileid"));
|
$query->andWhere($query->expr()->isNull("{$alias}.fileid"));
|
||||||
|
|
Loading…
Reference in New Issue