Skip to content

Commit e7a3b09

Browse files
authored
Merge pull request #69 from BillFarber/master
Add Optic Update information to the user docs.
2 parents 54c4613 + f351105 commit e7a3b09

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ venv
77
.idea
88

99
.DS_Store
10+
publishing_markLogic_client.token

docs/managing-documents/writing.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,21 @@ the response headers as well.
175175
The `status_code` and `text` fields in the `Response` object will typically be of the most interest when
176176
debugging a problem. Please see
177177
[Response API documentation](https://docs.python-requests.org/en/latest/api/#requests.Response) for complete information on what's available in this object.
178+
179+
180+
## Optic Update
181+
182+
Beginning with version 1.2.0 of this client and MarkLogic Server 11.2, the client permits you to send an Optic
183+
update query to MarkLogic via the new `client.rows.update` method. The first parameter is the Optic update query
184+
(either DSL or serialized) and the second parameter specifies if the entire original response object should be
185+
returned (`True`) or if only the data should be returned (`False`) upon a success (2xx) response. Note that if
186+
the status code of the response is not 2xx, then the entire response is always returned.
187+
188+
Example:
189+
```
190+
plan = 'op.fromDocDescriptors({uri: "/helloworld.json", doc: {"hello": "world"}, collections: [ "mydocs" ] })'
191+
response = client.rows.update(plan, return_response=True)
192+
```
193+
194+
For more information about the Optic Update feature, please see
195+
https://docs.marklogic.com/guide/release-notes/en/new-features-in-marklogic-11-2/optic-update-generally-available.html

0 commit comments

Comments
 (0)