This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
Allow running JavaScript using execute_query #821
Comments
Excellent idea, goes towards more support for SJS by the MarkLogic ecosystem of tools. |
As a workaround, drop this into app_specific to make it work:
|
grtjn
added a commit
to grtjn/roxy
that referenced
this issue
Jan 10, 2018
grtjn
added a commit
that referenced
this issue
Jan 10, 2018
Fixed #821: allow executing sjs queries
Fixed in dev. I'll create a separate ticket to support sparql (and sql?) Example code: def testxqy
# in XQuery || means concat, e.g. result should be 'foobar'
r = execute_query %Q{
"foo" || "bar"
}
r.body = parse_body r.body
puts r.body
true
end
def testsjs
# In JavaScript || means OR, e.g. result should be 'foo'
r = execute_query %Q{
"foo" || "bar"
}, { :javascript => true }
r.body = parse_body r.body
puts r.body
true
end |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Would only take passing in :javascript => true in properties, and responding to that. Could be a ML8+ only..
While at it, could also support sparql, by calling /v1/graphs/sparql. ML8+ only though..
The text was updated successfully, but these errors were encountered: