mentat/docs/apis/0.7/swift/Classes/TupleResult.html
Emily Toop da599c3a78 Fix broken documentation links. (#775) (#767) r=nalexander
* Fix broken API doc links

Create symlink for latest to point to v0.7.
Group APIs by top version number rather than individual

* Update swift and android version numbers to match Mentats

* Update documentation

* Update top level .gitignore to ignore docs site & metatdata

* Add README to help with building documentation site

* Address review comments @ncalexan
2018-06-29 10:28:44 -07:00

672 lines
32 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>TupleResult Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/TupleResult" class="dashAnchor"></a>
<a title="TupleResult Class Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html"> Docs</a> (74% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html"> Reference</a>
<img id="carat" src="../img/carat.png" />
TupleResult Class Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/ColResult.html">ColResult</a>
</li>
<li class="nav-group-task">
<a href="../Classes/ColResultIterator.html">ColResultIterator</a>
</li>
<li class="nav-group-task">
<a href="../Classes/EntityBuilder.html">EntityBuilder</a>
</li>
<li class="nav-group-task">
<a href="../Classes/InProgress.html">InProgress</a>
</li>
<li class="nav-group-task">
<a href="../Classes/InProgressBuilder.html">InProgressBuilder</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Mentat.html">Mentat</a>
</li>
<li class="nav-group-task">
<a href="../Classes/OptionalRustObject.html">OptionalRustObject</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Query.html">Query</a>
</li>
<li class="nav-group-task">
<a href="../Classes/RelResult.html">RelResult</a>
</li>
<li class="nav-group-task">
<a href="../Classes/RelResultIterator.html">RelResultIterator</a>
</li>
<li class="nav-group-task">
<a href="../Classes/RustObject.html">RustObject</a>
</li>
<li class="nav-group-task">
<a href="../Classes/TupleResult.html">TupleResult</a>
</li>
<li class="nav-group-task">
<a href="../Classes/TxReport.html">TxReport</a>
</li>
<li class="nav-group-task">
<a href="../Classes/TypedValue.html">TypedValue</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/CacheDirection.html">CacheDirection</a>
</li>
<li class="nav-group-task">
<a href="../Enums/PointerError.html">PointerError</a>
</li>
<li class="nav-group-task">
<a href="../Enums/QueryError.html">QueryError</a>
</li>
<li class="nav-group-task">
<a href="../Enums/ResultError.html">ResultError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a href="../Extensions/Result.html">Result</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/Observable.html">Observable</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/Observing.html">Observing</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs.html#/s:6Mentat0A5ErrorV">MentatError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Typealiases.html">Type Aliases</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Typealiases.html#/s:6Mentat5Entida">Entid</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>TupleResult</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">TupleResult</span> <span class="p">:</span> <span class="kt"><a href="../Classes/OptionalRustObject.html">OptionalRustObject</a></span></code></pre>
</div>
</div>
<p>Wraps a <code>Tuple</code> result from a Mentat query.
A <code>Tuple</code> result is a list of <code>TypedValues</code>.
Individual values can be fetched as <code>TypedValues</code> or converted into a requested type.</p>
<p>Values can be fetched as one of the following types:</p>
<ul>
<li><code><a href="../Classes/TypedValue.html">TypedValue</a></code></li>
<li><code>Int64</code></li>
<li><code><a href="../Typealiases.html#/s:6Mentat5Entida">Entid</a></code></li>
<li><code>Keyword</code></li>
<li><code>Bool</code></li>
<li><code>Double</code></li>
<li><code>Date</code></li>
<li><code>String</code></li>
<li><code>UUID</code>.</li>
</ul>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:6Mentat11TupleResultC3getAA10TypedValueCSi5index_tF"></a>
<a name="//apple_ref/swift/Method/get(index:)" class="dashAnchor"></a>
<a class="token" href="#/s:6Mentat11TupleResultC3getAA10TypedValueCSi5index_tF">get(index:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Return the <code><a href="../Classes/TypedValue.html">TypedValue</a></code> at the specified index.
If the index is greater than the number of values then this function will crash.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">get</span><span class="p">(</span><span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Classes/TypedValue.html">TypedValue</a></span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The index of the value to fetch.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The <code><a href="../Classes/TypedValue.html">TypedValue</a></code> at that index.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:6Mentat11TupleResultC6asLongs5Int64VSi5index_tF"></a>
<a name="//apple_ref/swift/Method/asLong(index:)" class="dashAnchor"></a>
<a class="token" href="#/s:6Mentat11TupleResultC6asLongs5Int64VSi5index_tF">asLong(index:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Return the <code>Int64</code> at the specified index.
If the index is greater than the number of values then this function will crash.
If the value type if the <code><a href="../Classes/TypedValue.html">TypedValue</a></code> at this index is not <code>Long</code> then this function will crash.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">asLong</span><span class="p">(</span><span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Int64</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The index of the value to fetch.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The <code>Int64</code> at that index.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:6Mentat11TupleResultC7asEntids5Int64VSi5index_tF"></a>
<a name="//apple_ref/swift/Method/asEntid(index:)" class="dashAnchor"></a>
<a class="token" href="#/s:6Mentat11TupleResultC7asEntids5Int64VSi5index_tF">asEntid(index:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Return the <code><a href="../Typealiases.html#/s:6Mentat5Entida">Entid</a></code> at the specified index.
If the index is greater than the number of values then this function will crash.
If the value type if the <code><a href="../Classes/TypedValue.html">TypedValue</a></code> at this index is not <code>Ref</code> then this function will crash.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">asEntid</span><span class="p">(</span><span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Typealiases.html#/s:6Mentat5Entida">Entid</a></span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The index of the value to fetch.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The <code><a href="../Typealiases.html#/s:6Mentat5Entida">Entid</a></code> at that index.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:6Mentat11TupleResultC9asKeywordSSSi5index_tF"></a>
<a name="//apple_ref/swift/Method/asKeyword(index:)" class="dashAnchor"></a>
<a class="token" href="#/s:6Mentat11TupleResultC9asKeywordSSSi5index_tF">asKeyword(index:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Return the keyword <code>String</code> at the specified index.
If the index is greater than the number of values then this function will crash.
If the value type if the <code><a href="../Classes/TypedValue.html">TypedValue</a></code> at this index is not <code>Keyword</code> then this function will crash.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">asKeyword</span><span class="p">(</span><span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">String</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The index of the value to fetch.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The keyword <code>String</code> at that index.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:6Mentat11TupleResultC6asBoolSbSi5index_tF"></a>
<a name="//apple_ref/swift/Method/asBool(index:)" class="dashAnchor"></a>
<a class="token" href="#/s:6Mentat11TupleResultC6asBoolSbSi5index_tF">asBool(index:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Return the <code>Bool</code> at the specified index.
If the index is greater than the number of values then this function will crash.
If the value type if the <code><a href="../Classes/TypedValue.html">TypedValue</a></code> at this index is not <code>Boolean</code> then this function will crash.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">asBool</span><span class="p">(</span><span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The index of the value to fetch.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The <code>Bool</code> at that index.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:6Mentat11TupleResultC8asDoubleSdSi5index_tF"></a>
<a name="//apple_ref/swift/Method/asDouble(index:)" class="dashAnchor"></a>
<a class="token" href="#/s:6Mentat11TupleResultC8asDoubleSdSi5index_tF">asDouble(index:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Return the <code>Double</code> at the specified index.
If the index is greater than the number of values then this function will crash.
If the value type if the <code><a href="../Classes/TypedValue.html">TypedValue</a></code> at this index is not <code>Double</code> then this function will crash.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">asDouble</span><span class="p">(</span><span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Double</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The index of the value to fetch.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The <code>Double</code> at that index.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:6Mentat11TupleResultC6asDate10Foundation0E0VSi5index_tF"></a>
<a name="//apple_ref/swift/Method/asDate(index:)" class="dashAnchor"></a>
<a class="token" href="#/s:6Mentat11TupleResultC6asDate10Foundation0E0VSi5index_tF">asDate(index:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Return the <code>Date</code> at the specified index.
If the index is greater than the number of values then this function will crash.
If the value type if the <code><a href="../Classes/TypedValue.html">TypedValue</a></code> at this index is not <code>Instant</code> then this function will crash.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">asDate</span><span class="p">(</span><span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Date</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The index of the value to fetch.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The <code>Date</code> at that index.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:6Mentat11TupleResultC8asStringSSSi5index_tF"></a>
<a name="//apple_ref/swift/Method/asString(index:)" class="dashAnchor"></a>
<a class="token" href="#/s:6Mentat11TupleResultC8asStringSSSi5index_tF">asString(index:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Return the <code>String</code> at the specified index.
If the index is greater than the number of values then this function will crash.
If the value type if the <code><a href="../Classes/TypedValue.html">TypedValue</a></code> at this index is not <code>String</code> then this function will crash.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">asString</span><span class="p">(</span><span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">String</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The index of the value to fetch.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The <code>String</code> at that index.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:6Mentat11TupleResultC6asUUID10Foundation0E0VSgSi5index_tF"></a>
<a name="//apple_ref/swift/Method/asUUID(index:)" class="dashAnchor"></a>
<a class="token" href="#/s:6Mentat11TupleResultC6asUUID10Foundation0E0VSgSi5index_tF">asUUID(index:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Return the <code>UUID</code> at the specified index.
If the index is greater than the number of values then this function will crash.
If the value type if the <code><a href="../Classes/TypedValue.html">TypedValue</a></code> at this index is not <code>Uuid</code> then this function will crash.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">asUUID</span><span class="p">(</span><span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UUID</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The index of the value to fetch.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The <code>UUID</code> at that index.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:6Mentat11TupleResultC7cleanupys13OpaquePointerV7pointer_tF"></a>
<a name="//apple_ref/swift/Method/cleanup(pointer:)" class="dashAnchor"></a>
<a class="token" href="#/s:6Mentat11TupleResultC7cleanupys13OpaquePointerV7pointer_tF">cleanup(pointer:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">override</span> <span class="kd">open</span> <span class="kd">func</span> <span class="nf">cleanup</span><span class="p">(</span><span class="nv">pointer</span><span class="p">:</span> <span class="kt">OpaquePointer</span><span class="p">)</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2018-06-21)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.2</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>