#1136 Transitive Relationships in Haxall

Thomas Hirsch Wed 11 Sep

Hi!

I was wondering if transitive relationships are supported in Haxall? According to https://project-haystack.org/doc/docHaystack/Relationships#transitive this should be part of H4.

There seems to be some code dealing with creating the contains and containedBy references in the Haxall codebase, however, i can not figure where and how this is called and how to actually perform queries in Haxall (as e.g. the "?" operator seemingly isnt implemented).

What i want to achieve is pretty much along the lines of the example in https://project-haystack.org/doc/docHaystack/Relationships#transitive.

E.g. id: @ahu, ahu, equip id: @ahuB, ahu, equip id: @fan, discharge, fan, equip, equipRef=@ahu id: @status, speed, cmd, point, equipRef=@fan

and then query for all ahu's that contain a status, query all children of @ahu, or query the ahu parents of @status.

thanks, cheers thomas

Brian Frank Wed 11 Sep

The docs are Haystack 3, but you mentioned H4 - maybe you meant Xeto? There isn't anything in Haxall that implements the Haystack 3 relationships. But the Xeto transitive relationships are implemented in a couple different layers of the software namely the Fantom API LibNamespace.queryWhile and the Axon API queryAll

Thomas Hirsch Fri 13 Sep

hi! thank you for the quick reply. I have to admit that I am new to haystack, and it has been a rather steep learning curve up to this point.

I was under the impression that everything 3.9.* is somewhat of a staging/preview of the 4.*.

Regarding Xeto, up to this point, I dig not into this as I was under the impression that this is to be used to verify grids conformity to xeto specs. But given your links above I can see how i can leverage this to solve some parts of my problems. However, I'm running into issues at every small step (hence the steep learning curve).

axon read(ahu).queryAll(spec("ph::Equip.points")) doesnt work because the spec is not found. Looking at your youtube videos, axon using() isnt working as for some reason it is not listed in funcs() of the haxall shell. I cannot get a axon shell to run in the docker container provided by haxall git repo (as the shell scripts run on broken paths when -ti `ing into the container).

If you have any recommendations regarding documentation and learning resources id be really happy to hear them.

Regarding my original problem, maybe i should add some more details: I have a grid (according to 3.9.14 defs, and no custom extensions) in a Haxall instance (3.1.10) that I want to query. On this grid, I want to run queries to get all children of a certain Id, or get all parents of a certain Id, - that I can filter further using regular ph filter queries.

thank you for your time. cheers, thomas

Brian Frank Fri 13 Sep

I was under the impression that everything 3.9.* is somewhat of a staging/preview of the 4.*

Yes that is correct, sorry I wasn't clear - I was just asking if you were talking about Xeto or the current way as described on the website today.

I would say unless you are adventurous, don't try to use Xeto - there isn't much documentation yet. Hopefully we will have more in next few months.

For today, there is no support in Haxall do what you want. You would have to do it via custom code

Login or Signup to reply.