Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update docs for 2.0.0 pre-release client.

  • Loading branch information...
commit fdf191c13792e558dacb0ff74d5e74b54973200a 1 parent 1040c95
@seancribbs seancribbs authored
View
4 edoc-info
@@ -1,3 +1,5 @@
+%% encoding: UTF-8
{application,riakc}.
{packages,[]}.
-{modules,[riakc_obj,riakc_pb_socket]}.
+{modules,[riakc_counter,riakc_datatype,riakc_flag,riakc_map,riakc_obj,
+ riakc_pb_socket,riakc_register,riakc_set]}.
View
8 modules-frame.html
@@ -7,7 +7,13 @@
<body bgcolor="white">
<h2 class="indextitle">Modules</h2>
<table width="100%" border="0" summary="list of modules">
+<tr><td><a href="riakc_counter.html" target="overviewFrame" class="module">riakc_counter</a></td></tr>
+<tr><td><a href="riakc_datatype.html" target="overviewFrame" class="module">riakc_datatype</a></td></tr>
+<tr><td><a href="riakc_flag.html" target="overviewFrame" class="module">riakc_flag</a></td></tr>
+<tr><td><a href="riakc_map.html" target="overviewFrame" class="module">riakc_map</a></td></tr>
<tr><td><a href="riakc_obj.html" target="overviewFrame" class="module">riakc_obj</a></td></tr>
-<tr><td><a href="riakc_pb_socket.html" target="overviewFrame" class="module">riakc_pb_socket</a></td></tr></table>
+<tr><td><a href="riakc_pb_socket.html" target="overviewFrame" class="module">riakc_pb_socket</a></td></tr>
+<tr><td><a href="riakc_register.html" target="overviewFrame" class="module">riakc_register</a></td></tr>
+<tr><td><a href="riakc_set.html" target="overviewFrame" class="module">riakc_set</a></td></tr></table>
</body>
</html>
View
16 overview-summary.html
@@ -9,7 +9,7 @@
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<h1>Riak Client for Erlang</h1>
<p>Copyright © 2010-2013 Basho Technologies, Inc.</p>
-<p><b>Version:</b> 1.4.1</p>
+<p><b>Version:</b> 2.0.0pre</p>
<p><b>Authors:</b> Basho Technologies, Inc..</p>
<p>The <code>riakc</code> application encapsulates the Erlang
client for Riak. This client uses the Protocol Buffers transport
@@ -24,16 +24,24 @@
{tag, "1.4.1"}}}
]}.</pre>
-<p>The application consists of 2 modules:</p>
+<p>The application consists of these primary modules:</p>
<ul>
<li><strong>riakc_pb_socket</strong> - connection management and execution of client commands. Usually you will start a connection process using <code>riakc_pb_socket:start_link/2,3</code>.</li>
<li><strong>riakc_obj</strong> - accessor and mutator functions for the <code>riakc_obj</code> record that is sent to and returned from Key-Value operations.</li>
+<li>Riak convergent datatypes are supported by the <strong>riakc_datatype</strong> behaviour and these modules:
+ <ul>
+ <li><strong>riakc_counter</strong></li>
+ <li><strong>riakc_set</strong></li>
+ <li><strong>riakc_map</strong> (with embedded
+ types <strong>riakc_flag</strong>
+ and <strong>riakc_register</strong>)</li>
+ </ul>
+</li>
</ul>
-
<p><code>riakc</code> is licensed under the Apache v2 license.</p>
<hr>
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
-<p><i>Generated by EDoc, Aug 19 2013, 15:57:38.</i></p>
+<p><i>Generated by EDoc, Dec 6 2013, 10:31:07.</i></p>
</body>
</html>
View
14 overview.edoc
@@ -1,6 +1,6 @@
@author Basho Technologies, Inc.
@copyright 2010-2013 Basho Technologies, Inc.
-@version 1.4.1
+@version 2.0.0pre
@title Riak Client for Erlang
@doc <p>The <code>riakc</code> application encapsulates the Erlang
client for Riak. This client uses the Protocol Buffers transport
@@ -17,12 +17,20 @@ the one below to the <code>rebar.config</code> in your project.</p>
{tag, "1.4.1"}}}
]}.</pre>
-<p>The application consists of 2 modules:</p>
+<p>The application consists of these primary modules:</p>
<ul>
<li><strong>riakc_pb_socket</strong> - connection management and execution of client commands. Usually you will start a connection process using <code>riakc_pb_socket:start_link/2,3</code>.</li>
<li><strong>riakc_obj</strong> - accessor and mutator functions for the <code>riakc_obj</code> record that is sent to and returned from Key-Value operations.</li>
+<li>Riak convergent datatypes are supported by the <strong>riakc_datatype</strong> behaviour and these modules:
+ <ul>
+ <li><strong>riakc_counter</strong></li>
+ <li><strong>riakc_set</strong></li>
+ <li><strong>riakc_map</strong> (with embedded
+ types <strong>riakc_flag</strong>
+ and <strong>riakc_register</strong>)</li>
+ </ul>
+</li>
</ul>
-
<p><code>riakc</code> is licensed under the Apache v2 license.</p>
@end
View
110 riakc_counter.html
@@ -0,0 +1,110 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Module riakc_counter</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<hr>
+
+<h1>Module riakc_counter</h1>
+<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Encapsulates a counter data-type.
+
+<p><b>Behaviours:</b> <a href="riakc_datatype.html"><tt>riakc_datatype</tt></a>.</p>
+
+<h2><a name="description">Description</a></h2>Encapsulates a counter data-type. Counters are integers that
+ can be incremented or decremented. Like the other
+ eventually-consistent types, the original fetched value is
+ unmodified by increments. Instead, increments are captured for
+ later application in Riak. Use <code>dirty_value/1</code> to access a local
+ "view" of the updated value.
+<h2><a name="types">Data Types</a></h2>
+
+<h3 class="typedecl"><a name="type-counter">counter()</a></h3>
+<p><b>abstract datatype</b>: <tt>counter()</tt></p>
+
+
+<h3 class="typedecl"><a name="type-counter_op">counter_op()</a></h3>
+<p><tt>counter_op() = {increment, integer()}</tt></p>
+
+
+<h2><a name="index">Function Index</a></h2>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#decrement-1">decrement/1</a></td><td>Decrements the counter by 1.</td></tr>
+<tr><td valign="top"><a href="#decrement-2">decrement/2</a></td><td>Decrements the counter by the passed amount.</td></tr>
+<tr><td valign="top"><a href="#dirty_value-1">dirty_value/1</a></td><td>Gets the value of the counter after local updates are applied.</td></tr>
+<tr><td valign="top"><a href="#increment-1">increment/1</a></td><td>Increments the counter by 1.</td></tr>
+<tr><td valign="top"><a href="#increment-2">increment/2</a></td><td>Increments the counter by the passed amount.</td></tr>
+<tr><td valign="top"><a href="#is_type-1">is_type/1</a></td><td>Determines whether the passed term is a counter container.</td></tr>
+<tr><td valign="top"><a href="#new-0">new/0</a></td><td>Creates a new counter type with a value of 0.</td></tr>
+<tr><td valign="top"><a href="#new-2">new/2</a></td><td>Creates a new counter type with the passed integer and
+ context.</td></tr>
+<tr><td valign="top"><a href="#to_op-1">to_op/1</a></td><td>Extracts the changes to this counter as an operation.</td></tr>
+<tr><td valign="top"><a href="#type-0">type/0</a></td><td>Returns the symbolic name of this container.</td></tr>
+<tr><td valign="top"><a href="#value-1">value/1</a></td><td>Gets the original value of the counter.</td></tr>
+</table>
+
+<h2><a name="functions">Function Details</a></h2>
+
+<h3 class="function"><a name="decrement-1">decrement/1</a></h3>
+<div class="spec">
+<p><tt>decrement(Counter::<a href="#type-counter">counter()</a>) -&gt; <a href="#type-counter">counter()</a></tt><br></p>
+</div><p>Decrements the counter by 1.</p>
+
+<h3 class="function"><a name="decrement-2">decrement/2</a></h3>
+<div class="spec">
+<p><tt>decrement(Amount::integer(), Counter::<a href="#type-counter">counter()</a>) -&gt; <a href="#type-counter">counter()</a></tt><br></p>
+</div><p>Decrements the counter by the passed amount.</p>
+
+<h3 class="function"><a name="dirty_value-1">dirty_value/1</a></h3>
+<div class="spec">
+<p><tt>dirty_value(Counter::<a href="#type-counter">counter()</a>) -&gt; integer()</tt><br></p>
+</div><p>Gets the value of the counter after local updates are applied.</p>
+
+<h3 class="function"><a name="increment-1">increment/1</a></h3>
+<div class="spec">
+<p><tt>increment(Counter::<a href="#type-counter">counter()</a>) -&gt; <a href="#type-counter">counter()</a></tt><br></p>
+</div><p>Increments the counter by 1.</p>
+
+<h3 class="function"><a name="increment-2">increment/2</a></h3>
+<div class="spec">
+<p><tt>increment(Amount::integer(), Counter::<a href="#type-counter">counter()</a>) -&gt; <a href="#type-counter">counter()</a></tt><br></p>
+</div><p>Increments the counter by the passed amount.</p>
+
+<h3 class="function"><a name="is_type-1">is_type/1</a></h3>
+<div class="spec">
+<p><tt>is_type(T::term()) -&gt; boolean()</tt><br></p>
+</div><p>Determines whether the passed term is a counter container.</p>
+
+<h3 class="function"><a name="new-0">new/0</a></h3>
+<div class="spec">
+<p><tt>new() -&gt; <a href="#type-counter">counter()</a></tt><br></p>
+</div><p>Creates a new counter type with a value of 0.</p>
+
+<h3 class="function"><a name="new-2">new/2</a></h3>
+<div class="spec">
+<p><tt>new(Value::integer(), Context::<a href="riakc_datatype.html#type-context">riakc_datatype:context()</a>) -&gt; <a href="#type-counter">counter()</a></tt><br></p>
+</div><p>Creates a new counter type with the passed integer and
+ context.</p>
+
+<h3 class="function"><a name="to_op-1">to_op/1</a></h3>
+<div class="spec">
+<p><tt>to_op(Counter::<a href="#type-counter">counter()</a>) -&gt; <a href="riakc_datatype.html#type-update">riakc_datatype:update</a>(<a href="#type-counter_op">counter_op()</a>)</tt><br></p>
+</div><p>Extracts the changes to this counter as an operation.</p>
+
+<h3 class="function"><a name="type-0">type/0</a></h3>
+<div class="spec">
+<p><tt>type() -&gt; atom()</tt><br></p>
+</div><p>Returns the symbolic name of this container.</p>
+
+<h3 class="function"><a name="value-1">value/1</a></h3>
+<div class="spec">
+<p><tt>value(Counter::<a href="#type-counter">counter()</a>) -&gt; integer()</tt><br></p>
+</div><p>Gets the original value of the counter.</p>
+<hr>
+
+<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<p><i>Generated by EDoc, Dec 6 2013, 10:31:07.</i></p>
+</body>
+</html>
View
69 riakc_datatype.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Module riakc_datatype</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<hr>
+
+<h1>Module riakc_datatype</h1>
+<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>When used with riakc_pb_socket:fetch_type() and
+ riakc_pb_socket:update_type(), modules implementing this behaviour
+ provide an internally consistent local view of the data while
+ capturing update operations for shipping back to the server.
+
+<p><b>This module defines the <tt>riakc_datatype</tt> behaviour.</b><br> Required callback functions: <tt>new/0</tt>, <tt>new/2</tt>, <tt>value/1</tt>, <tt>dirty_value/1</tt>, <tt>to_op/1</tt>, <tt>is_type/1</tt>, <tt>type/0</tt>.</p>
+
+<h2><a name="description">Description</a></h2>When used with riakc_pb_socket:fetch_type() and
+ riakc_pb_socket:update_type(), modules implementing this behaviour
+ provide an internally consistent local view of the data while
+ capturing update operations for shipping back to the server.
+<h2><a name="types">Data Types</a></h2>
+
+<h3 class="typedecl"><a name="type-context">context()</a></h3>
+<p><tt>context() = <a href="#type-maybe">maybe</a>(binary())</tt></p>
+
+
+<h3 class="typedecl"><a name="type-datatype">datatype()</a></h3>
+<p><tt>datatype() = term()</tt></p>
+
+
+<h3 class="typedecl"><a name="type-maybe">maybe()</a></h3>
+<p><tt>maybe(T) = T | undefined</tt></p>
+
+
+<h3 class="typedecl"><a name="type-typename">typename()</a></h3>
+<p><tt>typename() = atom()</tt></p>
+
+
+<h3 class="typedecl"><a name="type-update">update()</a></h3>
+<p><tt>update(T) = <a href="#type-maybe">maybe</a>({<a href="#type-typename">typename()</a>, T, <a href="#type-context">context()</a>})</tt></p>
+
+
+<h2><a name="index">Function Index</a></h2>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#module-1">module/1</a></td><td></td></tr>
+<tr><td valign="top"><a href="#module_for_term-1">module_for_term/1</a></td><td>Returns the appropriate container module for the given term,
+ if possible.</td></tr>
+</table>
+
+<h2><a name="functions">Function Details</a></h2>
+
+<h3 class="function"><a name="module-1">module/1</a></h3>
+<div class="spec">
+<p><tt>module(Type::atom()) -&gt; module()</tt><br></p>
+</div>
+
+<h3 class="function"><a name="module_for_term-1">module_for_term/1</a></h3>
+<div class="spec">
+<p><tt>module_for_term(T::<a href="#type-datatype">datatype()</a>) -&gt; <a href="#type-maybe">maybe</a>(module())</tt><br></p>
+</div><p>Returns the appropriate container module for the given term,
+ if possible.</p>
+<hr>
+
+<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<p><i>Generated by EDoc, Dec 6 2013, 10:31:07.</i></p>
+</body>
+</html>
View
104 riakc_flag.html
@@ -0,0 +1,104 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Module riakc_flag</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<hr>
+
+<h1>Module riakc_flag</h1>
+<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Encapsulates a flag data-type.
+
+<p><b>Behaviours:</b> <a href="riakc_datatype.html"><tt>riakc_datatype</tt></a>.</p>
+
+<h2><a name="description">Description</a></h2>Encapsulates a flag data-type. Flags are boolean values that
+ can be enabled or disabled. Like the other eventually-consistent
+ types, the original fetched value is unmodified by enabling or
+ disabling. Instead, the effective operation (<code>enable</code> or <code>disable</code>)
+ is captured for later application in Riak. Use <code>dirty_value/1</code> to
+ access a local "view" of the updated value. Note that it is
+ possible to <code>enable</code> a flag that is already <code>true</code> and <code>disable</code> a
+ flag that is already <code>false</code>. Flags are only available as values in
+ maps.
+<h2><a name="types">Data Types</a></h2>
+
+<h3 class="typedecl"><a name="type-flag">flag()</a></h3>
+<p><b>abstract datatype</b>: <tt>flag()</tt></p>
+
+
+<h3 class="typedecl"><a name="type-flag_op">flag_op()</a></h3>
+<p><tt>flag_op() = enable | disable</tt></p>
+
+
+<h2><a name="index">Function Index</a></h2>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#dirty_value-1">dirty_value/1</a></td><td>Extracts the value of the flag with local modifications
+ applied.</td></tr>
+<tr><td valign="top"><a href="#disable-1">disable/1</a></td><td>Disables the flag, setting its value to false.</td></tr>
+<tr><td valign="top"><a href="#enable-1">enable/1</a></td><td>Enables the flag, setting its value to true.</td></tr>
+<tr><td valign="top"><a href="#is_type-1">is_type/1</a></td><td>Determines whether the passed term is a flag container.</td></tr>
+<tr><td valign="top"><a href="#new-0">new/0</a></td><td>Creates a new, empty flag container type.</td></tr>
+<tr><td valign="top"><a href="#new-2">new/2</a></td><td>Creates a new flag with the specified value and context.</td></tr>
+<tr><td valign="top"><a href="#to_op-1">to_op/1</a></td><td>Extracts an operation from the flag that can be encoded into
+ an update request.</td></tr>
+<tr><td valign="top"><a href="#type-0">type/0</a></td><td>Returns the symbolic name of this container.</td></tr>
+<tr><td valign="top"><a href="#value-1">value/1</a></td><td>Extracts the original value of the flag.</td></tr>
+</table>
+
+<h2><a name="functions">Function Details</a></h2>
+
+<h3 class="function"><a name="dirty_value-1">dirty_value/1</a></h3>
+<div class="spec">
+<p><tt>dirty_value(Flag::<a href="#type-flag">flag()</a>) -&gt; boolean()</tt><br></p>
+</div><p>Extracts the value of the flag with local modifications
+ applied.</p>
+
+<h3 class="function"><a name="disable-1">disable/1</a></h3>
+<div class="spec">
+<p><tt>disable(Flag::<a href="#type-flag">flag()</a>) -&gt; <a href="#type-flag">flag()</a></tt><br></p>
+</div><p>Disables the flag, setting its value to false.</p>
+
+<h3 class="function"><a name="enable-1">enable/1</a></h3>
+<div class="spec">
+<p><tt>enable(Flag::<a href="#type-flag">flag()</a>) -&gt; <a href="#type-flag">flag()</a></tt><br></p>
+</div><p>Enables the flag, setting its value to true.</p>
+
+<h3 class="function"><a name="is_type-1">is_type/1</a></h3>
+<div class="spec">
+<p><tt>is_type(T::term()) -&gt; boolean()</tt><br></p>
+</div><p>Determines whether the passed term is a flag container.</p>
+
+<h3 class="function"><a name="new-0">new/0</a></h3>
+<div class="spec">
+<p><tt>new() -&gt; <a href="#type-flag">flag()</a></tt><br></p>
+</div><p>Creates a new, empty flag container type.</p>
+
+<h3 class="function"><a name="new-2">new/2</a></h3>
+<div class="spec">
+<p><tt>new(Value::boolean(), Context::<a href="riakc_datatype.html#type-context">riakc_datatype:context()</a>) -&gt; <a href="#type-flag">flag()</a></tt><br></p>
+</div><p>Creates a new flag with the specified value and context.</p>
+
+<h3 class="function"><a name="to_op-1">to_op/1</a></h3>
+<div class="spec">
+<p><tt>to_op(Flag::<a href="#type-flag">flag()</a>) -&gt; <a href="riakc_datatype.html#type-update">riakc_datatype:update</a>(<a href="#type-flag_op">flag_op()</a>)</tt><br></p>
+</div><p>Extracts an operation from the flag that can be encoded into
+ an update request.</p>
+
+<h3 class="function"><a name="type-0">type/0</a></h3>
+<div class="spec">
+<p><tt>type() -&gt; atom()</tt><br></p>
+</div><p>Returns the symbolic name of this container.</p>
+
+<h3 class="function"><a name="value-1">value/1</a></h3>
+<div class="spec">
+<p><tt>value(Flag::<a href="#type-flag">flag()</a>) -&gt; boolean()</tt><br></p>
+</div><p>Extracts the original value of the flag. true is enabled,
+ false is disabled.</p>
+<hr>
+
+<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<p><i>Generated by EDoc, Dec 6 2013, 10:31:07.</i></p>
+</body>
+</html>
View
211 riakc_map.html
@@ -0,0 +1,211 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Module riakc_map</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<hr>
+
+<h1>Module riakc_map</h1>
+<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Encapsulates a map data-type.
+
+<p><b>Behaviours:</b> <a href="riakc_datatype.html"><tt>riakc_datatype</tt></a>.</p>
+
+<h2><a name="description">Description</a></h2><p>Encapsulates a map data-type. Maps differ from Erlang's dict
+ types in several ways:</p>
+ <ul>
+ <li>Maps are special key-value structures where the key is a pair
+ of a binary name and data type, and the value is a container of the
+ specified type, e.g. <code>{&lt;&lt;"friends"&gt;&gt;, set} -&gt; riakc_set:set()</code>.
+ Regular Erlang terms may not be values in the map, but could be
+ serialized into <code>register</code> fields if last-write-wins semantics are
+ sufficient.</li>
+ <li>Like the other eventually-consistent types, updates are not
+ applied to local state. Instead, additions, removals, and
+ modifications are captured for later application by Riak. Use
+ <code>dirty_value/1</code> to access a local "view" of the updates.</li>
+ <li>You may not "store" values in a map, but you may create new
+ entries using <code>add/2</code>, which inserts an empty value of the
+ specified type. Existing or non-existing entries can be modified
+ using <code>update/3</code>, which is analogous to <code>dict:update/3</code>. If the
+ entry is not present, it will be populated with a new value before
+ the update function is applied. The update function will receive
+ the appropriate container type as its sole argument.</li>
+ <li>Like sets, removals will be processed before additions and
+ updates in Riak. Removals performed without a context may result in
+ failure.</li>
+ <li>Adding or updating an entry followed by removing that same
+ entry will result in no operation being recorded. Likewise,
+ removing an entry followed by adding or updating that entry will
+ cancel the removal operation.</li>
+ </ul>
+<h2><a name="types">Data Types</a></h2>
+
+<h3 class="typedecl"><a name="type-datatype">datatype()</a></h3>
+<p><tt>datatype() = counter | flag | register | set | map</tt></p>
+
+
+<h3 class="typedecl"><a name="type-embedded_type_op">embedded_type_op()</a></h3>
+<p><tt>embedded_type_op() = <a href="riakc_counter.html#type-counter_op">riakc_counter:counter_op()</a> | <a href="riakc_set.html#type-set_op">riakc_set:set_op()</a> | <a href="riakc_flag.html#type-flag_op">riakc_flag:flag_op()</a> | <a href="riakc_register.html#type-register_op">riakc_register:register_op()</a> | <a href="#type-map_op">map_op()</a></tt></p>
+
+
+<h3 class="typedecl"><a name="type-entry">entry()</a></h3>
+<p><tt>entry() = {<a href="#type-key">key()</a>, <a href="riakc_datatype.html#type-datatype">riakc_datatype:datatype()</a>}</tt></p>
+
+
+<h3 class="typedecl"><a name="type-field_update">field_update()</a></h3>
+<p><tt>field_update() = {update, <a href="#type-key">key()</a>, <a href="#type-embedded_type_op">embedded_type_op()</a>}</tt></p>
+
+
+<h3 class="typedecl"><a name="type-key">key()</a></h3>
+<p><tt>key() = {binary(), <a href="#type-datatype">datatype()</a>}</tt></p>
+
+
+<h3 class="typedecl"><a name="type-map">map()</a></h3>
+<p><tt>map() = #map{value = [<a href="#type-raw_entry">raw_entry()</a>], updates = [<a href="#type-entry">entry()</a>], adds = <a href="ordsets.html#type-ordset">ordsets:ordset</a>(<a href="#type-key">key()</a>), removes = <a href="ordsets.html#type-ordset">ordsets:ordset</a>(<a href="#type-key">key()</a>), context = <a href="riakc_datatype.html#type-context">riakc_datatype:context()</a>}</tt></p>
+
+
+<h3 class="typedecl"><a name="type-map_op">map_op()</a></h3>
+<p><tt>map_op() = {update, [<a href="#type-simple_map_op">simple_map_op()</a>]}</tt></p>
+
+
+<h3 class="typedecl"><a name="type-raw_entry">raw_entry()</a></h3>
+<p><tt>raw_entry() = {<a href="#type-key">key()</a>, term()}</tt></p>
+
+
+<h3 class="typedecl"><a name="type-simple_map_op">simple_map_op()</a></h3>
+<p><tt>simple_map_op() = {add, <a href="#type-key">key()</a>} | {remove, <a href="#type-key">key()</a>} | <a href="#type-field_update">field_update()</a></tt></p>
+
+
+<h3 class="typedecl"><a name="type-update_fun">update_fun()</a></h3>
+<p><tt>update_fun() = fun((<a href="riakc_datatype.html#type-datatype">riakc_datatype:datatype()</a>) -&gt; <a href="riakc_datatype.html#type-datatype">riakc_datatype:datatype()</a>)</tt></p>
+
+
+<h2><a name="index">Function Index</a></h2>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#add-2">add/2</a></td><td>Adds a key to the map, inserting the empty value for its type.</td></tr>
+<tr><td valign="top"><a href="#dirty_value-1">dirty_value/1</a></td><td>Gets the value of the map after local updates are applied.</td></tr>
+<tr><td valign="top"><a href="#erase-2">erase/2</a></td><td>Removes a key and its value from the map.</td></tr>
+<tr><td valign="top"><a href="#fetch-2">fetch/2</a></td><td>Returns the "unwrapped" value associated with the key in the
+ map.</td></tr>
+<tr><td valign="top"><a href="#fetch_keys-1">fetch_keys/1</a></td><td>Returns a list of all keys in the map.</td></tr>
+<tr><td valign="top"><a href="#find-2">find/2</a></td><td>Searches for a key in the map.</td></tr>
+<tr><td valign="top"><a href="#fold-3">fold/3</a></td><td>Folds over the entries in the map.</td></tr>
+<tr><td valign="top"><a href="#is_key-2">is_key/2</a></td><td>Test if the key is contained in the map.</td></tr>
+<tr><td valign="top"><a href="#is_type-1">is_type/1</a></td><td>Determines whether the passed term is a map container.</td></tr>
+<tr><td valign="top"><a href="#new-0">new/0</a></td><td>Creates a new, empty map container type.</td></tr>
+<tr><td valign="top"><a href="#new-2">new/2</a></td><td>Creates a new map with the specified key-value pairs and context.</td></tr>
+<tr><td valign="top"><a href="#size-1">size/1</a></td><td>Returns the number of entries in the map.</td></tr>
+<tr><td valign="top"><a href="#to_op-1">to_op/1</a></td><td>Extracts an operation from the map that can be encoded into an
+ update request.</td></tr>
+<tr><td valign="top"><a href="#type-0">type/0</a></td><td>Returns the symbolic name of this container.</td></tr>
+<tr><td valign="top"><a href="#update-3">update/3</a></td><td>Updates the value stored at the key by calling the passed
+ function to get the new value.</td></tr>
+<tr><td valign="top"><a href="#value-1">value/1</a></td><td>Gets the original value of the map.</td></tr>
+</table>
+
+<h2><a name="functions">Function Details</a></h2>
+
+<h3 class="function"><a name="add-2">add/2</a></h3>
+<div class="spec">
+<p><tt>add(Key::<a href="#type-key">key()</a>, Map::<a href="#type-map">map()</a>) -&gt; <a href="#type-map">map()</a></tt><br></p>
+</div><p>Adds a key to the map, inserting the empty value for its type.
+ Adding a key that already exists in the map has no effect. If the
+ key has been previously removed from the map, the removal will be
+ discarded, but no explicit add will be recorded.</p>
+
+<h3 class="function"><a name="dirty_value-1">dirty_value/1</a></h3>
+<div class="spec">
+<p><tt>dirty_value(Map::<a href="#type-map">map()</a>) -&gt; [<a href="#type-raw_entry">raw_entry()</a>]</tt><br></p>
+</div><p>Gets the value of the map after local updates are applied.</p>
+
+<h3 class="function"><a name="erase-2">erase/2</a></h3>
+<div class="spec">
+<p><tt>erase(Key::<a href="#type-key">key()</a>, Map::<a href="#type-map">map()</a>) -&gt; <a href="#type-map">map()</a></tt><br></p>
+</div><p>Removes a key and its value from the map. Removing a key that
+ does not exist simply records a remove operation. Removing a key
+ whose value has been added via <code>add/2</code> or locally modified via
+ <code>update/3</code> nullifies any of those modifications, without recording
+ a remove operation.</p>
+
+<h3 class="function"><a name="fetch-2">fetch/2</a></h3>
+<div class="spec">
+<p><tt>fetch(Key::<a href="#type-key">key()</a>, Map::<a href="#type-map">map()</a>) -&gt; term()</tt><br></p>
+</div><p>Returns the "unwrapped" value associated with the key in the
+ map. If the key is not present, an exception is generated.</p>
+
+<h3 class="function"><a name="fetch_keys-1">fetch_keys/1</a></h3>
+<div class="spec">
+<p><tt>fetch_keys(Map::<a href="#type-map">map()</a>) -&gt; [<a href="#type-key">key()</a>]</tt><br></p>
+</div><p>Returns a list of all keys in the map.</p>
+
+<h3 class="function"><a name="find-2">find/2</a></h3>
+<div class="spec">
+<p><tt>find(Key::<a href="#type-key">key()</a>, Map::<a href="#type-map">map()</a>) -&gt; {ok, term()} | error</tt><br></p>
+</div><p>Searches for a key in the map. Returns <code>{ok, UnwrappedValue}</code>
+ when the key is present, or <code>error</code> if the key is not present in
+ the map.</p>
+
+<h3 class="function"><a name="fold-3">fold/3</a></h3>
+<div class="spec">
+<p><tt>fold(Fun::fun((<a href="#type-key">key()</a>, term(), term()) -&gt; term()), Acc0::term(), Map::<a href="#type-map">map()</a>) -&gt; term()</tt><br></p>
+</div><p>Folds over the entries in the map. This yields raw values,
+ not container types.</p>
+
+<h3 class="function"><a name="is_key-2">is_key/2</a></h3>
+<div class="spec">
+<p><tt>is_key(Key::<a href="#type-key">key()</a>, Map::<a href="#type-map">map()</a>) -&gt; boolean()</tt><br></p>
+</div><p>Test if the key is contained in the map.</p>
+
+<h3 class="function"><a name="is_type-1">is_type/1</a></h3>
+<div class="spec">
+<p><tt>is_type(T::term()) -&gt; boolean()</tt><br></p>
+</div><p>Determines whether the passed term is a map container.</p>
+
+<h3 class="function"><a name="new-0">new/0</a></h3>
+<div class="spec">
+<p><tt>new() -&gt; <a href="#type-map">map()</a></tt><br></p>
+</div><p>Creates a new, empty map container type.</p>
+
+<h3 class="function"><a name="new-2">new/2</a></h3>
+<div class="spec">
+<p><tt>new(Values::[<a href="#type-raw_entry">raw_entry()</a>], Context::<a href="riakc_datatype.html#type-context">riakc_datatype:context()</a>) -&gt; <a href="#type-map">map()</a></tt><br></p>
+</div><p>Creates a new map with the specified key-value pairs and context.</p>
+
+<h3 class="function"><a name="size-1">size/1</a></h3>
+<div class="spec">
+<p><tt>size(Map::<a href="#type-map">map()</a>) -&gt; pos_integer()</tt><br></p>
+</div><p>Returns the number of entries in the map.</p>
+
+<h3 class="function"><a name="to_op-1">to_op/1</a></h3>
+<div class="spec">
+<p><tt>to_op(Map::<a href="#type-map">map()</a>) -&gt; <a href="riakc_datatype.html#type-update">riakc_datatype:update</a>(<a href="#type-map_op">map_op()</a>)</tt><br></p>
+</div><p>Extracts an operation from the map that can be encoded into an
+ update request.</p>
+
+<h3 class="function"><a name="type-0">type/0</a></h3>
+<div class="spec">
+<p><tt>type() -&gt; atom()</tt><br></p>
+</div><p>Returns the symbolic name of this container.</p>
+
+<h3 class="function"><a name="update-3">update/3</a></h3>
+<div class="spec">
+<p><tt>update(Key::<a href="#type-key">key()</a>, Fun::<a href="#type-update_fun">update_fun()</a>, Map::<a href="#type-map">map()</a>) -&gt; <a href="#type-map">map()</a></tt><br></p>
+</div><p>Updates the value stored at the key by calling the passed
+ function to get the new value. If the key did not previously exist,
+ it will be initialized to the empty value for its type before being
+ passed to the function. If the key was previously removed with
+ <code>erase/2</code>, the remove operation will be nullified.</p>
+
+<h3 class="function"><a name="value-1">value/1</a></h3>
+<div class="spec">
+<p><tt>value(Map::<a href="#type-map">map()</a>) -&gt; [<a href="#type-raw_entry">raw_entry()</a>]</tt><br></p>
+</div><p>Gets the original value of the map.</p>
+<hr>
+
+<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<p><i>Generated by EDoc, Dec 6 2013, 10:31:07.</i></p>
+</body>
+</html>
View
16 riakc_obj.html
@@ -33,7 +33,7 @@ <h3 class="typedecl"><a name="type-binary_index_value">binary_index_value()</a><
<h3 class="typedecl"><a name="type-bucket">bucket()</a></h3>
-<p><tt>bucket() = binary()</tt></p>
+<p><tt>bucket() = binary() | {binary(), binary()}</tt></p>
<p> A bucket name</p>
<h3 class="typedecl"><a name="type-content_type">content_type()</a></h3>
@@ -116,6 +116,7 @@ <h3 class="typedecl"><a name="type-vclock">vclock()</a></h3>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#add_link-2">add_link/2</a></td><td> Add links for a specific tag.</td></tr>
<tr><td valign="top"><a href="#add_secondary_index-2">add_secondary_index/2</a></td><td> Add a secondary index.</td></tr>
<tr><td valign="top"><a href="#bucket-1">bucket/1</a></td><td>Return the containing bucket for this riakc_obj.</td></tr>
+<tr><td valign="top"><a href="#bucket_type-1">bucket_type/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#clear_links-1">clear_links/1</a></td><td> Clear all links.</td></tr>
<tr><td valign="top"><a href="#clear_secondary_indexes-1">clear_secondary_indexes/1</a></td><td> Clear all secondary indexes.</td></tr>
<tr><td valign="top"><a href="#clear_user_metadata_entries-1">clear_user_metadata_entries/1</a></td><td> Clear all metadata entries.</td></tr>
@@ -146,6 +147,7 @@ <h3 class="typedecl"><a name="type-vclock">vclock()</a></h3>
<tr><td valign="top"><a href="#new-2">new/2</a></td><td>Constructor for new riak client objects.</td></tr>
<tr><td valign="top"><a href="#new-3">new/3</a></td><td>Constructor for new riak client objects with an update value.</td></tr>
<tr><td valign="top"><a href="#new-4">new/4</a></td><td>Constructor for new riak client objects with an update value and content type.</td></tr>
+<tr><td valign="top"><a href="#only_bucket-1">only_bucket/1</a></td><td>Return the containing bucket for this riakc_obj.</td></tr>
<tr><td valign="top"><a href="#select_sibling-2">select_sibling/2</a></td><td> Select the sibling to use for update - starting from 1.</td></tr>
<tr><td valign="top"><a href="#set_link-2">set_link/2</a></td><td> Set links for a specific tag.</td></tr>
<tr><td valign="top"><a href="#set_secondary_index-2">set_secondary_index/2</a></td><td> Set a secondary index.</td></tr>
@@ -176,6 +178,11 @@ <h3 class="function"><a name="bucket-1">bucket/1</a></h3>
<p><tt>bucket(Object::<a href="#type-riakc_obj">riakc_obj()</a>) -&gt; <a href="#type-bucket">bucket()</a></tt><br></p>
</div><p>Return the containing bucket for this riakc_obj.</p>
+<h3 class="function"><a name="bucket_type-1">bucket_type/1</a></h3>
+<div class="spec">
+<p><tt>bucket_type(Object::<a href="#type-riakc_obj">riakc_obj()</a>) -&gt; <a href="#type-bucket">bucket()</a></tt><br></p>
+</div>
+
<h3 class="function"><a name="clear_links-1">clear_links/1</a></h3>
<div class="spec">
<p><tt>clear_links(MD::<a href="#type-metadata">metadata()</a>) -&gt; <a href="#type-metadata">metadata()</a></tt><br></p>
@@ -321,6 +328,11 @@ <h3 class="function"><a name="new-4">new/4</a></h3>
<p><tt>new(Bucket::<a href="#type-bucket">bucket()</a>, Key::<a href="#type-key">key()</a>, Value::<a href="#type-value">value()</a>, ContentType::<a href="#type-content_type">content_type()</a>) -&gt; <a href="#type-riakc_obj">riakc_obj()</a></tt><br></p>
</div><p>Constructor for new riak client objects with an update value and content type.</p>
+<h3 class="function"><a name="only_bucket-1">only_bucket/1</a></h3>
+<div class="spec">
+<p><tt>only_bucket(Object::<a href="#type-riakc_obj">riakc_obj()</a>) -&gt; binary()</tt><br></p>
+</div><p>Return the containing bucket for this riakc_obj.</p>
+
<h3 class="function"><a name="select_sibling-2">select_sibling/2</a></h3>
<div class="spec">
<p><tt>select_sibling(Index::pos_integer(), Object::<a href="#type-riakc_obj">riakc_obj()</a>) -&gt; <a href="#type-riakc_obj">riakc_obj()</a></tt><br></p>
@@ -378,6 +390,6 @@ <h3 class="function"><a name="vclock-1">vclock/1</a></h3>
<hr>
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
-<p><i>Generated by EDoc, Aug 19 2013, 15:57:38.</i></p>
+<p><i>Generated by EDoc, Dec 6 2013, 10:31:07.</i></p>
</body>
</html>
View
341 riakc_pb_socket.html
@@ -29,14 +29,6 @@ <h3 class="typedecl"><a name="type-bucket">bucket()</a></h3>
<p><tt>bucket() = binary()</tt></p>
-<h3 class="typedecl"><a name="type-bucket">bucket()</a></h3>
-<p><tt>bucket() = binary()</tt></p>
-
-
-<h3 class="typedecl"><a name="type-bucket_prop">bucket_prop()</a></h3>
-<p><tt>bucket_prop() = {n_val, pos_integer()} | {allow_mult, boolean()}</tt></p>
-
-
<h3 class="typedecl"><a name="type-bucket_prop">bucket_prop()</a></h3>
<p><tt>bucket_prop() = {n_val, pos_integer()} | {allow_mult, boolean()}</tt></p>
@@ -45,14 +37,6 @@ <h3 class="typedecl"><a name="type-bucket_props">bucket_props()</a></h3>
<p><tt>bucket_props() = [<a href="#type-bucket_prop">bucket_prop()</a>]</tt></p>
-<h3 class="typedecl"><a name="type-bucket_props">bucket_props()</a></h3>
-<p><tt>bucket_props() = [<a href="#type-bucket_prop">bucket_prop()</a>]</tt></p>
-
-
-<h3 class="typedecl"><a name="type-client_id">client_id()</a></h3>
-<p><tt>client_id() = binary()</tt></p>
-
-
<h3 class="typedecl"><a name="type-client_id">client_id()</a></h3>
<p><tt>client_id() = binary()</tt></p>
@@ -61,22 +45,10 @@ <h3 class="typedecl"><a name="type-client_option">client_option()</a></h3>
<p><tt>client_option() = queue_if_disconnected | {queue_if_disconnected, boolean()} | {connect_timeout, pos_integer()} | auto_reconnect | {auto_reconnect, boolean()}</tt></p>
-<h3 class="typedecl"><a name="type-client_option">client_option()</a></h3>
-<p><tt>client_option() = queue_if_disconnected | {queue_if_disconnected, boolean()} | {connect_timeout, pos_integer()} | auto_reconnect | {auto_reconnect, boolean()}</tt></p>
-
-
<h3 class="typedecl"><a name="type-client_options">client_options()</a></h3>
<p><tt>client_options() = [<a href="#type-client_option">client_option()</a>]</tt></p>
-<h3 class="typedecl"><a name="type-client_options">client_options()</a></h3>
-<p><tt>client_options() = [<a href="#type-client_option">client_option()</a>]</tt></p>
-
-
-<h3 class="typedecl"><a name="type-connection_failure">connection_failure()</a></h3>
-<p><tt>connection_failure() = {Reason::term(), FailureCount::integer()}</tt></p>
-
-
<h3 class="typedecl"><a name="type-connection_failure">connection_failure()</a></h3>
<p><tt>connection_failure() = {Reason::term(), FailureCount::integer()}</tt></p>
@@ -85,10 +57,6 @@ <h3 class="typedecl"><a name="type-continuation">continuation()</a></h3>
<p><tt>continuation() = undefined | binary()</tt></p>
-<h3 class="typedecl"><a name="type-continuation">continuation()</a></h3>
-<p><tt>continuation() = undefined | binary()</tt></p>
-
-
<h3 class="typedecl"><a name="type-cs_opt">cs_opt()</a></h3>
<p><tt>cs_opt() = {timeout, timeout()} | {continuation, binary()} | {max_results, non_neg_integer() | all} | {start_key, binary()} | {start_incl, boolean()} | {end_key, binary()} | {end_incl, boolean()}</tt></p>
@@ -101,14 +69,6 @@ <h3 class="typedecl"><a name="type-delete_option">delete_option()</a></h3>
<p><tt>delete_option() = <a href="#type-delete_quorum">delete_quorum()</a> | {n_val, pos_integer()} | {sloppy_quorum, boolean()}</tt></p>
-<h3 class="typedecl"><a name="type-delete_option">delete_option()</a></h3>
-<p><tt>delete_option() = <a href="#type-delete_quorum">delete_quorum()</a> | {n_val, pos_integer()} | {sloppy_quorum, boolean()}</tt></p>
-
-
-<h3 class="typedecl"><a name="type-delete_options">delete_options()</a></h3>
-<p><tt>delete_options() = [<a href="#type-delete_option">delete_option()</a>]</tt></p>
-
-
<h3 class="typedecl"><a name="type-delete_options">delete_options()</a></h3>
<p><tt>delete_options() = [<a href="#type-delete_option">delete_option()</a>]</tt></p>
@@ -117,14 +77,6 @@ <h3 class="typedecl"><a name="type-delete_quorum">delete_quorum()</a></h3>
<p><tt>delete_quorum() = <a href="#type-read_quorum">read_quorum()</a> | <a href="#type-write_quorum">write_quorum()</a> | {rw, ReadWriteQuorum::<a href="#type-quorum">quorum()</a>}</tt></p>
-<h3 class="typedecl"><a name="type-delete_quorum">delete_quorum()</a></h3>
-<p><tt>delete_quorum() = <a href="#type-read_quorum">read_quorum()</a> | <a href="#type-write_quorum">write_quorum()</a> | {rw, ReadWriteQuorum::<a href="#type-quorum">quorum()</a>}</tt></p>
-
-
-<h3 class="typedecl"><a name="type-get_option">get_option()</a></h3>
-<p><tt>get_option() = <a href="#type-read_quorum">read_quorum()</a> | {if_modified, <a href="riakc_obj.html#type-vclock">riakc_obj:vclock()</a>} | {notfound_ok, boolean()} | {basic_quorum, boolean()} | head | deletedvclock | {n_val, pos_integer()} | {sloppy_quorum, boolean()}</tt></p>
-
-
<h3 class="typedecl"><a name="type-get_option">get_option()</a></h3>
<p><tt>get_option() = <a href="#type-read_quorum">read_quorum()</a> | {if_modified, <a href="riakc_obj.html#type-vclock">riakc_obj:vclock()</a>} | {notfound_ok, boolean()} | {basic_quorum, boolean()} | head | deletedvclock | {n_val, pos_integer()} | {sloppy_quorum, boolean()}</tt></p>
@@ -133,10 +85,6 @@ <h3 class="typedecl"><a name="type-get_options">get_options()</a></h3>
<p><tt>get_options() = [<a href="#type-get_option">get_option()</a>]</tt></p>
-<h3 class="typedecl"><a name="type-get_options">get_options()</a></h3>
-<p><tt>get_options() = [<a href="#type-get_option">get_option()</a>]</tt></p>
-
-
<h3 class="typedecl"><a name="type-index_opt">index_opt()</a></h3>
<p><tt>index_opt() = {timeout, timeout()} | {call_timeout, timeout()} | {stream, boolean()} | {continuation, binary()} | {max_results, non_neg_integer() | all}</tt></p>
@@ -149,22 +97,10 @@ <h3 class="typedecl"><a name="type-index_results">index_results()</a></h3>
<p><tt>index_results() = #index_results_v1{keys = undefined | <a href="#type-keys">keys()</a>, terms = undefined | <a href="#type-index_terms">index_terms()</a>, continuation = undefined | <a href="#type-continuation">continuation()</a>}</tt></p>
-<h3 class="typedecl"><a name="type-index_results">index_results()</a></h3>
-<p><tt>index_results() = #index_results_v1{keys = undefined | <a href="#type-keys">keys()</a>, terms = undefined | <a href="#type-index_terms">index_terms()</a>, continuation = undefined | <a href="#type-continuation">continuation()</a>}</tt></p>
-
-
<h3 class="typedecl"><a name="type-index_term">index_term()</a></h3>
<p><tt>index_term() = integer() | binary()</tt></p>
-<h3 class="typedecl"><a name="type-index_term">index_term()</a></h3>
-<p><tt>index_term() = integer() | binary()</tt></p>
-
-
-<h3 class="typedecl"><a name="type-index_terms">index_terms()</a></h3>
-<p><tt>index_terms() = [{<a href="#type-index_term">index_term()</a>, binary()}] | undefined</tt></p>
-
-
<h3 class="typedecl"><a name="type-index_terms">index_terms()</a></h3>
<p><tt>index_terms() = [{<a href="#type-index_term">index_term()</a>, binary()}] | undefined</tt></p>
@@ -173,14 +109,6 @@ <h3 class="typedecl"><a name="type-key">key()</a></h3>
<p><tt>key() = binary()</tt></p>
-<h3 class="typedecl"><a name="type-key">key()</a></h3>
-<p><tt>key() = binary()</tt></p>
-
-
-<h3 class="typedecl"><a name="type-keys">keys()</a></h3>
-<p><tt>keys() = [binary()] | undefined</tt></p>
-
-
<h3 class="typedecl"><a name="type-keys">keys()</a></h3>
<p><tt>keys() = [binary()] | undefined</tt></p>
@@ -189,14 +117,6 @@ <h3 class="typedecl"><a name="type-mapred_funterm">mapred_funterm()</a></h3>
<p><tt>mapred_funterm() = {modfun, Module::atom(), Function::atom()} | {qfun, function()} | {strfun, list() | binary()} | {jsanon, binary() | {<a href="#type-bucket">bucket()</a>, <a href="#type-key">key()</a>}} | {jsfun, binary()}</tt></p>
-<h3 class="typedecl"><a name="type-mapred_funterm">mapred_funterm()</a></h3>
-<p><tt>mapred_funterm() = {modfun, Module::atom(), Function::atom()} | {qfun, function()} | {strfun, list() | binary()} | {jsanon, binary() | {<a href="#type-bucket">bucket()</a>, <a href="#type-key">key()</a>}} | {jsfun, binary()}</tt></p>
-
-
-<h3 class="typedecl"><a name="type-mapred_inputs">mapred_inputs()</a></h3>
-<p><tt>mapred_inputs() = [{<a href="#type-bucket">bucket()</a>, <a href="#type-key">key()</a>} | {{<a href="#type-bucket">bucket()</a>, <a href="#type-key">key()</a>}, term()}] | {modfun, Module::atom(), Function::atom(), [term()]} | <a href="#type-bucket">bucket()</a> | {index, <a href="#type-bucket">bucket()</a>, Index::binary() | <a href="#type-secondary_index_id">secondary_index_id()</a>, <a href="#type-key">key()</a> | integer()} | {index, <a href="#type-bucket">bucket()</a>, Index::binary() | <a href="#type-secondary_index_id">secondary_index_id()</a>, StartKey::<a href="#type-key">key()</a> | integer(), EndKey::<a href="#type-key">key()</a> | integer()}</tt></p>
-
-
<h3 class="typedecl"><a name="type-mapred_inputs">mapred_inputs()</a></h3>
<p><tt>mapred_inputs() = [{<a href="#type-bucket">bucket()</a>, <a href="#type-key">key()</a>} | {{<a href="#type-bucket">bucket()</a>, <a href="#type-key">key()</a>}, term()}] | {modfun, Module::atom(), Function::atom(), [term()]} | <a href="#type-bucket">bucket()</a> | {index, <a href="#type-bucket">bucket()</a>, Index::binary() | <a href="#type-secondary_index_id">secondary_index_id()</a>, <a href="#type-key">key()</a> | integer()} | {index, <a href="#type-bucket">bucket()</a>, Index::binary() | <a href="#type-secondary_index_id">secondary_index_id()</a>, StartKey::<a href="#type-key">key()</a> | integer(), EndKey::<a href="#type-key">key()</a> | integer()}</tt></p>
@@ -205,14 +125,6 @@ <h3 class="typedecl"><a name="type-mapred_queryterm">mapred_queryterm()</a></h3>
<p><tt>mapred_queryterm() = {map, <a href="#type-mapred_funterm">mapred_funterm()</a>, Arg::term(), Accumulate::boolean()} | {reduce, <a href="#type-mapred_funterm">mapred_funterm()</a>, Arg::term(), Accumulate::boolean()} | {link, Bucket::<a href="riakc_obj.html#type-bucket">riakc_obj:bucket()</a>, Tag::term(), Accumulate::boolean()}</tt></p>
-<h3 class="typedecl"><a name="type-mapred_queryterm">mapred_queryterm()</a></h3>
-<p><tt>mapred_queryterm() = {map, <a href="#type-mapred_funterm">mapred_funterm()</a>, Arg::term(), Accumulate::boolean()} | {reduce, <a href="#type-mapred_funterm">mapred_funterm()</a>, Arg::term(), Accumulate::boolean()} | {link, Bucket::<a href="riakc_obj.html#type-bucket">riakc_obj:bucket()</a>, Tag::term(), Accumulate::boolean()}</tt></p>
-
-
-<h3 class="typedecl"><a name="type-mapred_result">mapred_result()</a></h3>
-<p><tt>mapred_result() = [term()]</tt></p>
-
-
<h3 class="typedecl"><a name="type-mapred_result">mapred_result()</a></h3>
<p><tt>mapred_result() = [term()]</tt></p>
@@ -229,14 +141,6 @@ <h3 class="typedecl"><a name="type-put_option">put_option()</a></h3>
<p><tt>put_option() = <a href="#type-write_quorum">write_quorum()</a> | return_body | return_head | if_not_modified | if_none_match | {n_val, pos_integer()} | {sloppy_quorum, boolean()}</tt></p>
-<h3 class="typedecl"><a name="type-put_option">put_option()</a></h3>
-<p><tt>put_option() = <a href="#type-write_quorum">write_quorum()</a> | return_body | return_head | if_not_modified | if_none_match | {n_val, pos_integer()} | {sloppy_quorum, boolean()}</tt></p>
-
-
-<h3 class="typedecl"><a name="type-put_options">put_options()</a></h3>
-<p><tt>put_options() = [<a href="#type-put_option">put_option()</a>]</tt></p>
-
-
<h3 class="typedecl"><a name="type-put_options">put_options()</a></h3>
<p><tt>put_options() = [<a href="#type-put_option">put_option()</a>]</tt></p>
@@ -245,10 +149,6 @@ <h3 class="typedecl"><a name="type-quorum">quorum()</a></h3>
<p><tt>quorum() = non_neg_integer() | one | all | quorum | default</tt></p>
-<h3 class="typedecl"><a name="type-quorum">quorum()</a></h3>
-<p><tt>quorum() = non_neg_integer() | one | all | quorum | default</tt></p>
-
-
<h3 class="typedecl"><a name="type-range_index_opt">range_index_opt()</a></h3>
<p><tt>range_index_opt() = {return_terms, boolean()}</tt></p>
@@ -261,14 +161,6 @@ <h3 class="typedecl"><a name="type-read_quorum">read_quorum()</a></h3>
<p><tt>read_quorum() = {r, ReadQuorum::<a href="#type-quorum">quorum()</a>} | {pr, PrimaryReadQuorum::<a href="#type-quorum">quorum()</a>}</tt></p>
-<h3 class="typedecl"><a name="type-read_quorum">read_quorum()</a></h3>
-<p><tt>read_quorum() = {r, ReadQuorum::<a href="#type-quorum">quorum()</a>} | {pr, PrimaryReadQuorum::<a href="#type-quorum">quorum()</a>}</tt></p>
-
-
-<h3 class="typedecl"><a name="type-req_id">req_id()</a></h3>
-<p><tt>req_id() = non_neg_integer()</tt></p>
-
-
<h3 class="typedecl"><a name="type-req_id">req_id()</a></h3>
<p><tt>req_id() = non_neg_integer()</tt></p>
@@ -277,20 +169,20 @@ <h3 class="typedecl"><a name="type-riakc_obj">riakc_obj()</a></h3>
<p><tt>riakc_obj() = <a href="riakc_obj.html#type-riakc_obj">riakc_obj:riakc_obj()</a></tt></p>
-<h3 class="typedecl"><a name="type-riakc_obj">riakc_obj()</a></h3>
-<p><tt>riakc_obj() = <a href="riakc_obj.html#type-riakc_obj">riakc_obj:riakc_obj()</a></tt></p>
+<h3 class="typedecl"><a name="type-search_admin_opt">search_admin_opt()</a></h3>
+<p><tt>search_admin_opt() = {timeout, timeout()} | {call_timeout, timeout()}</tt></p>
-<h3 class="typedecl"><a name="type-search_doc">search_doc()</a></h3>
-<p><tt>search_doc() = [{binary(), binary()}]</tt></p>
+<h3 class="typedecl"><a name="type-search_admin_opts">search_admin_opts()</a></h3>
+<p><tt>search_admin_opts() = [<a href="#type-search_admin_opt">search_admin_opt()</a>]</tt></p>
<h3 class="typedecl"><a name="type-search_doc">search_doc()</a></h3>
<p><tt>search_doc() = [{binary(), binary()}]</tt></p>
-<h3 class="typedecl"><a name="type-search_option">search_option()</a></h3>
-<p><tt>search_option() = {rows, non_neg_integer()} | {start, non_neg_integer()} | {sort, binary()} | {filter, binary()} | {df, binary()} | {op, binary()} | {fl, [binary()]} | {presort, binary()}</tt></p>
+<h3 class="typedecl"><a name="type-search_index">search_index()</a></h3>
+<p><tt>search_index() = [{index, binary()} | {schema, binary()}]</tt></p>
<h3 class="typedecl"><a name="type-search_option">search_option()</a></h3>
@@ -301,20 +193,12 @@ <h3 class="typedecl"><a name="type-search_options">search_options()</a></h3>
<p><tt>search_options() = [<a href="#type-search_option">search_option()</a>]</tt></p>
-<h3 class="typedecl"><a name="type-search_options">search_options()</a></h3>
-<p><tt>search_options() = [<a href="#type-search_option">search_option()</a>]</tt></p>
-
-
<h3 class="typedecl"><a name="type-search_result">search_result()</a></h3>
<p><tt>search_result() = #search_results{docs = undefined | [<a href="#type-search_doc">search_doc()</a>], max_score = undefined | float(), num_found = undefined | non_neg_integer()}</tt></p>
-<h3 class="typedecl"><a name="type-search_result">search_result()</a></h3>
-<p><tt>search_result() = #search_results{docs = undefined | [<a href="#type-search_doc">search_doc()</a>], max_score = undefined | float(), num_found = undefined | non_neg_integer()}</tt></p>
-
-
-<h3 class="typedecl"><a name="type-secondary_index_id">secondary_index_id()</a></h3>
-<p><tt>secondary_index_id() = {binary_index, string()} | {integer_index, string()}</tt></p>
+<h3 class="typedecl"><a name="type-search_schema">search_schema()</a></h3>
+<p><tt>search_schema() = [{name, binary()} | {content, binary()}]</tt></p>
<h3 class="typedecl"><a name="type-secondary_index_id">secondary_index_id()</a></h3>
@@ -325,22 +209,10 @@ <h3 class="typedecl"><a name="type-server_info">server_info()</a></h3>
<p><tt>server_info() = [<a href="#type-server_prop">server_prop()</a>]</tt></p>
-<h3 class="typedecl"><a name="type-server_info">server_info()</a></h3>
-<p><tt>server_info() = [<a href="#type-server_prop">server_prop()</a>]</tt></p>
-
-
<h3 class="typedecl"><a name="type-server_prop">server_prop()</a></h3>
<p><tt>server_prop() = {node, binary()} | {server_version, binary()}</tt></p>
-<h3 class="typedecl"><a name="type-server_prop">server_prop()</a></h3>
-<p><tt>server_prop() = {node, binary()} | {server_version, binary()}</tt></p>
-
-
-<h3 class="typedecl"><a name="type-timeout_name">timeout_name()</a></h3>
-<p><tt>timeout_name() = ping_timeout | get_client_id_timeout | set_client_id_timeout | get_server_info_timeout | get_timeout | put_timeout | delete_timeout | list_buckets_timeout | list_buckets_call_timeout | list_keys_timeout | stream_list_keys_timeout | stream_list_keys_call_timeout | get_bucket_timeout | get_bucket_call_timeout | set_bucket_timeout | set_bucket_call_timeout | mapred_timeout | mapred_call_timeout | mapred_stream_timeout | mapred_stream_call_timeout | mapred_bucket_timeout | mapred_bucket_call_timeout | mapred_bucket_stream_call_timeout | search_timeout | search_call_timeout | timeout</tt></p>
-
-
<h3 class="typedecl"><a name="type-timeout_name">timeout_name()</a></h3>
<p><tt>timeout_name() = ping_timeout | get_client_id_timeout | set_client_id_timeout | get_server_info_timeout | get_timeout | put_timeout | delete_timeout | list_buckets_timeout | list_buckets_call_timeout | list_keys_timeout | stream_list_keys_timeout | stream_list_keys_call_timeout | get_bucket_timeout | get_bucket_call_timeout | set_bucket_timeout | set_bucket_call_timeout | mapred_timeout | mapred_call_timeout | mapred_stream_timeout | mapred_stream_call_timeout | mapred_bucket_timeout | mapred_bucket_call_timeout | mapred_bucket_stream_call_timeout | search_timeout | search_call_timeout | timeout</tt></p>
@@ -349,16 +221,16 @@ <h3 class="typedecl"><a name="type-write_quorum">write_quorum()</a></h3>
<p><tt>write_quorum() = {w, WriteQuorum::<a href="#type-quorum">quorum()</a>} | {dw, DurableWriteQuorum::<a href="#type-quorum">quorum()</a>} | {pw, PrimaryWriteQuorum::<a href="#type-quorum">quorum()</a>}</tt></p>
-<h3 class="typedecl"><a name="type-write_quorum">write_quorum()</a></h3>
-<p><tt>write_quorum() = {w, WriteQuorum::<a href="#type-quorum">quorum()</a>} | {dw, DurableWriteQuorum::<a href="#type-quorum">quorum()</a>} | {pw, PrimaryWriteQuorum::<a href="#type-quorum">quorum()</a>}</tt></p>
-
-
<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#counter_incr-4">counter_incr/4</a></td><td>increment the counter at <code>bucket</code>, <code>key</code> by <code>amount</code></td></tr>
<tr><td valign="top"><a href="#counter_incr-5">counter_incr/5</a></td><td>increment the counter at <code>Bucket</code>, <code>Key</code> by <code>Amount</code>.</td></tr>
<tr><td valign="top"><a href="#counter_val-3">counter_val/3</a></td><td>get the current value of the counter at <code>Bucket</code>, <code>Key</code>.</td></tr>
<tr><td valign="top"><a href="#counter_val-4">counter_val/4</a></td><td>get the current value of the counter at <code>Bucket</code>, <code>Key</code> using
the <code>read_qurom()</code> <code>Options</code> provided.</td></tr>
+<tr><td valign="top"><a href="#create_search_index-2">create_search_index/2</a></td><td>Create a search index.</td></tr>
+<tr><td valign="top"><a href="#create_search_index-4">create_search_index/4</a></td><td>Create a search index.</td></tr>
+<tr><td valign="top"><a href="#create_search_schema-3">create_search_schema/3</a></td><td>Create a schema, which is a required component of an index.</td></tr>
+<tr><td valign="top"><a href="#create_search_schema-4">create_search_schema/4</a></td><td>Create a schema, which is a required component of an index.</td></tr>
<tr><td valign="top"><a href="#cs_bucket_fold-3">cs_bucket_fold/3</a></td><td>secret function, do not use, or I come to your house and keeel you.</td></tr>
<tr><td valign="top"><a href="#default_timeout-1">default_timeout/1</a></td><td>Return the default timeout for an operation if none is provided.</td></tr>
<tr><td valign="top"><a href="#delete-3">delete/3</a></td><td>Delete the key/value.</td></tr>
@@ -367,16 +239,24 @@ <h3 class="typedecl"><a name="type-write_quorum">write_quorum()</a></h3>
<tr><td valign="top"><a href="#delete_obj-2">delete_obj/2</a></td><td>Delete the riak object.</td></tr>
<tr><td valign="top"><a href="#delete_obj-3">delete_obj/3</a></td><td>Delete the riak object with options.</td></tr>
<tr><td valign="top"><a href="#delete_obj-4">delete_obj/4</a></td><td>Delete the riak object with options and timeout.</td></tr>
+<tr><td valign="top"><a href="#delete_search_index-2">delete_search_index/2</a></td><td>Create a search index.</td></tr>
+<tr><td valign="top"><a href="#delete_search_index-3">delete_search_index/3</a></td><td>Create a search index.</td></tr>
<tr><td valign="top"><a href="#delete_vclock-4">delete_vclock/4</a></td><td>Delete the object at Bucket/Key, giving the vector clock.</td></tr>
<tr><td valign="top"><a href="#delete_vclock-5">delete_vclock/5</a></td><td>Delete the object at Bucket/Key, specifying timeout or options and giving the vector clock.</td></tr>
<tr><td valign="top"><a href="#delete_vclock-6">delete_vclock/6</a></td><td>Delete the key/value with options and timeout and giving the
vector clock.</td></tr>
+<tr><td valign="top"><a href="#fetch_type-3">fetch_type/3</a></td><td>Fetches the representation of a convergent datatype from Riak.</td></tr>
+<tr><td valign="top"><a href="#fetch_type-4">fetch_type/4</a></td><td>Fetches the representation of a convergent datatype from Riak,
+ using the given request options.</td></tr>
<tr><td valign="top"><a href="#get-3">get/3</a></td><td>Get bucket/key from the server.</td></tr>
<tr><td valign="top"><a href="#get-4">get/4</a></td><td>Get bucket/key from the server specifying timeout.</td></tr>
<tr><td valign="top"><a href="#get-5">get/5</a></td><td>Get bucket/key from the server supplying options and timeout.</td></tr>
<tr><td valign="top"><a href="#get_bucket-2">get_bucket/2</a></td><td>Get bucket properties.</td></tr>
<tr><td valign="top"><a href="#get_bucket-3">get_bucket/3</a></td><td>Get bucket properties specifying a server side timeout.</td></tr>
<tr><td valign="top"><a href="#get_bucket-4">get_bucket/4</a></td><td>Get bucket properties specifying a server side and local call timeout.</td></tr>
+<tr><td valign="top"><a href="#get_bucket_type-2">get_bucket_type/2</a></td><td></td></tr>
+<tr><td valign="top"><a href="#get_bucket_type-3">get_bucket_type/3</a></td><td></td></tr>
+<tr><td valign="top"><a href="#get_bucket_type-4">get_bucket_type/4</a></td><td></td></tr>
<tr><td valign="top"><a href="#get_client_id-1">get_client_id/1</a></td><td>Get the client id for this connection.</td></tr>
<tr><td valign="top"><a href="#get_client_id-2">get_client_id/2</a></td><td>Get the client id for this connection specifying timeout.</td></tr>
<tr><td valign="top"><a href="#get_index-4">get_index/4</a></td><td>(<em>Deprecated</em>.) Execute a secondary index equality query.</td></tr>
@@ -398,6 +278,10 @@ <h3 class="typedecl"><a name="type-write_quorum">write_quorum()</a></h3>
</dl></td></tr>
<tr><td valign="top"><a href="#get_index_range-5">get_index_range/5</a></td><td>Execute a secondary index range query.</td></tr>
<tr><td valign="top"><a href="#get_index_range-6">get_index_range/6</a></td><td>Execute a secondary index range query with specified options.</td></tr>
+<tr><td valign="top"><a href="#get_search_index-2">get_search_index/2</a></td><td></td></tr>
+<tr><td valign="top"><a href="#get_search_index-3">get_search_index/3</a></td><td></td></tr>
+<tr><td valign="top"><a href="#get_search_schema-2">get_search_schema/2</a></td><td></td></tr>
+<tr><td valign="top"><a href="#get_search_schema-3">get_search_schema/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#get_server_info-1">get_server_info/1</a></td><td>Get the server information for this connection.</td></tr>
<tr><td valign="top"><a href="#get_server_info-2">get_server_info/2</a></td><td>Get the server information for this connection specifying timeout.</td></tr>
<tr><td valign="top"><a href="#is_connected-1">is_connected/1</a></td><td>Determines whether the client is connected.</td></tr>
@@ -406,9 +290,12 @@ <h3 class="typedecl"><a name="type-write_quorum">write_quorum()</a></h3>
<tr><td valign="top"><a href="#legacy_list_buckets-2">legacy_list_buckets/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#list_buckets-1">list_buckets/1</a></td><td>List all buckets on the server.</td></tr>
<tr><td valign="top"><a href="#list_buckets-2">list_buckets/2</a></td><td>List all buckets on the server specifying server-side timeout.</td></tr>
+<tr><td valign="top"><a href="#list_buckets-3">list_buckets/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#list_keys-2">list_keys/2</a></td><td>List all keys in a bucket
<em>This is a potentially expensive operation and should not be used in production.</em></td></tr>
<tr><td valign="top"><a href="#list_keys-3">list_keys/3</a></td><td>List all keys in a bucket specifying timeout.</td></tr>
+<tr><td valign="top"><a href="#list_search_indexes-1">list_search_indexes/1</a></td><td></td></tr>
+<tr><td valign="top"><a href="#list_search_indexes-2">list_search_indexes/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#mapred-3">mapred/3</a></td><td>Perform a MapReduce job across the cluster.</td></tr>
<tr><td valign="top"><a href="#mapred-4">mapred/4</a></td><td>Perform a MapReduce job across the cluster with a job timeout.</td></tr>
<tr><td valign="top"><a href="#mapred-5">mapred/5</a></td><td>Perform a MapReduce job across the cluster with a job and
@@ -427,6 +314,8 @@ <h3 class="typedecl"><a name="type-write_quorum">write_quorum()</a></h3>
<tr><td valign="top"><a href="#mapred_stream-5">mapred_stream/5</a></td><td>Perform a streaming MapReduce job with a timeout across the cluster.</td></tr>
<tr><td valign="top"><a href="#mapred_stream-6">mapred_stream/6</a></td><td>Perform a streaming MapReduce job with a map/red timeout across the cluster,
a local call timeout and sending results to ClientPid.</td></tr>
+<tr><td valign="top"><a href="#modify_type-5">modify_type/5</a></td><td>Fetches, applies the given function to the value, and then
+ updates the datatype in Riak.</td></tr>
<tr><td valign="top"><a href="#ping-1">ping/1</a></td><td>Ping the server.</td></tr>
<tr><td valign="top"><a href="#ping-2">ping/2</a></td><td>Ping the server specifying timeout.</td></tr>
<tr><td valign="top"><a href="#put-2">put/2</a></td><td>Put the metadata/value in the object under bucket/key.</td></tr>
@@ -436,6 +325,9 @@ <h3 class="typedecl"><a name="type-write_quorum">write_quorum()</a></h3>
<tr><td valign="top"><a href="#reset_bucket-2">reset_bucket/2</a></td><td>Reset bucket properties back to the defaults.</td></tr>
<tr><td valign="top"><a href="#reset_bucket-3">reset_bucket/3</a></td><td>Reset bucket properties back to the defaults.</td></tr>
<tr><td valign="top"><a href="#reset_bucket-4">reset_bucket/4</a></td><td>Reset bucket properties back to the defaults.</td></tr>
+<tr><td valign="top"><a href="#reset_bucket_type-2">reset_bucket_type/2</a></td><td></td></tr>
+<tr><td valign="top"><a href="#reset_bucket_type-3">reset_bucket_type/3</a></td><td></td></tr>
+<tr><td valign="top"><a href="#reset_bucket_type-4">reset_bucket_type/4</a></td><td></td></tr>
<tr><td valign="top"><a href="#search-3">search/3</a></td><td>Execute a search query.</td></tr>
<tr><td valign="top"><a href="#search-4">search/4</a></td><td>Execute a search query.</td></tr>
<tr><td valign="top"><a href="#search-5">search/5</a></td><td>Execute a search query.</td></tr>
@@ -443,10 +335,14 @@ <h3 class="typedecl"><a name="type-write_quorum">write_quorum()</a></h3>
<tr><td valign="top"><a href="#set_bucket-3">set_bucket/3</a></td><td>Set bucket properties.</td></tr>
<tr><td valign="top"><a href="#set_bucket-4">set_bucket/4</a></td><td>Set bucket properties specifying a server side timeout.</td></tr>
<tr><td valign="top"><a href="#set_bucket-5">set_bucket/5</a></td><td>Set bucket properties specifying a server side and local call timeout.</td></tr>
+<tr><td valign="top"><a href="#set_bucket_type-3">set_bucket_type/3</a></td><td></td></tr>
+<tr><td valign="top"><a href="#set_bucket_type-4">set_bucket_type/4</a></td><td></td></tr>
+<tr><td valign="top"><a href="#set_bucket_type-5">set_bucket_type/5</a></td><td></td></tr>
<tr><td valign="top"><a href="#set_client_id-2">set_client_id/2</a></td><td>Set the client id for this connection.</td></tr>
<tr><td valign="top"><a href="#set_client_id-3">set_client_id/3</a></td><td>Set the client id for this connection specifying timeout.</td></tr>
<tr><td valign="top"><a href="#set_options-2">set_options/2</a></td><td>Change the options for this socket.</td></tr>
<tr><td valign="top"><a href="#set_options-3">set_options/3</a></td><td>Like set_options/2, but with a gen_server timeout.</td></tr>
+<tr><td valign="top"><a href="#set_search_index-3">set_search_index/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#start-2">start/2</a></td><td>Create a process to talk with the riak server on Address:Port.</td></tr>
<tr><td valign="top"><a href="#start-3">start/3</a></td><td>Create a process to talk with the riak server on Address:Port with Options.</td></tr>
<tr><td valign="top"><a href="#start_link-2">start_link/2</a></td><td>Create a linked process to talk with the riak server on Address:Port
@@ -455,11 +351,17 @@ <h3 class="typedecl"><a name="type-write_quorum">write_quorum()</a></h3>
<tr><td valign="top"><a href="#stop-1">stop/1</a></td><td>Disconnect the socket and stop the process.</td></tr>
<tr><td valign="top"><a href="#stream_list_buckets-1">stream_list_buckets/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#stream_list_buckets-2">stream_list_buckets/2</a></td><td></td></tr>
+<tr><td valign="top"><a href="#stream_list_buckets-3">stream_list_buckets/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#stream_list_keys-2">stream_list_keys/2</a></td><td>Stream list of keys in the bucket to the calling process.</td></tr>
<tr><td valign="top"><a href="#stream_list_keys-3">stream_list_keys/3</a></td><td>Stream list of keys in the bucket to the calling process specifying server side
timeout.</td></tr>
<tr><td valign="top"><a href="#tunnel-4">tunnel/4</a></td><td>Send a pre-encoded msg over the protocol buffer connection
Returns {ok, Response} or {error, Reason}.</td></tr>
+<tr><td valign="top"><a href="#update_type-4">update_type/4</a></td><td>Updates the convergent datatype in Riak with local
+ modifications stored in the container type.</td></tr>
+<tr><td valign="top"><a href="#update_type-5">update_type/5</a></td><td>Updates the convergent datatype in Riak with local
+ modifications stored in the container type, using the given request
+ options.</td></tr>
</table>
<h2><a name="functions">Function Details</a></h2>
@@ -488,6 +390,26 @@ <h3 class="function"><a name="counter_val-4">counter_val/4</a></h3>
</div><p>get the current value of the counter at <code>Bucket</code>, <code>Key</code> using
the <code>read_qurom()</code> <code>Options</code> provided.</p>
+<h3 class="function"><a name="create_search_index-2">create_search_index/2</a></h3>
+<div class="spec">
+<p><tt>create_search_index(Pid::pid(), Index::binary()) -&gt; ok | {error, term()}</tt><br></p>
+</div><p>Create a search index.</p>
+
+<h3 class="function"><a name="create_search_index-4">create_search_index/4</a></h3>
+<div class="spec">
+<p><tt>create_search_index(Pid::pid(), Index::binary(), SchemaName::binary(), Opts::<a href="#type-search_admin_opts">search_admin_opts()</a>) -&gt; ok | {error, term()}</tt><br></p>
+</div><p>Create a search index.</p>
+
+<h3 class="function"><a name="create_search_schema-3">create_search_schema/3</a></h3>
+<div class="spec">
+<p><tt>create_search_schema(Pid::pid(), SchemaName::binary(), Content::binary()) -&gt; ok | {error, term()}</tt><br></p>
+</div><p>Create a schema, which is a required component of an index.</p>
+
+<h3 class="function"><a name="create_search_schema-4">create_search_schema/4</a></h3>
+<div class="spec">
+<p><tt>create_search_schema(Pid::pid(), SchemaName::binary(), Content::binary(), Opts::<a href="#type-search_admin_opts">search_admin_opts()</a>) -&gt; ok | {error, term()}</tt><br></p>
+</div><p>Create a schema, which is a required component of an index.</p>
+
<h3 class="function"><a name="cs_bucket_fold-3">cs_bucket_fold/3</a></h3>
<div class="spec">
<p><tt>cs_bucket_fold(Pid::pid(), Bucket::<a href="#type-bucket">bucket()</a>, Opts::<a href="#type-cs_opts">cs_opts()</a>) -&gt; {ok, reference()} | {error, term()}</tt><br></p>
@@ -541,6 +463,16 @@ <h3 class="function"><a name="delete_obj-4">delete_obj/4</a></h3>
<p>Delete the riak object with options and timeout.</p>
<p><b>See also:</b> <a href="#delete_vclock-6">delete_vclock/6</a>.</p>
+<h3 class="function"><a name="delete_search_index-2">delete_search_index/2</a></h3>
+<div class="spec">
+<p><tt>delete_search_index(Pid::pid(), Index::binary()) -&gt; ok | {error, term()}</tt><br></p>
+</div><p>Create a search index.</p>
+
+<h3 class="function"><a name="delete_search_index-3">delete_search_index/3</a></h3>
+<div class="spec">
+<p><tt>delete_search_index(Pid::pid(), Index::binary(), Opts::<a href="#type-search_admin_opts">search_admin_opts()</a>) -&gt; ok | {error, term()}</tt><br></p>
+</div><p>Create a search index.</p>
+
<h3 class="function"><a name="delete_vclock-4">delete_vclock/4</a></h3>
<div class="spec">
<p><tt>delete_vclock(Pid::pid(), Bucket::<a href="#type-bucket">bucket()</a>, Key::<a href="#type-key">key()</a>, VClock::<a href="riakc_obj.html#type-vclock">riakc_obj:vclock()</a>) -&gt; ok | {error, term()}</tt><br></p>
@@ -562,6 +494,17 @@ <h3 class="function"><a name="delete_vclock-6">delete_vclock/6</a></h3>
put requests will be correctly ordered with the delete.</p>
<p><b>See also:</b> <a href="#delete_obj-4">delete_obj/4</a>.</p>
+<h3 class="function"><a name="fetch_type-3">fetch_type/3</a></h3>
+<div class="spec">
+<p><tt>fetch_type(Pid::pid(), BucketAndType::{BucketType::binary(), Bucket::binary()}, Key::binary()) -&gt; {ok, <a href="riakc_datatype.html#type-datatype">riakc_datatype:datatype()</a>} | {error, term()}</tt><br></p>
+</div><p>Fetches the representation of a convergent datatype from Riak.</p>
+
+<h3 class="function"><a name="fetch_type-4">fetch_type/4</a></h3>
+<div class="spec">
+<p><tt>fetch_type(Pid::pid(), BucketAndType::{BucketType::binary(), Bucket::binary()}, Key::binary(), Options::[<a href="proplists.html#type-property">proplists:property()</a>]) -&gt; {ok, <a href="riakc_datatype.html#type-datatype">riakc_datatype:datatype()</a>} | {error, term()}</tt><br></p>
+</div><p>Fetches the representation of a convergent datatype from Riak,
+ using the given request options.</p>
+
<h3 class="function"><a name="get-3">get/3</a></h3>
<div class="spec">
<p><tt>get(Pid::pid(), Bucket::<a href="#type-bucket">bucket()</a>, Key::<a href="#type-key">key()</a>) -&gt; {ok, <a href="#type-riakc_obj">riakc_obj()</a>} | {error, term()}</tt><br></p>
@@ -603,6 +546,21 @@ <h3 class="function"><a name="get_bucket-4">get_bucket/4</a></h3>
<p><tt>get_bucket(Pid::pid(), Bucket::<a href="#type-bucket">bucket()</a>, Timeout::timeout(), CallTimeout::timeout()) -&gt; {ok, <a href="#type-bucket_props">bucket_props()</a>} | {error, term()}</tt><br></p>
</div><p>Get bucket properties specifying a server side and local call timeout.</p>
+<h3 class="function"><a name="get_bucket_type-2">get_bucket_type/2</a></h3>
+<div class="spec">
+<p><tt>get_bucket_type(Pid, BucketType) -&gt; any()</tt></p>
+</div>
+
+<h3 class="function"><a name="get_bucket_type-3">get_bucket_type/3</a></h3>
+<div class="spec">
+<p><tt>get_bucket_type(Pid, BucketType, Timeout) -&gt; any()</tt></p>
+</div>
+
+<h3 class="function"><a name="get_bucket_type-4">get_bucket_type/4</a></h3>
+<div class="spec">
+<p><tt>get_bucket_type(Pid, BucketType, Timeout, CallTimeout) -&gt; any()</tt></p>
+</div>
+
<h3 class="function"><a name="get_client_id-1">get_client_id/1</a></h3>
<div class="spec">
<p><tt>get_client_id(Pid::pid()) -&gt; {ok, <a href="#type-client_id">client_id()</a>} | {error, term()}</tt><br></p>
@@ -685,6 +643,26 @@ <h3 class="function"><a name="get_index_range-6">get_index_range/6</a></h3>
<code>{results, [{value, primary_key}]}</code></p>
<p><b>See also:</b> <a href="#get_index_eq-5">for effect of options.</a>.</p>
+<h3 class="function"><a name="get_search_index-2">get_search_index/2</a></h3>
+<div class="spec">
+<p><tt>get_search_index(Pid::pid(), Index::binary()) -&gt; {ok, <a href="#type-search_index">search_index()</a>} | {error, term()}</tt><br></p>
+</div>
+
+<h3 class="function"><a name="get_search_index-3">get_search_index/3</a></h3>
+<div class="spec">
+<p><tt>get_search_index(Pid::pid(), Index::binary(), Opts::<a href="#type-search_admin_opts">search_admin_opts()</a>) -&gt; {ok, <a href="#type-search_index">search_index()</a>} | {error, term()}</tt><br></p>
+</div>
+
+<h3 class="function"><a name="get_search_schema-2">get_search_schema/2</a></h3>
+<div class="spec">
+<p><tt>get_search_schema(Pid::pid(), SchemaName::binary()) -&gt; {ok, <a href="#type-search_schema">search_schema()</a>} | {error, term()}</tt><br></p>
+</div>
+
+<h3 class="function"><a name="get_search_schema-3">get_search_schema/3</a></h3>
+<div class="spec">
+<p><tt>get_search_schema(Pid::pid(), SchemaName::binary(), Opts::<a href="#type-search_admin_opts">search_admin_opts()</a>) -&gt; {ok, <a href="#type-search_schema">search_schema()</a>} | {error, term()}</tt><br></p>
+</div>
+
<h3 class="function"><a name="get_server_info-1">get_server_info/1</a></h3>
<div class="spec">
<p><tt>get_server_info(Pid::pid()) -&gt; {ok, <a href="#type-server_info">server_info()</a>} | {error, term()}</tt><br></p>
@@ -727,10 +705,15 @@ <h3 class="function"><a name="list_buckets-1">list_buckets/1</a></h3>
<h3 class="function"><a name="list_buckets-2">list_buckets/2</a></h3>
<div class="spec">
-<p><tt>list_buckets(Pid::pid(), Timeout::timeout() | list()) -&gt; {ok, [<a href="#type-bucket">bucket()</a>]} | {error, term()}</tt><br></p>
+<p><tt>list_buckets(Pid::pid(), Type::timeout() | list() | binary()) -&gt; {ok, [<a href="#type-bucket">bucket()</a>]} | {error, term()}</tt><br></p>
</div><p>List all buckets on the server specifying server-side timeout.
<em>This is a potentially expensive operation and should not be used in production.</em></p>
+<h3 class="function"><a name="list_buckets-3">list_buckets/3</a></h3>
+<div class="spec">
+<p><tt>list_buckets(Pid, Type, Options) -&gt; any()</tt></p>
+</div>
+
<h3 class="function"><a name="list_keys-2">list_keys/2</a></h3>
<div class="spec">
<p><tt>list_keys(Pid::pid(), Bucket::<a href="#type-bucket">bucket()</a>) -&gt; {ok, [<a href="#type-key">key()</a>]} | {error, term()}</tt><br></p>
@@ -747,6 +730,16 @@ <h3 class="function"><a name="list_keys-3">list_keys/3</a></h3>
the results to complete streaming.
<em>This is a potentially expensive operation and should not be used in production.</em></p>
+<h3 class="function"><a name="list_search_indexes-1">list_search_indexes/1</a></h3>
+<div class="spec">
+<p><tt>list_search_indexes(Pid::pid()) -&gt; {ok, [<a href="#type-search_index">search_index()</a>]} | {error, term()}</tt><br></p>
+</div>
+
+<h3 class="function"><a name="list_search_indexes-2">list_search_indexes/2</a></h3>
+<div class="spec">
+<p><tt>list_search_indexes(Pid::pid(), Opts::<a href="#type-search_admin_opts">search_admin_opts()</a>) -&gt; {ok, [<a href="#type-search_index">search_index()</a>]} | {error, term()}</tt><br></p>
+</div>
+
<h3 class="function"><a name="mapred-3">mapred/3</a></h3>
<div class="spec">
<p><tt>mapred(Pid::pid(), Inputs::<a href="#type-mapred_inputs">mapred_inputs()</a>, Query::[<a href="#type-mapred_queryterm">mapred_queryterm()</a>]) -&gt; {ok, <a href="#type-mapred_result">mapred_result()</a>} | {error, {badqterm, <a href="#type-mapred_queryterm">mapred_queryterm()</a>}} | {error, timeout} | {error, term()}</tt><br></p>
@@ -857,6 +850,13 @@ <h3 class="function"><a name="mapred_stream-6">mapred_stream/6</a></h3>
<pre> {ReqId::req_id(), {mapred, Phase::non_neg_integer(), mapred_result()}}
{ReqId::req_id(), done}</pre></p>
+<h3 class="function"><a name="modify_type-5">modify_type/5</a></h3>
+<div class="spec">
+<p><tt>modify_type(Pid::pid(), Fun::fun((<a href="riakc_datatype.html#type-datatype">riakc_datatype:datatype()</a>) -&gt; <a href="riakc_datatype.html#type-datatype">riakc_datatype:datatype()</a>), BucketAndType::{BucketType::binary(), Bucket::binary()}, Key::binary(), Options::[<a href="proplists.html#type-property">proplists:property()</a>]) -&gt; ok | {ok, <a href="riakc_datatype.html#type-datatype">riakc_datatype:datatype()</a>} | {error, term()}</tt><br></p>
+</div><p>Fetches, applies the given function to the value, and then
+ updates the datatype in Riak. If an existing value is not found,
+ but you want the updates to apply anyway, use the 'create' option.</p>
+
<h3 class="function"><a name="ping-1">ping/1</a></h3>
<div class="spec">
<p><tt>ping(Pid::pid()) -&gt; pong</tt><br></p>
@@ -914,6 +914,21 @@ <h3 class="function"><a name="reset_bucket-4">reset_bucket/4</a></h3>
<p><tt>reset_bucket(Pid::pid(), Bucket::bucket, Timeout::timeout(), CallTimeout::timeout()) -&gt; ok | {error, term()}</tt><br></p>
</div><p>Reset bucket properties back to the defaults.</p>
+<h3 class="function"><a name="reset_bucket_type-2">reset_bucket_type/2</a></h3>
+<div class="spec">
+<p><tt>reset_bucket_type(Pid, BucketType) -&gt; any()</tt></p>
+</div>
+
+<h3 class="function"><a name="reset_bucket_type-3">reset_bucket_type/3</a></h3>
+<div class="spec">
+<p><tt>reset_bucket_type(Pid, BucketType, Timeout) -&gt; any()</tt></p>
+</div>
+
+<h3 class="function"><a name="reset_bucket_type-4">reset_bucket_type/4</a></h3>
+<div class="spec">
+<p><tt>reset_bucket_type(Pid, BucketType, Timeout, CallTimeout) -&gt; any()</tt></p>
+</div>
+
<h3 class="function"><a name="search-3">search/3</a></h3>
<div class="spec">
<p><tt>search(Pid::pid(), Index::binary(), SearchQuery::binary()) -&gt; {ok, <a href="#type-search_result">search_result()</a>} | {error, term()}</tt><br></p>
@@ -957,6 +972,21 @@ <h3 class="function"><a name="set_bucket-5">set_bucket/5</a></h3>
<p><tt>set_bucket(Pid::pid(), Bucket::<a href="#type-bucket">bucket()</a>, BucketProps::<a href="#type-bucket_props">bucket_props()</a>, Timeout::timeout(), CallTimeout::timeout()) -&gt; ok | {error, term()}</tt><br></p>
</div><p>Set bucket properties specifying a server side and local call timeout.</p>
+<h3 class="function"><a name="set_bucket_type-3">set_bucket_type/3</a></h3>
+<div class="spec">
+<p><tt>set_bucket_type(Pid, BucketType, BucketProps) -&gt; any()</tt></p>
+</div>
+
+<h3 class="function"><a name="set_bucket_type-4">set_bucket_type/4</a></h3>
+<div class="spec">
+<p><tt>set_bucket_type(Pid, BucketType, BucketProps, Timeout) -&gt; any()</tt></p>
+</div>
+
+<h3 class="function"><a name="set_bucket_type-5">set_bucket_type/5</a></h3>
+<div class="spec">
+<p><tt>set_bucket_type(Pid, BucketType, BucketProps, Timeout, CallTimeout) -&gt; any()</tt></p>
+</div>
+
<h3 class="function"><a name="set_client_id-2">set_client_id/2</a></h3>
<div class="spec">
<p><tt>set_client_id(Pid::pid(), ClientId::<a href="#type-client_id">client_id()</a>) -&gt; {ok, <a href="#type-client_id">client_id()</a>} | {error, term()}</tt><br></p>
@@ -984,6 +1014,11 @@ <h3 class="function"><a name="set_options-3">set_options/3</a></h3>
</div><p>Like set_options/2, but with a gen_server timeout.</p>
<p><b>See also:</b> <a href="#start_link-3">start_link/3</a>.</p>
+<h3 class="function"><a name="set_search_index-3">set_search_index/3</a></h3>
+<div class="spec">
+<p><tt>set_search_index(Pid::pid(), Bucket::<a href="#type-bucket">bucket()</a>, Index::binary()) -&gt; ok | {error, term()}</tt><br></p>
+</div>
+
<h3 class="function"><a name="start-2">start/2</a></h3>
<div class="spec">
<p><tt>start(Address::<a href="#type-address">address()</a>, Port::<a href="#type-portnum">portnum()</a>) -&gt; {ok, pid()} | {error, term()}</tt><br></p>
@@ -1019,7 +1054,12 @@ <h3 class="function"><a name="stream_list_buckets-1">stream_list_buckets/1</a></
<h3 class="function"><a name="stream_list_buckets-2">stream_list_buckets/2</a></h3>
<div class="spec">
-<p><tt>stream_list_buckets(Pid, Timeout) -&gt; any()</tt></p>
+<p><tt>stream_list_buckets(Pid, Type) -&gt; any()</tt></p>
+</div>
+
+<h3 class="function"><a name="stream_list_buckets-3">stream_list_buckets/3</a></h3>
+<div class="spec">
+<p><tt>stream_list_buckets(Pid, Type, Options) -&gt; any()</tt></p>
</div>
<h3 class="function"><a name="stream_list_keys-2">stream_list_keys/2</a></h3>
@@ -1047,12 +1087,25 @@ <h3 class="function"><a name="stream_list_keys-3">stream_list_keys/3</a></h3>
<h3 class="function"><a name="tunnel-4">tunnel/4</a></h3>
<div class="spec">
-<p><tt>tunnel(Pid::pid(), MsgId::<a href="#type-msg_id">msg_id()</a>, Pkt::binary(), Timeout::timeout()) -&gt; {ok, binary()} | {error, term()}</tt><br></p>
+<p><tt>tunnel(Pid::pid(), MsgId::<a href="#type-msg_id">msg_id()</a>, Pkt::iolist(), Timeout::timeout()) -&gt; {ok, binary()} | {error, term()}</tt><br></p>
</div><p>Send a pre-encoded msg over the protocol buffer connection
Returns {ok, Response} or {error, Reason}</p>
+
+<h3 class="function"><a name="update_type-4">update_type/4</a></h3>
+<div class="spec">
+<p><tt>update_type(Pid::pid(), BucketAndType::{BucketType::binary(), Bucket::binary()}, Key::binary(), Update::<a href="riakc_datatype.html#type-update">riakc_datatype:update</a>(term())) -&gt; ok | {ok, Key::binary()} | {ok, <a href="riakc_datatype.html#type-datatype">riakc_datatype:datatype()</a>} | {ok, Key::binary(), <a href="riakc_datatype.html#type-datatype">riakc_datatype:datatype()</a>} | {error, term()}</tt><br></p>
+</div><p>Updates the convergent datatype in Riak with local
+ modifications stored in the container type.</p>
+
+<h3 class="function"><a name="update_type-5">update_type/5</a></h3>
+<div class="spec">
+<p><tt>update_type(Pid::pid(), BucketAndType::{BucketType::binary(), Bucket::binary()}, Key::binary(), Update::<a href="riakc_datatype.html#type-update">riakc_datatype:update</a>(term()), Options::[<a href="proplists.html#type-property">proplists:property()</a>]) -&gt; ok | {ok, Key::binary()} | {ok, <a href="riakc_datatype.html#type-datatype">riakc_datatype:datatype()</a>} | {ok, Key::binary(), <a href="riakc_datatype.html#type-datatype">riakc_datatype:datatype()</a>} | {error, term()}</tt><br></p>
+</div><p>Updates the convergent datatype in Riak with local
+ modifications stored in the container type, using the given request
+ options.</p>
<hr>
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
-<p><i>Generated by EDoc, Aug 19 2013, 15:57:37.</i></p>
+<p><i>Generated by EDoc, Dec 6 2013, 10:31:07.</i></p>
</body>
</html>
View
95 riakc_register.html
@@ -0,0 +1,95 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Module riakc_register</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<hr>
+
+<h1>Module riakc_register</h1>
+<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Encapsulates a register data-type that stores an opaque binary
+ value with last-write-wins semantics.
+
+<p><b>Behaviours:</b> <a href="riakc_datatype.html"><tt>riakc_datatype</tt></a>.</p>
+
+<h2><a name="description">Description</a></h2>Encapsulates a register data-type that stores an opaque binary
+ value with last-write-wins semantics. Like the other
+ eventually-consistent types, the original fetched value is
+ unmodified by setting the register. Instead, the new value is
+ captured for later application in Riak. Use <code>dirty_value/1</code> to
+ access the local "view" of the updated value.
+<h2><a name="types">Data Types</a></h2>
+
+<h3 class="typedecl"><a name="type-register">register()</a></h3>
+<p><b>abstract datatype</b>: <tt>register()</tt></p>
+
+
+<h3 class="typedecl"><a name="type-register_op">register_op()</a></h3>
+<p><tt>register_op() = {assign, binary()}</tt></p>
+
+
+<h2><a name="index">Function Index</a></h2>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#dirty_value-1">dirty_value/1</a></td><td>Extracts the value of the register with locally-queued
+ operations applied.</td></tr>
+<tr><td valign="top"><a href="#is_type-1">is_type/1</a></td><td>Determines whether the passed term is a register container.</td></tr>
+<tr><td valign="top"><a href="#new-0">new/0</a></td><td>Creates a new, empty register container type.</td></tr>
+<tr><td valign="top"><a href="#new-2">new/2</a></td><td>Creates a new register with the specified value and context.</td></tr>
+<tr><td valign="top"><a href="#set-2">set/2</a></td><td>Sets the value of the register.</td></tr>
+<tr><td valign="top"><a href="#to_op-1">to_op/1</a></td><td>Extracts an operation from the register that can be encoded
+ into an update request.</td></tr>
+<tr><td valign="top"><a href="#type-0">type/0</a></td><td>Returns the symbolic name of this container.</td></tr>
+<tr><td valign="top"><a href="#value-1">value/1</a></td><td>Extracts the value of the register.</td></tr>
+</table>
+
+<h2><a name="functions">Function Details</a></h2>
+
+<h3 class="function"><a name="dirty_value-1">dirty_value/1</a></h3>
+<div class="spec">
+<p><tt>dirty_value(Register::<a href="#type-register">register()</a>) -&gt; binary()</tt><br></p>
+</div><p>Extracts the value of the register with locally-queued
+ operations applied.</p>
+
+<h3 class="function"><a name="is_type-1">is_type/1</a></h3>
+<div class="spec">
+<p><tt>is_type(T::term()) -&gt; boolean()</tt><br></p>
+</div><p>Determines whether the passed term is a register container.</p>
+
+<h3 class="function"><a name="new-0">new/0</a></h3>
+<div class="spec">
+<p><tt>new() -&gt; <a href="#type-register">register()</a></tt><br></p>
+</div><p>Creates a new, empty register container type.</p>
+
+<h3 class="function"><a name="new-2">new/2</a></h3>
+<div class="spec">
+<p><tt>new(Value::binary(), Context::<a href="riakc_datatype.html#type-context">riakc_datatype:context()</a>) -&gt; <a href="#type-register">register()</a></tt><br></p>
+</div><p>Creates a new register with the specified value and context.</p>
+
+<h3 class="function"><a name="set-2">set/2</a></h3>
+<div class="spec">
+<p><tt>set(Value::<a href="#type-register">register()</a>, Register::binary()) -&gt; <a href="#type-register">register()</a></tt><br></p>
+</div><p>Sets the value of the register.</p>
+
+<h3 class="function"><a name="to_op-1">to_op/1</a></h3>
+<div class="spec">
+<p><tt>to_op(Register::<a href="#type-register">register()</a>) -&gt; <a href="riakc_datatype.html#type-update">riakc_datatype:update</a>(<a href="#type-register_op">register_op()</a>)</tt><br></p>
+</div><p>Extracts an operation from the register that can be encoded
+ into an update request.</p>
+
+<h3 class="function"><a name="type-0">type/0</a></h3>
+<div class="spec">
+<p><tt>type() -&gt; atom()</tt><br></p>
+</div><p>Returns the symbolic name of this container.</p>
+
+<h3 class="function"><a name="value-1">value/1</a></h3>
+<div class="spec">
+<p><tt>value(Register::<a href="#type-register">register()</a>) -&gt; binary() | undefined</tt><br></p>
+</div><p>Extracts the value of the register.</p>
+<hr>
+
+<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<p><i>Generated by EDoc, Dec 6 2013, 10:31:07.</i></p>
+</body>
+</html>
View
150 riakc_set.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Module riakc_set</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<hr>
+
+<h1>Module riakc_set</h1>
+<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Encapsulates a set data-type.
+
+<p><b>Behaviours:</b> <a href="riakc_datatype.html"><tt>riakc_datatype</tt></a>.</p>
+
+<h2><a name="description">Description</a></h2><p>Encapsulates a set data-type. Riak's sets differ from Erlang
+ set types in several ways:</p>
+ <ul>
+ <li>Only binaries are allowed as elements. Convert other terms to a
+ binary before adding them.</li>
+ <li>Like the other eventually-consistent types, updates
+ (<code>add_element/2</code> and <code>del_element/2</code>) are not applied to local
+ state. Instead, additions and removals are captured for later
+ application by Riak. Use <code>dirty_value/1</code> to access a local "view"
+ of the updates.</li>
+ <li>Additions and removals are non-exclusive. You can add and
+ remove the same element in the same session, both operations will
+ be performed in Riak (removal first). Removals performed without a
+ context may result in failure.</li>
+ <li>You may add an element that already exists in the original set
+ value, and remove an element that does not appear in the original
+ set value. This is non-intuitive, but acts as a safety feature: a
+ client code path that requires an element to be present in the set
+ (or removed) can ensure that intended state by applying an
+ operation.</li>
+ <li>The query functions <code>size/1</code>, <code>is_element/1</code> and <code>fold/3</code> only
+ operate on the original value of the set, disregarding local
+ updates. To query the modified state, use <code>dirty_value/1</code> with the
+ <code>ordsets</code> module.</li>
+ </ul>
+<h2><a name="types">Data Types</a></h2>
+
+<h3 class="typedecl"><a name="type-riakc_set">riakc_set()</a></h3>
+<p><b>abstract datatype</b>: <tt>riakc_set()</tt></p>
+
+
+<h3 class="typedecl"><a name="type-set_op">set_op()</a></h3>
+<p><tt>set_op() = <a href="#type-simple_set_op">simple_set_op()</a> | {update, [<a href="#type-simple_set_op">simple_set_op()</a>]}</tt></p>
+
+
+<h3 class="typedecl"><a name="type-simple_set_op">simple_set_op()</a></h3>
+<p><tt>simple_set_op() = {add_all, [binary()]} | {remove_all, [binary()]}</tt></p>
+
+
+<h2><a name="index">Function Index</a></h2>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#add_element-2">add_element/2</a></td><td>Adds an element to the set.</td></tr>
+<tr><td valign="top"><a href="#del_element-2">del_element/2</a></td><td>Removes an element from the set.</td></tr>
+<tr><td valign="top"><a href="#dirty_value-1">dirty_value/1</a></td><td>Returns the value of the set after locally updates are
+ applied.</td></tr>
+<tr><td valign="top"><a href="#fold-3">fold/3</a></td><td>Folds over the members of the set.</td></tr>
+<tr><td valign="top"><a href="#is_element-2">is_element/2</a></td><td>Test whether an element is a member of the set.</td></tr>
+<tr><td valign="top"><a href="#is_type-1">is_type/1</a></td><td>Determines whether the passed term is a set container.</td></tr>
+<tr><td valign="top"><a href="#new-0">new/0</a></td><td>Creates a new, empty set container type.</td></tr>
+<tr><td valign="top"><a href="#new-2">new/2</a></td><td>Creates a new set container with the given members and opaque
+ context.</td></tr>
+<tr><td valign="top"><a href="#size-1">size/1</a></td><td>Returns the cardinality (size) of the set.</td></tr>
+<tr><td valign="top"><a href="#to_op-1">to_op/1</a></td><td>Extracts an operation from the set that can be encoded into an
+ update request.</td></tr>
+<tr><td valign="top"><a href="#type-0">type/0</a></td><td>Returns the symbolic name of this container.</td></tr>
+<tr><td valign="top"><a href="#value-1">value/1</a></td><td>Returns the original value of the set as an ordset.</td></tr>
+</table>
+
+<h2><a name="functions">Function Details</a></h2>
+
+<h3 class="function"><a name="add_element-2">add_element/2</a></h3>
+<div class="spec">
+<p><tt>add_element(Bin::binary(), Set::<a href="#type-riakc_set">riakc_set()</a>) -&gt; <a href="#type-riakc_set">riakc_set()</a></tt><br></p>
+</div><p>Adds an element to the set.</p>
+
+<h3 class="function"><a name="del_element-2">del_element/2</a></h3>
+<div class="spec">
+<p><tt>del_element(Bin::binary(), Set::<a href="#type-riakc_set">riakc_set()</a>) -&gt; <a href="#type-riakc_set">riakc_set()</a></tt><br></p>
+</div><p>Removes an element from the set.</p>
+
+<h3 class="function"><a name="dirty_value-1">dirty_value/1</a></h3>
+<div class="spec">
+<p><tt>dirty_value(Set::<a href="#type-riakc_set">riakc_set()</a>) -&gt; <a href="ordsets.html#type-ordset">ordsets:ordset</a>(binary())</tt><br></p>
+</div><p>Returns the value of the set after locally updates are
+ applied.</p>
+
+<h3 class="function"><a name="fold-3">fold/3</a></h3>
+<div class="spec">
+<p><tt>fold(Fun::fun((binary(), term()) -&gt; term()), Acc0::term(), Set::<a href="#type-riakc_set">riakc_set()</a>) -&gt; term()</tt><br></p>
+</div><p>Folds over the members of the set. <em>Note: this only
+ operates on the original value, use the result of dirty_value/1 if
+ you want to account for locally-queued operations.</em></p>
+
+<h3 class="function"><a name="is_element-2">is_element/2</a></h3>
+<div class="spec">
+<p><tt>is_element(Bin::binary(), Set::<a href="#type-riakc_set">riakc_set()</a>) -&gt; boolean()</tt><br></p>
+</div><p>Test whether an element is a member of the set. <em>Note: this
+ only operates on the original value, use the result of
+ dirty_value/1 if you want to account for locally-queued
+ operations.</em></p>
+
+<h3 class="function"><a name="is_type-1">is_type/1</a></h3>
+<div class="spec">
+<p><tt>is_type(T::term()) -&gt; boolean()</tt><br></p>
+</div><p>Determines whether the passed term is a set container.</p>
+
+<h3 class="function"><a name="new-0">new/0</a></h3>
+<div class="spec">
+<p><tt>new() -&gt; <a href="#type-riakc_set">riakc_set()</a></tt><br></p>
+</div><p>Creates a new, empty set container type.</p>
+
+<h3 class="function"><a name="new-2">new/2</a></h3>
+<div class="spec">
+<p><tt>new(Value::[binary()], Context::<a href="riakc_datatype.html#type-context">riakc_datatype:context()</a>) -&gt; <a href="#type-riakc_set">riakc_set()</a></tt><br></p>
+</div><p>Creates a new set container with the given members and opaque
+ context.</p>
+
+<h3 class="function"><a name="size-1">size/1</a></h3>
+<div class="spec">
+<p><tt>size(Set::<a href="#type-riakc_set">riakc_set()</a>) -&gt; pos_integer()</tt><br></p&