blob: da751492e862bc023e48ac9559c1ee209760c312 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Cursor</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.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/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Cursor</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>Cursor</h2>
<div class="class-description"><p>Class representing a cursor to obtain results of SQL and Scan query operations.</p>
<p>The class has no public constructor. An instance of this class is obtained
via query() method of <a href="CacheClient.html">CacheClient</a> objects.
One instance of this class returns results of one SQL or Scan query operation.</p></div>
</header>
<article>
<div class="container-overview">
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cursor.js.html">Cursor.js</a>, <a href="Cursor.js.html#line35">line 35</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="close"><span class="type-signature">(async) </span>close<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
<p>Closes the cursor. Obtaining elements from the results is not possible after this.</p>
<p>This method should be called if no more elements are needed.
It is not neccessary to call it if all elements have been already obtained.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cursor.js.html">Cursor.js</a>, <a href="Cursor.js.html#line101">line 101</a>
</li></ul></dd>
</dl>
<h4 class="name" id="getAll"><span class="type-signature">(async) </span>getAll<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="CacheEntry.html">CacheEntry</a>>>}</span></h4>
<div class="description">
<p>Returns all elements (cache entries - key-value pairs) from the query results.</p>
<p>May be used instead of getValue() method if the number of returned entries
is relatively small and will not cause memory utilization issues.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cursor.js.html">Cursor.js</a>, <a href="Cursor.js.html#line81">line 81</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>all cache entries (key-value pairs)
returned by SQL or Scan query.</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.&lt;Array.&lt;<a href="CacheEntry.html">CacheEntry</a>>></span>
</dd>
</dl>
<h4 class="name" id="getValue"><span class="type-signature">(async) </span>getValue<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="CacheEntry.html">CacheEntry</a>>}</span></h4>
<div class="description">
<p>Returns one element (cache entry - key-value pair) from the query results.</p>
<p>Every new call returns the next cache entry from the query results.
If the method returns null, no more entries are available.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cursor.js.html">Cursor.js</a>, <a href="Cursor.js.html#line47">line 47</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>a cache entry (key-value pair).</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.&lt;<a href="CacheEntry.html">CacheEntry</a>></span>
</dd>
</dl>
<h4 class="name" id="hasMore"><span class="type-signature"></span>hasMore<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<div class="description">
<p>Checks if more elements are available in the query results.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cursor.js.html">Cursor.js</a>, <a href="Cursor.js.html#line65">line 65</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>true if more cache entries are available, false otherwise.</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BinaryObject.html">BinaryObject</a></li><li><a href="CacheClient.html">CacheClient</a></li><li><a href="CacheConfiguration.html">CacheConfiguration</a></li><li><a href="CacheEntry.html">CacheEntry</a></li><li><a href="CacheKeyConfiguration.html">CacheKeyConfiguration</a></li><li><a href="CollectionObjectType.html">CollectionObjectType</a></li><li><a href="ComplexObjectType.html">ComplexObjectType</a></li><li><a href="CompositeType.html">CompositeType</a></li><li><a href="Cursor.html">Cursor</a></li><li><a href="EnumItem.html">EnumItem</a></li><li><a href="IgniteClient.html">IgniteClient</a></li><li><a href="IgniteClientConfiguration.html">IgniteClientConfiguration</a></li><li><a href="IgniteClientError.html">IgniteClientError</a></li><li><a href="IllegalStateError.html">IllegalStateError</a></li><li><a href="LostConnectionError.html">LostConnectionError</a></li><li><a href="MapObjectType.html">MapObjectType</a></li><li><a href="ObjectArrayType.html">ObjectArrayType</a></li><li><a href="ObjectType.html">ObjectType</a></li><li><a href="OperationError.html">OperationError</a></li><li><a href="Query.html">Query</a></li><li><a href="QueryEntity.html">QueryEntity</a></li><li><a href="QueryField.html">QueryField</a></li><li><a href="QueryIndex.html">QueryIndex</a></li><li><a href="ScanQuery.html">ScanQuery</a></li><li><a href="SqlFieldsCursor.html">SqlFieldsCursor</a></li><li><a href="SqlFieldsQuery.html">SqlFieldsQuery</a></li><li><a href="SqlQuery.html">SqlQuery</a></li><li><a href="Timestamp.html">Timestamp</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue May 22 2018 12:08:49 GMT+0300 (Russia TZ 2 Standard Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>