Skip to content

Commit

Permalink
Merge pull request #69 from BillFarber/master
Browse files Browse the repository at this point in the history
Add Optic Update information to the user docs.
  • Loading branch information
BillFarber authored Jun 11, 2024
2 parents 54c4613 + f351105 commit e7a3b09
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ venv
.idea

.DS_Store
publishing_markLogic_client.token
18 changes: 18 additions & 0 deletions docs/managing-documents/writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,21 @@ the response headers as well.
The `status_code` and `text` fields in the `Response` object will typically be of the most interest when
debugging a problem. Please see
[Response API documentation](https://docs.python-requests.org/en/latest/api/#requests.Response) for complete information on what's available in this object.


## Optic Update

Beginning with version 1.2.0 of this client and MarkLogic Server 11.2, the client permits you to send an Optic
update query to MarkLogic via the new `client.rows.update` method. The first parameter is the Optic update query
(either DSL or serialized) and the second parameter specifies if the entire original response object should be
returned (`True`) or if only the data should be returned (`False`) upon a success (2xx) response. Note that if
the status code of the response is not 2xx, then the entire response is always returned.

Example:
```
plan = 'op.fromDocDescriptors({uri: "/helloworld.json", doc: {"hello": "world"}, collections: [ "mydocs" ] })'
response = client.rows.update(plan, return_response=True)
```

For more information about the Optic Update feature, please see
https://docs.marklogic.com/guide/release-notes/en/new-features-in-marklogic-11-2/optic-update-generally-available.html

0 comments on commit e7a3b09

Please sign in to comment.