All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Types of changes
Addedfor new features.Changedfor changes in existing functionality.Deprecatedfor soon-to-be removed features.Removedfor now removed features.Fixedfor any bug fixes.Securityin case of vulnerabilities.
put your changes here
-
renamed library from
ecto_named_fragmenttoecto_fragment_extrasbecause 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/1andfrag/2as a shorthand for inline and named fragments depending on the arity it is called with.
- the
EctoNamedFragmentmodule needs to be imported now (no moreuse) - changed interpolation syntax to use string interpolation (#{}). Please change your query strings from
named_fragment("foo(:a, :b)", a:1, b:2)tonamed_fragment("foo(#{:a}, #{:b})", a:1, b:2)- this allows better syntax highlighting of param names within the query
- it also drastically simplifies implementation of this library and improves compile times of this library as well as of the named_fragment macro
- initial release