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/ecto/repo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,8 @@ defmodule Ecto.Repo do
It may also be `{:unsafe_fragment, binary_fragment}` to pass any
expression to the database without any sanitization, this is useful
for partial index or index with expressions, such as
`ON CONFLICT (coalesce(firstname, ""), coalesce(lastname, ""))`.
`{:unsafe_fragment, "(coalesce(firstname, ""), coalesce(lastname, "")) WHERE middlename IS NULL"}` for
`ON CONFLICT (coalesce(firstname, ""), coalesce(lastname, "")) WHERE middlename IS NULL` SQL query.

* `:placeholders` - A map with placeholders. This feature is not supported
by all databases. See the "Placeholders" section for more information.
Expand Down Expand Up @@ -1377,7 +1378,8 @@ defmodule Ecto.Repo do
It may also be `{:unsafe_fragment, binary_fragment}` to pass any
expression to the database without any sanitization, this is useful
for partial index or index with expressions, such as
`ON CONFLICT (coalesce(firstname, ""), coalesce(lastname, ""))`.
`{:unsafe_fragment, "(coalesce(firstname, ""), coalesce(lastname, "")) WHERE middlename IS NULL"}` for
`ON CONFLICT (coalesce(firstname, ""), coalesce(lastname, "")) WHERE middlename IS NULL` SQL query.

* `:stale_error_field` - The field where stale errors will be added in
the returning changeset. This option can be used to avoid raising
Expand Down