Hello, I would like to import Ecto.Query
but without importing the update: 2
to the namespace.
I can use only
to specify what i want to import:
import Ecto.Query, only: [from: 2, join: 4, where: 3, preload: 2, distinct: 2]
but using except would be shorter (and I would not have to learn arities by heart):
import Ecto.Query, except: [update: 2]
However, this seems to not import macros (for example, where
was not imported.
i need to do:
import Ecto.Query, only: :macros
import Ecto.Query, except: [update: 2]
Is this the expected way import works? From the doc, it seemed to me only:
and except:
are complimentary.
Using:
- Elixir 1.12.0 (compiled with Erlang/OTP 23)
- Erlang/OTP 24 [erts-12.0.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit]