zadean / xqerl

Erlang XQuery 3.1 Processor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Return basic node information after a DB selection.

zadean opened this issue · comments

Currently only the document PID and node ID are returned when an intermediate XPath statement is run.
When following queries on that same node happen, another send/receive to the document process happens. With somewhat complex queries, this can go into the millions of calls!
To avoid this, the return should be expanded to include any information needed after the statement. This could be anything: child nodes, name, parent, ...

Idea: Use a directed graph in the static phase to analyze/aggregate all paths queried and get them in one pass at run-time.

Compiled module functions should be able to report the paths (and type casts) used inside them.

Made obsolete by changes to the DB backend.