Open troygnichols opened 7 years ago
I've hit this problem to. Here's what I could figure out:
query = from u in User, limit: ^limit
will set query.limit
as a %Ecto.Query.QueryExpr{}
I think EctoMnesia.Planner.get_limit/1
should make use of Ecto.Query.Dynamic
.
With SQL adapters like postgres you can write something like this:
In ecto_mnesia, this produces an error like this:
Limit works fine if you give it a literal like this:
It's only a problem if you use a
^
expressionExpressions do seem to work for
order_by
, just not limit, e.g. this works fine:Here are some tests that demonstrate the issue:
https://github.com/troygnichols/ecto_mnesia/commit/ae0a038c801fdb39d692fd348bd7b230379c94e4