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
6 changes: 4 additions & 2 deletions lib/expr.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1293,9 +1293,11 @@ defmodule AshSql.Expr do
%Fragment{
embedded?: pred_embedded?,
arguments: [
raw: "array_length((",
raw: "coalesce(array_length((",

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.

Rendering the list twice is not great 😓 Is there really no other way to go about this?

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.

Actually, I think it's fine. If its a literal list then the value would be expanded by our expression builder at runtime.

expr: list,
raw: "), 1)"
raw: "), 1), cardinality((",
expr: list,
raw: ")))"
]
},
bindings,
Expand Down
Loading