Also, empty WHEREs etc... are removed, that might ...
# komapper
d
Also, empty WHEREs etc... are removed, that might be nice to do for stray commas in for loops... (like:
ORDER BY name, address,
) instead of having to use the more verbose _`_has_next` test)_
t
Interesting idea, but I’m concerned it could cause confusion.
d
Maybe another option would be to include some kind of parameter to %for as a delimiter...
t
What do you think about the idea of introducing utility variables? https://github.com/komapper/komapper/pull/1388
d
It seems much nicer! I'm just wondering if
i_or
is as clear as
i_has_next
, the first is supposed to append an
or
the second just checks if there's a next element... if the standard is that these utilities append and when they do something else, then you specify, (like
has_
), then it might be ok, otherwise, it might be better to make it clearer by using
i_append_or
or
i_add_or
or
i_next_or
... I guess it's clarity for users vs. conciseness...
👍 1