Closed hudecof closed 4 years ago
I typically collect where clauses in a list and if that list has a length run a ConditionalAND
...
wheres = []
if type:
wheres.append(__.school.property('type') == type)
if okres:
wheres.append(__.school.property('okres') == okres)
if len(wheres):
q.WHERE.CAND(*wheres)
q.RETURN.school
great, thanks this way I'm using the sqlalchemy, but pypher I'm using about 2 hours
Hi,
I'm trying to write pypher statement for function like
If both conditions are NULL it works. If
type
is set nadokres
is NULL, it works.Otherwise it do not works.
Is there any smart way hw to write WHERE statment, when I do not known the number of condition before? Like chaining AND, using Partials ..
regards Peter