fix: quoted column names

pull/82/head
sualko 2020-09-08 17:34:47 +02:00
parent 72304541cf
commit 726b18e2c6
1 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ class RoomMapper extends QBMapper {
$qb->select('r.*')
->from($this->tableName, 'r')
->leftJoin('r', 'bbb_room_shares', 's', $qb->expr()->eq('r.id', 's.room_id'))
->addSelect($qb->createFunction('count(case when "s"."permission" = 0 then 1 else null end) as shared'))
->addSelect($qb->createFunction('count(case when `s`.`permission` = 0 then 1 else null end) as shared'))
->where($qb->expr()->eq('r.id', $qb->createNamedParameter($id, IQueryBuilder::PARAM_INT)))
->groupBy('r.id');
;
@ -41,7 +41,7 @@ class RoomMapper extends QBMapper {
$qb->select('r.*')
->from($this->tableName, 'r')
->leftJoin('r', 'bbb_room_shares', 's', $qb->expr()->eq('r.id', 's.room_id'))
->addSelect($qb->createFunction('count(case when "s"."permission" = 0 then 1 else null end) as shared'))
->addSelect($qb->createFunction('count(case when `s`.`permission` = 0 then 1 else null end) as shared'))
->where($qb->expr()->eq('r.uid', $qb->createNamedParameter($uid)))
->groupBy('r.id');
;
@ -59,7 +59,7 @@ class RoomMapper extends QBMapper {
$qb->select('r.*')
->from($this->tableName, 'r')
->leftJoin('r', 'bbb_room_shares', 's', $qb->expr()->eq('r.id', 's.room_id'))
->addSelect($qb->createFunction('count(case when "s"."permission" = 0 then 1 else null end) as shared'))
->addSelect($qb->createFunction('count(case when `s`.`permission` = 0 then 1 else null end) as shared'))
->where(
$qb->expr()->orX(
$qb->expr()->eq('r.user_id', $qb->createNamedParameter($userId)),