![]() ![]() Quote bind_quoted: doĭefmacro is necessary to allow pin operators out of context. |> join(:left,, c in Comment, do_join(approved, featured)) ![]() I would go with declaring a helper and pattern match arguments in it: def posts_with_comments(approved, featured, some_var) do Add a comment 1 Answer Sorted by: Reset to default 7 Co-related subqueries are not possible in Ecto without using fragments. I would expect a bare bones macro like this to work: defmacrop do_join doīut it doesn't. 2,103 2 2 gold badges 21 21 silver badges 45 45 bronze badges. For some reason, it doesn't work with the keyword list either. I'm not exactly a macro expert yet but I don't see how the nil match can work at run time. Instead, let custom Ecto.Type handle them
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |