node-eventstore-client2
Version:
A port of the EventStore .Net ClientAPI to Node.js
3,551 lines (950 loc) • 50.3 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: ProjectionsManager</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: ProjectionsManager</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>ProjectionsManager<span class="signature">(log, httpEndPoint, operationTimeout)</span><span class="type-signature"></span></h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="ProjectionsManager"><span class="type-signature"></span>new ProjectionsManager<span class="signature">(log, httpEndPoint, operationTimeout)</span><span class="type-signature"></span></h4>
<div class="description">
Creates a new instance of ProjectionsManager.
</div>
<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>log</code></td>
<td class="type">
<span class="param-type">Logger</span>
</td>
<td class="description last">Instance of Logger to use for logging.</td>
</tr>
<tr>
<td class="name"><code>httpEndPoint</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">HTTP endpoint of an Event Store server.</td>
</tr>
<tr>
<td class="name"><code>operationTimeout</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">Operation timeout in milliseconds.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line11">line 11</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="abort"><span class="type-signature"></span>abort<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Disables a projection.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to disable a projection.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line44">line 44</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="createContinuous"><span class="type-signature"></span>createContinuous<span class="signature">(name, query, trackEmittedStreams, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Creates a one-time query.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>query</code></td>
<td class="type">
</td>
<td class="description last">The JavaScript source code for the query.</td>
</tr>
<tr>
<td class="name"><code>trackEmittedStreams</code></td>
<td class="type">
</td>
<td class="description last">Whether the streams emitted by this projection should be tracked.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to create a query.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line87">line 87</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="createOneTime"><span class="type-signature"></span>createOneTime<span class="signature">(query, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Creates a one-time query.
</div>
<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">
</td>
<td class="description last">The JavaScript source code for the query.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to create a query.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line64">line 64</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="createTransient"><span class="type-signature"></span>createTransient<span class="signature">(name, query, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Creates a one-time query.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">A name for the query.</td>
</tr>
<tr>
<td class="name"><code>query</code></td>
<td class="type">
</td>
<td class="description last">The JavaScript source code for the query.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to create a query.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line75">line 75</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="delete"><span class="type-signature"></span>delete<span class="signature">(name, deleteEmittedStreams, deleteStateStream, deleteCheckpointStream, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Updates the definition of a query.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>deleteEmittedStreams</code></td>
<td class="type">
</td>
<td class="description last">Whether to delete the streams that were emitted by this projection.</td>
</tr>
<tr>
<td class="name"><code>deleteStateStream</code></td>
<td class="type">
</td>
<td class="description last">Where to delete the state stream for this projection</td>
</tr>
<tr>
<td class="name"><code>deleteCheckpointStream</code></td>
<td class="type">
</td>
<td class="description last">Where to delete the checkpoint stream for this projection</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to delete a projection.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line210">line 210</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="disable"><span class="type-signature"></span>disable<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Aborts and disables a projection without writing a checkpoint.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to disable a projection.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line34">line 34</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="enable"><span class="type-signature"></span>enable<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Enables a projection.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to enable a projection.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line24">line 24</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="getPartitionResult"><span class="type-signature"></span>getPartitionResult<span class="signature">(name, partitionId, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the state of a projection for a specified partition.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>partitionId</code></td>
<td class="type">
</td>
<td class="description last">The id of the partition.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line166">line 166</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing projection state.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="getPartitionState"><span class="type-signature"></span>getPartitionState<span class="signature">(name, partitionId, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the state of a projection for a specified partition.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>partitionId</code></td>
<td class="type">
</td>
<td class="description last">The id of the partition.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line145">line 145</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing projection state.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="getQuery"><span class="type-signature"></span>getQuery<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the status of a query.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the query.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line186">line 186</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing query status.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="getResult"><span class="type-signature"></span>getResult<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the state of a projection.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line155">line 155</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing projection state.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="getState"><span class="type-signature"></span>getState<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the state of a projection.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line134">line 134</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing projection state.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="getStatistics"><span class="type-signature"></span>getStatistics<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the statistics of a projection.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line176">line 176</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing projection statistics.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="getStatus"><span class="type-signature"></span>getStatus<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the status of a projection.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line124">line 124</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing projection status.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="listAll"><span class="type-signature"></span>listAll<span class="signature">(userCredentials)</span><span class="type-signature"> → {Promise.<Array.<ProjectionDetails>>}</span></h4>
<div class="description">
Lists the status of all projections.
</div>
<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>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line96">line 96</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<Array.<ProjectionDetails>></span>
</dd>
</dl>
<h4 class="name" id="listContinuous"><span class="type-signature"></span>listContinuous<span class="signature">(userCredentials)</span><span class="type-signature"> → {Promise.<Array.<ProjectionDetails>>}</span></h4>
<div class="description">
Lists the status of all continuous projections.
</div>
<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>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line114">line 114</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<Array.<ProjectionDetails>></span>
</dd>
</dl>
<h4 class="name" id="listOneTime"><span class="type-signature"></span>listOneTime<span class="signature">(userCredentials)</span><span class="type-signature"> → {Promise.<Array.<ProjectionDetails>>}</span></h4>
<div class="description">
Lists the status of all one-time projections.
</div>
<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>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line105">line 105</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<Array.<ProjectionDetails>></span>
</dd>
</dl>
<h4 class="name" id="reset"><span class="type-signature"></span>reset<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Reset a projection. (This will re-emit events, streams that are written to from the projection will also be soft deleted)
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to reset a projection.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line54">line 54</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="updateQuery"><span class="type-signature"></span>updateQuery<span class="signature">(name, query, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Updates the definition of a query.
</div>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the query.</td>
</tr>
<tr>
<td class="name"><code>query</code></td>
<td class="type">
</td>
<td class="description last">The JavaScript source code for the query.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line197">line 197</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AllEventsSlice.html">AllEventsSlice</a></li><li><a href="DeleteResult.html">DeleteResult</a></li><li><a href="EventReadResult.html">EventReadResult</a></li><li><a href="EventStore.Client.Messages.ClientIdentified.html">ClientIdentified</a></li><li><a href="EventStore.Client.Messages.ConnectToPersistentSubscription.html">ConnectToPersistentSubscription</a></li><li><a href="EventStore.Client.Messages.CreatePersistentSubscription.html">CreatePersistentSubscription</a></li><li><a href="EventStore.Client.Messages.CreatePersistentSubscriptionCompleted.html">CreatePersistentSubscriptionCompleted</a></li><li><a href="EventStore.Client.Messages.DeletePersistentSubscription.html">DeletePersistentSubscription</a></li><li><a href="EventStore.Client.Messages.DeletePersistentSubscriptionCompleted.html">DeletePersistentSubscriptionCompleted</a></li><li><a href="EventStore.Client.Messages.DeleteStream.html">DeleteStream</a></li><li><a href="EventStore.Client.Messages.DeleteStreamCompleted.html">DeleteStreamCompleted</a></li><li><a href="EventStore.Client.Messages.EventRecord.html">EventRecord</a></li><li><a href="EventStore.Client.Messages.IdentifyClient.html">IdentifyClient</a></li><li><a href="EventStore.Client.Messages.NewEvent.html">NewEvent</a></li><li><a href="EventStore.Client.Messages.NotHandled.html">NotHandled</a></li><li><a href="EventStore.Client.Messages.NotHandled.MasterInfo.html">MasterInfo</a></li><li><a href="EventStore.Client.Messages.PersistentSubscriptionAckEvents.html">PersistentSubscriptionAckEvents</a></li><li><a href="EventStore.Client.Messages.PersistentSubscriptionConfirmation.html">PersistentSubscriptionConfirmation</a></li><li><a href="EventStore.Client.Messages.PersistentSubscriptionNakEvents.html">PersistentSubscriptionNakEvents</a></li><li><a href="EventStore.Client.Messages.PersistentSubscriptionStreamEventAppeared.html">PersistentSubscriptionStreamEventAppeared</a></li><li><a href="EventStore.Client.Messages.ReadAllEvents.html">ReadAllEvents</a></li><li><a href="EventStore.Client.Messages.ReadAllEventsCompleted.html">ReadAllEventsCompleted</a></li><li><a href="EventStore.Client.Messages.ReadEvent.html">ReadEvent</a></li><li><a href="EventStore.Client.Messages.ReadEventCompleted.html">ReadEventCompleted</a></li><li><a href="EventStore.Client.Messages.ReadStreamEvents.html">ReadStreamEvents</a></li><li><a href="EventStore.Client.Messages.ReadStreamEventsCompleted.html">ReadStreamEventsCompleted</a></li><li><a href="EventStore.Client.Messages.ResolvedEvent.html">ResolvedEvent</a></li><li><a href="EventStore.Client.Messages.ResolvedIndexedEvent.html">ResolvedIndexedEvent</a></li><li><a href="EventStore.Client.Messages.ScavengeDatabase.html">ScavengeDatabase</a></li><li><a href="EventStore.Client.Messages.ScavengeDatabaseCompleted.html">ScavengeDatabaseCompleted</a></li><li><a href="EventStore.Client.Messages.StreamEventAppeared.html">StreamEventAppeared</a></li><li><a href="EventStore.Client.Messages.SubscribeToStream.html">SubscribeToStream</a></li><li><a href="EventStore.Client.Messages.SubscriptionConfirmation.html">SubscriptionConfirmation</a></li><li><a href="EventStore.Client.Messages.SubscriptionDropped.html">SubscriptionDropped</a></li><li><a href="EventStore.Client.Messages.TransactionCommit.html">TransactionCommit</a></li><li><a href="EventStore.Client.Messages.TransactionCommitCompleted.html">TransactionCommitCompleted</a></li><li><a href="EventStore.Client.Messages.TransactionStart.html">TransactionStart</a></li><li><a href="EventStore.Client.Messages.TransactionStartCompleted.html">TransactionStartCompleted</a></li><li><a href="EventStore.Client.Messages.TransactionWrite.html">TransactionWrite</a></li><li><a href="EventStore.Client.Messages.TransactionWriteCompleted.html">TransactionWriteCompleted</a></li><li><a href="EventStore.Client.Messages.UnsubscribeFromStream.html">UnsubscribeFromStream</a></li><li><a href="EventStore.Client.Messages.UpdatePersistentSubscription.html">UpdatePersistentSubscription</a></li><li><a href="EventStore.Client.Messages.UpdatePersistentSubscriptionCompleted.html">UpdatePersistentSubscriptionCompleted</a></li><li><a href="EventStore.Client.Messages.WriteEvents.html">WriteEvents</a></li><li><a href="EventStore.Client.Messages.WriteEventsCompleted.html">WriteEventsCompleted</a></li><li><a href="EventStoreCatchUpSubscription.html">EventStoreCatchUpSubscription</a></li><li><a href="EventStoreNodeConnection.html">EventStoreNodeConnection</a></li><li><a href="EventStoreTransaction.html">EventStoreTransaction</a></li><li><a href="PersistentSubscriptionCreateResult.html">PersistentSubscriptionCreateResult</a></li><li><a href="PersistentSubscriptionDeleteResult.html">PersistentSubscriptionDeleteResult</a></li><li><a href="PersistentSubscriptionUpdateResult.html">PersistentSubscriptionUpdateResult</a></li><li><a href="Position.html">Position</a></li><li><a href="ProjectionsManager.html">ProjectionsManager</a></li><li><a href="RawStreamMetadataResult.html">RawStreamMetadataResult</a></li><li><a href="RecordedEvent.html">RecordedEvent</a></li><li><a href="ResolvedEvent.html">ResolvedEvent</a></li><li><a href="StreamEventsSlice.html">StreamEventsSlice</a></li><li><a href="UserCredentials.html">UserCredentials</a></li><li><a href="WriteResult.html">WriteResult</a></li></ul><h3>Namespaces</h3><ul><li><a href="EventStore.html">EventStore</a></li><li><a href="EventStore.Client.html">Client</a></li><li><a href="EventStore.Client.Messages.html">Messages</a></li></ul><h3>Interfaces</h3><ul><li><a href="EventStore.Client.Messages.IClientIdentified.html">IClientIdentified</a></li><li><a href="EventStore.Client.Messages.IConnectToPersistentSubscription.html">IConnectToPersistentSubscription</a></li><li><a href="EventStore.Client.Messages.ICreatePersistentSubscription.html">ICreatePersistentSubscription</a></li><li><a href="EventStore.Client.Messages.ICreatePersistentSubscriptionCompleted.html">ICreatePersistentSubscriptionCompleted</a></li><li><a href="EventStore.Client.Messages.IDeletePersistentSubscription.html">IDeletePersistentSubscription</a></li><li><a href="EventStore.Client.Messages.IDeletePersistentSubscriptionCompleted.html">IDeletePersistentSubscriptionCompleted</a></li><li><a href="EventStore.Client.Messages.IDeleteStream.html">IDeleteStream</a></li><li><a href="EventStore.Client.Messages.IDeleteStreamCompleted.html">IDeleteStreamCompleted</a></li><li><a href="EventStore.Client.Messages.IEventRecord.html">IEventRecord</a></li><li><a href="EventStore.Client.Messages.IIdentifyClient.html">IIdentifyClient</a></li><li><a href="EventStore.Client.Messages.INewEvent.html">INewEvent</a></li><li><a href="EventStore.Client.Messages.INotHandled.html">INotHandled</a></li><li><a href="EventStore.Client.Messages.IPersistentSubscriptionAckEvents.html">IPersistentSubscriptionAckEvents</a></li><li><a href="EventStore.Client.Messages.IPersistentSubscriptionConfirmation.html">IPersistentSubscriptionConfirmation</a></li><li><a href="EventStore.Client.Messages.IPersistentSubscriptionNakEvents.html">IPersistentSubscriptionNakEvents</a></li><li><a href="EventStore.Client.Messages.IPersistentSubscriptionStreamEventAppeared.html">IPersistentSubscriptionStreamEventAppeared</a></li><li><a href="EventStore.Client.Messages.IReadAllEvents.html">IReadAllEvents</a></li><li><a href="EventStore.Client.Messages.IReadAllEventsCompleted.html">IReadAllEventsCompleted</a></li><li><a href="EventStore.Client.Messages.IReadEvent.html">IReadEvent</a></li><li><a href="EventStore.Client.Messages.IReadEventCompleted.html">IReadEventCompleted</a></li><li><a href="EventStore.Client.Messages.IReadStreamEvents.html">IReadStreamEvents</a></li><li><a href="EventStore.Client.Messages.IReadStreamEventsCompleted.html">IReadStreamEventsCompleted</a></li><li><a href="EventStore.Client.Messages.IResolvedEvent.html">IResolvedEvent</a></li><li><a href="EventStore.Client.Messages.IResolvedIndexedEvent.html">IResolvedIndexedEvent</a></li><li><a href="EventStore.Client.Messages.IScavengeDatabase.html">IScavengeDatabase</a></li><li><a href="EventStore.Client.Messages.IScavengeDatabaseCompleted.html">IScavengeDatabaseCompleted</a></li><li><a href="EventStore.Client.Messages.IStreamEventAppeared.html">IStreamEventAppeared</a></li><li><a href="EventStore.Client.Messages.ISubscribeToStream.html">ISubscribeToStream</a></li><li><a href="EventStore.Client.Messages.ISubscriptionConfirmation.html">ISubscriptionConfirmation</a></li><li><a href="EventStore.Client.Messages.ISubscriptionDropped.html">ISubscriptionDropped</a></li><li><a href="EventStore.Client.Messages.ITransactionCommit.html">ITransactionCommit</a></li><li><a href="EventStore.Client.Messages.ITransactionCommitCompleted.html">ITransactionCommitCompleted</a></li><li><a href="EventStore.Client.Messages.ITransactionStart.html">ITransactionStart</a></li><li><a href="EventStore.Client.Messages.ITransactionStartCompleted.html">ITransactionStartCompleted</a></li><li><a href="EventStore.Client.Messages.ITransactionWrite.html">ITransactionWrite</a></li><li><a href="EventStore.Client.Messages.ITransactionWriteCompleted.html">ITransactionWriteCompleted</a></li><li><a href="EventStore.Client.Messages.IUnsubscribeFromStream.html">IUnsubscribeFromStream</a></li><li><a href="EventStore.Client.Messages.IUpdatePersistentSubscription.html">IUpdatePersistentSubscription</a></li><li><a href="EventStore.Client.Messages.IUpdatePersistentSubscriptionCompleted.html">IUpdatePersistentSubscriptionCompleted</a></li><li><a href="EventStore.Client.Messages.IWriteEvents.html">IWriteEvents</a></li><li><a href="EventStore.Client.Messages.IWriteEventsCompleted.html">IWriteEventsCompleted</a></li><li><a href="EventStore.Client.Messages.NotHandled.IMasterInfo.html">IMasterInfo</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createConnection">createConnection</a></li><li><a href="global.html#createEventData">createEventData</a></li><li><a href="global.html#createJsonEventData">createJsonEventData</a></li></ul>
</nav>
<br class="clear">
<footer>
Documenta