Description Usage Arguments Examples
Creates a new object to to insert to the couchDB. Takes either a list or a formatted json object as value Any attachment to the record needs to be base64-encoded added to the list as "_attachments" If key is provided this is used, null sends a key-less record to couch and the key will have to be retrieved from the response object.
1 | couch_new_object(value, database = NULL, key = NULL)
|
value |
List to be converted to json for transmission or pre-formatted JSON string |
database |
The database to use |
key |
The key (recordname) to use for the object. |
1 2 3 4 5 6 7 8 9 | ## Not run:
# This code creates a document containing a small list for storage in
# the "localhost" database with the key "testDoc".
myDoc <- couch_new_object(list(a = 1,b = 2),"localhost","testDoc")
# Same as above but with json entered directly (not recommended).
myDoc <- couch_new_object('{"a":1,"b":2}',"localhost","testDoc")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.