[XQZone General] An extra for CQ users

atownsen at wiley.co.uk atownsen at wiley.co.uk
Wed Oct 26 07:51:19 PDT 2005





Hi All,

Attached (assuming attachments make it through the re-mailer) is a little
piece of code I've put together to help me out with a couple of scenarios
that I thought might be of use and/or interest to other people.

The bottom line is that it is a "remote CQ module" - i.e. it lets you
execute queries from one Mark Logic server on a separate Mark Logic server
by using a CQ installation on the remote system as a query interface.  In a
way it gives you a sort of flavour of xdmp:eval-in() than will eval in a
whole different server, not just a different database (whether across the
room or 1000 miles away so long as its on the network).

I've found it useful in migrating from a server on one platform to another
and for confirming a query on one system does the same as a query on a
remote system but I'm sure there must be other funky uses, especially for
those lucky people who have more than one server instance.

If nothing else I thought it would be an illustration of the use of the
xdmp:http-get() and xdmp:http-post() that might be of interest to newer
users :-)

It's had "reasonable" but not "exhaustive" testing and I've tried to pretty
it up (though I've not used xqDoc on it as yet - sorry Darin).

The main code is in attachment "mod-rcq.xqy" - the other attachment,
"rcqdemo.xqy" shows some simple uses but will need configuring before use
in order to point it at an instance of CQ that you can access.  For all
other details there are reasonable comments, mostly in the top of
"mod-rcq.xqy"

All (hopefully polite) comments welcome.

Andy


######################################################################
The information contained in this e-mail and any subsequent 
correspondence is private and confidential and intended solely 
for the named recipient(s).  If you are not a named recipient, 
you must not copy, distribute, or disseminate the information, 
open any attachment, or take any action in reliance on it.  If you 
have received the e-mail in error, please notify the sender and delete
the e-mail.  

Any views or opinions expressed in this e-mail are those of the 
individual sender, unless otherwise stated.  Although this e-mail has 
been scanned for viruses you should rely on your own virus check, as 
the sender accepts no liability for any damage arising out of any bug 
or virus infection.
######################################################################
-------------- next part --------------
A non-text attachment was scrubbed...
Name: =?ISO-8859-1?Q?mod-rcq=2Exqy?=
Type: application/octet-stream
Size: 11639 bytes
Desc: not available
Url : http://xqzone.marklogic.com/pipermail/general/attachments/20051026/c16158fc/ISO-8859-1Qmod-rcq2Exqy.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: =?ISO-8859-1?Q?rcqdemo=2Exqy?=
Type: application/octet-stream
Size: 2622 bytes
Desc: not available
Url : http://xqzone.marklogic.com/pipermail/general/attachments/20051026/c16158fc/ISO-8859-1Qrcqdemo2Exqy.obj


More information about the General mailing list