Hi, Nelson:

Can you expand a bit on the requirements?  My guess is that the goal
is to replace foreign key values with fragments from the related
database documents and to ensure unique values for primary key
elements.

If that's correct, you could extend the REST API with write and read
transforms.  A read transform can do an in-memory modification
of the document to denormalize foreign keys using nodes from related
documents.  A write transform can perform the reverse normalizing
operation as well as use cts:element-values() or another lexicon function
to confirm that the primary key occurs only in the document being
updated (or, if the document is being created, in no document).

Would that approach meet the requirements?


Erik Hennum

________________________________
From: [email protected] 
[[email protected]] on behalf of Nelson Wells 
[[email protected]]
Sent: Friday, December 14, 2012 12:29 PM
To: [email protected]
Subject: [MarkLogic Dev General] Marklogic 6 REST API limitations?

Hi all,

We’re exploring options for interacting with MarkLogic without writing XQuery 
code.  We currently do CRUD operations in MarkLogic with our own custom REST 
endpoints, and this particular flavor proven a little too hands on.  We’re 
looking at another, more generic REST interface developed by another team in 
the organization, and also the new REST interface introduced in ML6.

I haven’t gotten a chance to get my hands dirty with the new API, but I’ve read 
the developer’s guide and the API docs and I’m liking what I’m seeing.  In the 
time between now and my own experiments, can anyone give an example of when the 
REST API did not meet your needs, or under what circumstances you’ve needed to 
extend the interface?  Off the top of my head, it seems like an extension would 
have to be written when a join is required and you don’t want to have to make 
two HTTP requests and aggregate them in the consuming application.  Also, I 
haven’t read anything about maintaining node value uniqueness across an entire 
database other than searching first before doing an insert or update, but this 
may not be specific to the new REST API.

Any insight would be appreciated.

Thanks,
Nelson


NOTICE OF CONFIDENTIALITY: This electronic message, including attachments, is 
for the sole use of the named recipient and may contain confidential or 
privileged information protected by State of Tennessee and Federal regulations. 
Any unauthorized review, use, disclosure, copying or distribution is strictly 
prohibited. If you are not the intended recipient or have received this 
communication in error please contact the sender or email 
[email protected] and destroy all copies of the original message. Thank 
you.
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to