Skip to content

Commit

Permalink
Release v3.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Apr 10, 2023
1 parent 4d0450e commit caaaa3c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
# Changelog for v3.x

## v3.10.0-dev
## v3.10.0 (2023-04-10)

This release contains many improvements to Ecto.Changeset, functions like `Ecto.Changeset.changed?/2` and `field_missing?/2` will help make your code more expressive. Improvements to association and embed handling will also make it easier to manage more complex forms, especially those embedded within Phoenix.LiveView applications.

Expand All @@ -13,7 13,7 @@ to:
empty_values = [[]] Ecto.Changeset.empty_values()
Ecto.Changeset.cast(changeset, params, [:field1, :field2], empty_values: empty_values)

Queries have also been improved, to support LIMIT WITH TIES as well as materialized CTEs.
Queries have also been improved to support LIMIT WITH TIES as well as materialized CTEs.

### Enhancements

Expand All @@ -23,6 23,7 @@ Queries have also been improved, to support LIMIT WITH TIES as well as materiali
* [Ecto.Changeset] Allow `Regex` to be used in constraint names for exact matches
* [Ecto.Changeset] Allow `:empty_values` option in `cast/4` to include a function which must return true if the value is empty
* [Ecto.Changeset] `cast/4` will by default consider strings made only of whitespace characters to be empty
* [Ecto.Changeset] Add support for `:sort_param` and `:drop_param` on `cast_assoc` and `cast_embed`
* [Ecto.Query] Support materialized option in CTEs
* [Ecto.Query] Support dynamic field inside `json_extract_path`
* [Ecto.Query] Support interpolated values for from/join prefixes
Expand Down
10 changes: 8 additions & 2 deletions lib/ecto/changeset.ex
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 521,16 @@ defmodule Ecto.Changeset do
end

@doc """
Returns the empty values used by `Ecto.Changeset`.
Returns the default empty values used by `Ecto.Changeset`.
By default it marks a field as empty if it is a string made
only of whitespace characters.
only of whitespace characters. If you want to provide your
additional empty values on top of this one, such as an empty
list, you can write:
@empty_values [[]] Ecto.Changeset.empty_values()
And then pass `empty_values: @empty_values` on `cast/3`.
"""
def empty_values do
@empty_values
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 2,7 @@ defmodule Ecto.MixProject do
use Mix.Project

@source_url "https://github.com/elixir-ecto/ecto"
@version "3.10.0-dev"
@version "3.10.0"

def project do
[
Expand Down
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 4,8 @@
"ex_doc": {:hex, :ex_doc, "0.29.4", "6257ecbb20c7396b1fe5accd55b7b0d23f44b6aa18017b415cb4c2b91d997729", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "2c6699a737ae46cb61e4ed012af931b57b699643b24dabe2400a8168414bc4f5"},
"jason": {:hex, :jason, "1.0.0", "0f7cfa9bdb23fed721ec05419bcee2b2c21a77e926bce0deda029b5adc716fe2", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "b96c400e04b7b765c0854c05a4966323e90c0d11fee0483b1567cda079abb205"},
"makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"},
"makeup_elixir": {:hex, :makeup_elixir, "0.16.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"},
"makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"},
"makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"},
"nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"},
"nimble_parsec": {:hex, :nimble_parsec, "1.3.0", "9e18a119d9efc3370a3ef2a937bf0b24c088d9c4bf0ba9d7c3751d49d347d035", [:mix], [], "hexpm", "7977f183127a7cbe9346981e2f480dc04c55ffddaef746bd58debd566070eef8"},
"telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"},
}

0 comments on commit caaaa3c

Please sign in to comment.