Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for 
change notification.

The "Partial_Updates" page has been changed by MarkHahn:
http://wiki.apache.org/couchdb/Partial_Updates?action=diff&rev1=7&rev2=8

Comment:
Fixed extra slash in missing object feature example

  
  == What is a partial update? ==
  
- A partial update is a single HTTP request to CouchDB that is similar to a 
normal update (PUT).  However the partial update request contains only 
information for updating (or deleting) one or more fields (or sub-fields) of a 
doc. 
+ A partial update is a single HTTP request to CouchDB that is similar to a 
normal update (PUT).  However the partial update request contains only 
information for updating (or deleting) one or more fields (or sub-fields) of a 
doc.
  
  == Why is a partial update useful? ==
  
@@ -94, +94 @@

  
  To install the update handler, add the Javascript version of code above to 
the ''updates'' property of a design doc.
  
- See [[Document_Update_Handlers]] for general information about update 
handlers.  
+ See [[Document_Update_Handlers]] for general information about update 
handlers.
  
  
  
@@ -106, +106 @@

  
  The update document should be contained in the HTTP request body in JSON 
format.  When using the partial update handler listed above, the update 
document must use a special format. The JSON doc should consist of one hash 
object where each property of the object is one ''update command''.
  
- The property key of an update command specifies which field is to be updated. 
 It can be a simple, top-level, property key or it can be a ''path'' into an 
object with nested objects or arrays.  A ''path'' key is indicated by a leading 
slash `/` and multiple parts separated by slashes.  
+ The property key of an update command specifies which field is to be updated. 
 It can be a simple, top-level, property key or it can be a ''path'' into an 
object with nested objects or arrays.  A ''path'' key is indicated by a leading 
slash `/` and multiple parts separated by slashes.
  
  Consider this original doc ...
  
@@ -127, +127 @@

  
  An update command that has the magic property value of `__delete__` will 
cause the corresponding original field to be deleted. The command property 
`/topLevelObject/nestedField_one: "__delete__"` will delete the entire 
nestedField_one property.
  
- The update handler will automatically create any objects missing from any 
part of a path. For example, the following update command 
`/topLevelObject/nestedField_three/dblNest/: 73` will add the missing objects 
''nestedField_three'' and ''dblNest'' to the doc.
+ The update handler will automatically create any objects missing from any 
part of a path. For example, the following update command 
`/topLevelObject/nestedField_three/dblNest: 73` will add the missing object 
''nestedField_three'' and new property ''dblNest'' to the doc.
  
  This update document ...
  
@@ -136, +136 @@

    field_one: "AAA",
    "/topLevelObject/nestedField_one": "__delete__",
    "/topLevelObject/nestedField_two": 99,
-   "/topLevelObject/nestedField_three/dblNest/": 73
+   "/topLevelObject/nestedField_three/dblNest": 73
  }
  }}}
  

Reply via email to