Module resty.riak.object
Riak value object.
Can only be used with resty.riak created client. These are generally just wrappers around the low level resty.riak.client functions
Functions
new (bucket, key) | Create a new riak object. |
load (bucket, key, response) | Create a “high level” object from a table returned by resty.riak.client.get_object. |
store (self) | Persist an object to riak. |
delete (options) | Delete an object |
Functions
- new (bucket, key)
-
Create a new riak object. This does not change anything in riak, it only sets up a Lua object.
This does not persist to the server(s) until store is called. Generally, resty.riak.bucket.new_object is prefered.Parameters:
- bucket riak.resty.bucket
- key string
Returns:
- load (bucket, key, response)
-
Create a “high level” object from a table returned by resty.riak.client.get_object. This is considered a “private” function
Parameters:
- bucket resty.riak.bucket
- key string
- response table as returned by resty.riak.client.get_object
Returns:
- resty.riak.object
- string error description
- store (self)
-
Persist an object to riak.
Parameters:
- self resty.riak.object
see also:
- delete (options)
-
Delete an object
Parameters:
- options table optional parameters as defined in PBC Delete Object. vclock will be set to the objects vclock if present
Returns:
-
resty.riak.object
self
see also: