Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Query/CompositeQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ public function toSQL(): string
'%s AS %s(%s)',
$alias,
match (true) {
$query[1]?->materialized ?? null === true => 'MATERIALIZED ',
$query[1]?->materialized ?? null === false => 'NOT MATERIALIZED ',
($query[1]?->materialized ?? null) === true => 'MATERIALIZED ',
($query[1]?->materialized ?? null) === false => 'NOT MATERIALIZED ',
default => '',
},
Comment on lines 267 to 271

@jdreesen jdreesen Apr 13, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not like this?

match ($query[1]?->materialized ?? null) {
    true => 'MATERIALIZED ',
    false => 'NOT MATERIALIZED ',
    default => '',
},

https://3v4l.org/uqFNN

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to send it as an improvement :)

I was just bumping against this issue and fixed it quickly without looking to the surroundings too much :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#27

$query[0]->getSQL()
Expand Down
Loading