With this release we add support for inline fragments in addition to named fragments. Since we have more than one fragment type, a rename of the package was due.
-
renamed library from
ecto_named_fragment
toecto_fragment_extras
because it contains a little more than just the named_fragment() macro now 👇 -
added inline fragments which allow inlining fragment params into the query string:
inline_fragment("coalesce(#{users.name}, #{^default_name})")
-
added
frag/1
andfrag/2
as a shorthand for inline and named fragments depending on the arity it is called with.