Module resty.riak.bucket
Riak bucket.
Can only be used with resty.riak created client
Functions
new_object (self, key) | Create a new riak value object. |
counter (self, key) | Create a new riak countert. |
new (client, name) | Create a new bucket object. |
get (self, key) | Get a riak object |
get_or_new (self, key) | Get a riak object or create one if it does not exist |
delete (self, key) | Delete an object |
properties (self) | Get bucket properties |
set_properties (self) | Set bucket properties |
Functions
- new_object (self, key)
-
Create a new riak value object. this can also be called as
bucket:new(key)
Parameters:
- self resty.riak.bucket
- key string
Returns:
see also:
- counter (self, key)
-
Create a new riak countert.
Parameters:
- self resty.riak.bucket
- key string
Returns:
see also:
- new (client, name)
-
Create a new bucket object. This does not actually do anything to riak. It only sets up the Lua objects
Parameters:
- client resty.riak a resy.riak created client
- name string the name of the bucket
Returns:
-
resty.riak.bucket
a riak bucket object
- get (self, key)
-
Get a riak object
Parameters:
- self resty.riak.bucket
- key string
Returns:
-
resty.riak.object
nil
if not found -
error
description.
not found
if not found
see also:
- get_or_new (self, key)
-
Get a riak object or create one if it does not exist
Parameters:
- self resty.riak.bucket
- key string
Returns:
- resty.riak.object
- error description.
see also:
- delete (self, key)
-
Delete an object
Parameters:
- self resty.riak.bucket
- key string
see also:
- properties (self)
-
Get bucket properties
Parameters:
- self resty.riak.bucket
Returns:
- table properties as defined in RpbBucketProps
- string error description
- set_properties (self)
-
Set bucket properties
Parameters:
- self resty.riak.bucket
Returns:
-
string
error description