Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 16f7aa1794
Fetching contributors…

Cannot retrieve contributors at this time

1615 lines (535 sloc) 22.127 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: ColumnFamily</title>
<script src="http://shjs.sourceforge.net/sh_main.min.js"> </script>
<script src="http://shjs.sourceforge.net/lang/sh_javascript.min.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/node-dark.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: ColumnFamily</h1>
<section>
<header>
<h2>
ColumnFamily
</h2>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="ColumnFamily"><span class="type-signature"></span>new ColumnFamily</h4>
</dt>
<dd>
<p class="description">
Representation of a Column Family
</p>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>definition</code></td>
<td class="type">
Object
</td>
<td class="description last">The Column Family definition</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>column_family.js, line 168</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
<h4 class="name" id="DEFAULT_READ_CONSISTENCY"><span class="type-signature">&lt;private, static, constant> </span>DEFAULT_READ_CONSISTENCY<span class="type-signature"></span></h4>
</dt>
<dd>
<p class="description">
Default read consistency level
</p>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>column_family.js, line 20</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="DEFAULT_WRITE_CONSISTENCY"><span class="type-signature">&lt;private, static, constant> </span>DEFAULT_WRITE_CONSISTENCY<span class="type-signature"></span></h4>
</dt>
<dd>
<p class="description">
Default write consistency level
</p>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>column_family.js, line 28</li></ul></dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="get"><span class="type-signature"></span>get</h4>
</dt>
<dd>
<p class="description">
Get a row by its key
</p>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
String
</td>
<td class="description last">The key to get</td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
Object
</td>
<td class="description last">Options for the get, can have start, end, max, consistencyLevel
<ul>
<li>start: the from part of the column name</li>
<li>end: the to part of the column name</li>
<li>max: the max amount of columns to return</li>
<li>columns: an {Array} of column names to get</li>
<li>consistencyLevel: the read consistency level</li>
</ul></td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
Function
</td>
<td class="description last">The callback to invoke once the response has been received</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>column_family.js, line 271</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getIndexed"><span class="type-signature"></span>getIndexed</h4>
</dt>
<dd>
<p class="description">
Gets rows by their indexed fields
</p>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>query</code></td>
<td class="type">
Object
</td>
<td class="description last">Options for the rows part of the get
<ul>
<li>fields: an array of objects thjat contain { column:column_name, operator: 'EQ', value:value }
<ul>
<li>column: {String} The name of the column with the index</li>
<li>operator: {String} The operator to use, can be EQ, GTE, GT, LTE, ot LT</li>
<li>value: {String} The value to query by</li>
</ul>
</li>
<li>start: the start key to get</li>
<li>max: the total amount of rows to return</li>
</ul></td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
Object
</td>
<td class="description last">Options for the get, can have start, end, max, consistencyLevel
<ul>
<li>start: the from part of the column name</li>
<li>end: the to part of the column name</li>
<li>max: the max amount of columns to return</li>
<li>columns: an {Array} of column names to get</li>
<li>consistencyLevel: the read consistency level</li>
</ul></td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
Function
</td>
<td class="description last">The callback to invoke once the response has been received</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>column_family.js, line 332</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="insert"><span class="type-signature"></span>insert</h4>
</dt>
<dd>
<p class="description">
Performs a set command to the cluster
</p>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
String
</td>
<td class="description last">The key for the row</td>
</tr>
<tr>
<td class="name"><code>columns</code></td>
<td class="type">
Object
</td>
<td class="description last">The value for the columns as represented by JSON or an array of Column objects</td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
Object
</td>
<td class="description last">The options for the insert</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
Function
</td>
<td class="description last">The callback to call once complete</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>column_family.js, line 200</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="remove"><span class="type-signature"></span>remove</h4>
</dt>
<dd>
<p class="description">
Remove a single row or column
This function uses a variable-length paramter list. Which parameters
are passed depends on which column path should be used for the
removal and whether this column family is a super column or not.
</p>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
String
</td>
<td class="description last">The key for this row (required)</td>
</tr>
<tr>
<td class="name"><code>column</code></td>
<td class="type">
Object
</td>
<td class="description last">The column name (optional)</td>
</tr>
<tr>
<td class="name"><code>subcolumn</code></td>
<td class="type">
Object
</td>
<td class="description last">The subcolumn name (optional)</td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
Object
</td>
<td class="description last">The thrift options for this operation (optional)</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
Function
</td>
<td class="description last">The callback to call once complete (optional)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>column_family.js, line 244</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="truncate"><span class="type-signature"></span>truncate</h4>
</dt>
<dd>
<p class="description">
Truncates a ColumnFamily
</p>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
Function
</td>
<td class="description last">The callback to invoke once the ColumnFamily has been truncated</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>column_family.js, line 304</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="columnParent"><span class="type-signature">&lt;private, static> </span>columnParent</h4>
</dt>
<dd>
<p class="description">
Returns a column parent
When calculating the column parent of a standard column family,
the parent is simply the column family name. When dealing with
super columns on the other hand, an optional name parameter may
be provided.
</p>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cf</code></td>
<td class="type">
Object
</td>
<td class="description last">A reference to the ColumnFamily</td>
</tr>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
Object
</td>
<td class="description last">The name of the column (optional)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>column_family.js, line 43</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
a Thrift ColumnParent object
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getColumns"><span class="type-signature">&lt;private, static> </span>getColumns</h4>
</dt>
<dd>
<p class="description">
Gets an array of columns from an object
</p>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>columns</code></td>
<td class="type">
Object
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>column_family.js, line 119</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
and array of columns
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getSlicePredicate"><span class="type-signature">&lt;private, static> </span>getSlicePredicate</h4>
</dt>
<dd>
<p class="description">
Gets a slcie predicate based on some options
</p>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>column_family.js, line 141</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">SlicePredicate</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="NOOP"><span class="type-signature">&lt;private, static> </span>NOOP</h4>
</dt>
<dd>
<p class="description">
NO-Operation for deault callbacks
</p>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>column_family.js, line 12</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="normalizeParameters"><span class="type-signature">&lt;private, static> </span>normalizeParameters</h4>
</dt>
<dd>
<p class="description">
A convenience method to normalize the standard parameters used by
a thrift operation. The parameter list must contain a `key` parameter
as it's first item. The `column`, `subcolumn`, `options`, and
`callback` parameters are optional.
</p>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>list</code></td>
<td class="type">
Array
</td>
<td class="description last">The list of parameters</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>column_family.js, line 92</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
a normalized version of the provided parameter values
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h3>Classes</h3><ul><li><a href="Column.html">Column</a></li><li><a href="ColumnFamily.html">ColumnFamily</a></li><li><a href="Connection.html">Connection</a></li><li><a href="Deserializers.html">Deserializers</a></li><li><a href="Helenus.html">Helenus</a></li><li><a href="Keyspace.html">Keyspace</a></li><li><a href="Marshal.html">Marshal</a></li><li><a href="Pool.html">Pool</a></li><li><a href="Row.html">Row</a></li><li><a href="Serializers.html">Serializers</a></li><li><a href="TimeUUID.html">TimeUUID</a></li><li><a href="UUID.html">UUID</a></li></ul>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/micmath/jsdoc">JSDoc 3</a> on Fri Apr 20 2012 11:58:20 GMT-0400 (EDT)
</footer>
<script> sh_highlightDocument(); </script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.