given this recent discussion (https://project-haystack.org/forum/topic/1148#c5), I would like to propose adding any and all quantifiers to the haystack filter language.
As clarified in the above linked thread, an operation on a list of refs is ANY, meaning that if at least one of the refs matches, the whole thing matches.
However, this means that currently, it is impossible to query rows where ALL of the references in e.g. systemRef match a property. systemRef->ahu on a row with two references in systemRef will match when at least one of them has the ahu marker.
any: A filter in the form point and any systemRef->ahu will make the current behavior explicit. A filter in the form point and any not systemRef->ahu will match the row if any of the items in systemRef does not have the ahu marker. (again, this is the current behavior anyway)
all: A filter in the form point and all systemRef->ahu will match only rows where all the items referenced in systemRef match. And similarly, a filter in the form point and all not systemRef->ahu will match the row if none of the items in systemRef have the ahu marker.
any and all should also apply to transitive relationships (e.g. contains and containedBy).
The omission of the keywords any / all will lead to the default behavior any.
From my standpoint, adding such quantifiers would significantly increase the power of the filter language, especially when combined with transitive relationships.
cheers thomas hirsch
James GesselTue 4 Feb
This is an interesting idea and good catch. I support it, given the default doesn't change. Its a good topic assuming more system integrators will start using systemRef as a list.
Thomas Hirsch Thu 23 Jan
Hi all,
given this recent discussion (https://project-haystack.org/forum/topic/1148#c5), I would like to propose adding
anyandallquantifiers to the haystack filter language.As clarified in the above linked thread, an operation on a list of refs is ANY, meaning that if at least one of the refs matches, the whole thing matches.
However, this means that currently, it is impossible to query rows where ALL of the references in e.g. systemRef match a property.
systemRef->ahuon a row with two references in systemRef will match when at least one of them has theahumarker.any: A filter in the formpoint and any systemRef->ahuwill make the current behavior explicit. A filter in the formpoint and any not systemRef->ahuwill match the row if any of the items in systemRef does not have theahumarker. (again, this is the current behavior anyway)all: A filter in the formpoint and all systemRef->ahuwill match only rows where all the items referenced insystemRefmatch. And similarly, a filter in the formpoint and all not systemRef->ahuwill match the row if none of the items in systemRef have theahumarker.anyandallshould also apply to transitive relationships (e.g.containsandcontainedBy).The omission of the keywords
any/allwill lead to the default behaviorany.From my standpoint, adding such quantifiers would significantly increase the power of the filter language, especially when combined with transitive relationships.
cheers thomas hirsch
James Gessel Tue 4 Feb
This is an interesting idea and good catch. I support it, given the default doesn't change. Its a good topic assuming more system integrators will start using systemRef as a list.