Closed christoph-frick closed 6 years ago
Great discovery! I think the above three should not be mandatory. flatten-multi-keys should only be applied after checking for non nil. Eg:
(flatten-multi-keys extra-conditions)
should become
(when extra-conditions
(flatten-multi-keys extra-conditions))
are you willing to make another pr? :)
What about putting them in the :or
as empty maps?
that should work, too. Maybe that would save us from some null point exception headaches that I can't contemplate atm
See https://github.com/walkable-server/walkable/blob/9621f1ca5fba0dbed06872c80ede5a7b646af3c7/src/walkable/sql_query_builder.cljc#L422
Due to the use of
flatten-multi-keys
later, also the following keys are basically mandatory for a schema:joins
cardinality
extra-conditions
While the first two most likely always exist anyways in any non-trivial example,
extra-conditions
might actually not be needed and the assert thrown later inflatten-multi-keys
is way more confusing than just making themreq-un
for now?