File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
lib/ecto/adapters/postgres Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2022,9 +2022,10 @@ if Code.ensure_loaded?(Postgrex) do
20222022 defp escape_json ( true ) , do: [ "true" ]
20232023 defp escape_json ( false ) , do: [ "false" ]
20242024
2025- # For unoptimized json_extract_path we allow columns to be
2026- # a part of the path. To allow this, we use the array[...] syntax
2027- # which requires special handling for strings and column references
2025+ # To allow columns in json paths, we use the array[...] syntax
2026+ # which requires special handling for strings and column references.
2027+ # We still keep the escape_json/1 variant for strings because it is
2028+ # needed for the queries using @>
20282029 defp escape_json ( value , _ , _ ) when is_binary ( value ) do
20292030 [ ?' , escape_string ( value ) , ?' ]
20302031 end
You can’t perform that action at this time.
0 commit comments