Skip to Content

xQuery & XSJS: how to?

Hi experts,

i wondering to know if XSJS natively supports xQuery definition. In my scenario i need to realize an XSJS that acts like a "middleware" between SAP Hana DB and external applications that process xQuery inputs: i should extract information from HDB, manipulate, suitably manipulate them and insert them within an xQuery.

Also, if XSJS doesn't support that particular solution, i'd like to know if there's a well-known (or just "known") way to solve this kind of issues.

Searching on various portals i can't find an answer to my issue.

Thanks in advance,

M.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2013 at 09:22 PM

    Hi Marco,

    XS does not support xQuery natively.

    Theoretically, it should be possible to import a Javascript implementation of xQuery into you XS code. A brief search for possible implementations did not turn up any good candidates.

    Upon thinking about it some more, I want to know why you want to use xQuery which is XML based, whereas XS is better suited for working with JSON. So perhaps you could consider using something like JSONPath (http://goessner.net/articles/JsonPath/) which would be a good candidate.

    While not a an out of the box solution, hopefully this can provide a helpful starting point.

    Good luck.

    David

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi David,

      the reason why i'd like to use xQuery is that i want to test if its possible to move an XML-based DB into Hana, and how the performances will increase, where XS Engine behaves as a "middleware" between Application layer (that consumes XML data coming from DB) and the Hana DB where i'd like to insert properly XML documents (BLOB column inside a table).

      Of course, JSON is a possibility that i was considering so, for this reason, i will test libraries that you have reported to me.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.