Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for XML proxy nodes in a query #106

Closed
wants to merge 0 commits into from

Conversation

gcampbell512
Copy link
Contributor

XML proxy nodes allow a schema to branch to using a remote apteryx database for a query. This change works by checking if a proxy node exists in the supplied query and if so splits the query into two parts (1) the query path down to the proxy node, (2) the remaining remote query. The remote query can then be translated if required. The reverse process occurs with the query result.

schema.c Outdated
}

for (child = xmlFirstElementChild (xml); child; child = xmlNextElementSibling (child))
found = _sch_xml_has_proxy (instance, schema, ns, child, depth + 1, flags);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't make much sense of a lot of this, but this looks a bit suspicious to me. Maybe should be OR of all found values or AND of them all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have modified the for loop to exit as soon as found is set true. This will cascade back up to the top of the recursive routines. The proxy detection routines are based on the equivalent _sch_xml_to_gnode and _sch_path_to_gnode routines with the setting of the GNode tree nodes removed, so its not actually new code.

Copy link
Contributor

@tony-vanderpeet tony-vanderpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure how to go about reviewing something like this. To truly do it justice would take hours I suspect. I have found one thing that might be an issue, but ultimately we are going to have to test the hell out of this I suspect... The last bug I fixed, I couldn't find a way to get to one of the pieces of code I changed, I have no idea how we are going to get coverage on some of this stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants