Skip to content

Commit

Permalink
Add debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlSchwan committed Jan 12, 2022
1 parent 637d5d9 commit 8381fd7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/Db/CircleRequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ protected function getCircleSelectSql(
string $alias = CoreQueryBuilder::CIRCLE,
bool $single = false
): CoreQueryBuilder {

$nonClobValues = array_diff(self::$tables[self::TABLE_CIRCLE], ['settings']);

$qb = $this->getQueryBuilder();
$qb->generateSelect(self::TABLE_CIRCLE, self::$tables[self::TABLE_CIRCLE], $alias, !$single)
->generateGroupBy(self::$tables[self::TABLE_CIRCLE], $alias);
->generateGroupBy($nonClobValues, $alias);

if (!$single) {
$qb->orderBy($alias . '.creation', 'asc');
Expand Down Expand Up @@ -113,7 +116,10 @@ public function getItemFromRequest(CoreQueryBuilder $qb): Circle {
$circle = $qb->asItem(Circle::class);
} catch (RowNotFoundException $e) {
throw new CircleNotFoundException('Circle not found');
}
} catch (\Exception $e) {
// debug stuff
throw new \Exception($qb->getSQL());
}

return $circle;
}
Expand Down

0 comments on commit 8381fd7

Please sign in to comment.