Skip to content

v0.3.0 - A rename and support for inline fragments

Latest
Compare
Choose a tag to compare
@tessi tessi released this 05 Aug 19:52
· 19 commits to main since this release

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 to ecto_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 and frag/2 as a shorthand for inline and named fragments depending on the arity it is called with.