You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
There seems to be (yet another) small change in QC evaler. Apparently, it now requires both dbid and sid. I changed execute_query_7 in deploy/lib/server_config.rb as follows, and that seems to run against ML9. Not entirely convinced it is backwards-compatible:
def execute_query_7(query, properties = {})
# We need a context for this query. Here's what we look for, in order of preference:
# 1. A caller-specified database
# 2. A caller-specified application server
# 3. An application server that is present by default
# 4. Any database
if properties[:db_name] != nil
db_id = get_db_id(properties[:db_name])
+ sid = get_sid("Manage")
elsif properties[:app_name] != nil
sid = get_sid(properties[:app_name])
+ db_id = get_db_id("Documents")
else
sid = get_sid("Manage")
+ db_id = get_db_id("Documents")
end
ws_id, q_id = create_roxy_workspace()
raise ExitException.new("Can't create Roxy workspace in QConsole") unless ws_id && q_id
db_id = get_any_db_id if db_id.nil? && sid.nil?
# necessary to work around weirdness on windows
headers = {
'content-type' => 'text/plain'
}
url = "#{@protocol}://#{@hostname}:#{@qconsole_port}/qconsole/endpoints/evaler.xqy?wsid=#{ws_id}&qid=#{q_id}&action=eval&querytype=xquery&dirty=true"
if db_id.present?
url = url + "&dbid=#{db_id}"
+ end
+ if sid.present?
url = url + "&sid=#{sid}"
end
+ r = go(url, "post", headers, nil, query)
delete_workspace(ws_id) if ws_id
raise ExitException.new(JSON.pretty_generate(JSON.parse(r.body))) if r.body.match(/\{"error"/)
r
end
MarkLogic 9 Early Access 1 release is out (limited availability). Test and fix as needed.
The text was updated successfully, but these errors were encountered: