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

feat: add complex xquery support #28

Merged
merged 5 commits into from
Sep 30, 2023
Merged

feat: add complex xquery support #28

merged 5 commits into from
Sep 30, 2023

Conversation

TinkoLiu
Copy link
Contributor

Added support for complex XQuery usage.

e.g.

An XML from Ross Dashboard

<?xml version="1.1" encoding="UTF-8"?>
<card autosave="true" online="true" slot="1"
     sourceframename="Frame"
     status="0" statustext="OK" version="2.0">
     <params>
          <param access="1" maxlength="0" name="CountdownValue" oid="1"
               type="STRING" value="00:00" widget="label"/>
          <param access="1" constrainttype="INT_NULL" name="TargetTime"
               oid="2" precision="0" strvalue="0" type="INT32" value="0" widget="default"/>
          <param access="1" maxlength="0" name="CountdownToTarget"
               oid="3" type="STRING" value="936:33" widget="label"/>
          <param access="1" maxlength="0" name="DateTime" oid="1001"
               type="STRING" value="2023-09-29 02:23:26" widget="label"/>
          <param access="1" constrainttype="INT_NULL"
               name="InputCountdown" oid="4" precision="0"
               strvalue="181" type="INT32" value="181" widget="default"/>
          <param access="1" constrainttype="INT_NULL"
               name="InputTargetHout" oid="5" precision="0"
               strvalue="20" type="INT32" value="20" widget="default"/>
          <param access="1" constrainttype="INT_NULL"
               name="InputTargetMinute" oid="6" precision="0"
               strvalue="38" type="INT32" value="38" widget="default"/>
          <param access="1" constrainttype="INT_NULL"
               name="InputTargetSecond" oid="7" precision="0"
               strvalue="0" type="INT32" value="0" widget="default"/>
     </params>
     <statsmenu menuid="0" name="status"/>
     <configmenu menuid="1" name="config"/>
</card>

With XQuery str //param[@oid=3]/@value will get the result like
image

Other XQuery methods such as sum or count is also available
image
image

Copy link
Collaborator

@royshil royshil left a comment

Choose a reason for hiding this comment

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

this checks out! Thank you so much for this contribution!

src/ui/RequestBuilder.cpp Outdated Show resolved Hide resolved
@royshil royshil merged commit 7a6985e into locaal-ai:master Sep 30, 2023
6 checks passed
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