# Metadata

<div class="jsdoc-content"><header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>
            <span class="ancestors"><a href="index.html">metadata</a>~</span>Metadata<span class="signature">(options, controlConnection)</span><span class="type-signature"></span></h2>
        
            <div class="class-description"><p>Represents cluster and schema information.
The metadata class acts as a internal state of the driver.</p></div>
        
    
</header>


    
        

    
    </div>

## Constructor

<div class="jsdoc-content">
    

    
    <h4 class="name" id="Metadata"><span class="type-signature"></span>new Metadata<span class="signature">(options, controlConnection)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Creates a new instance of Metadata.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="../globals.html#ClientOptions">ClientOptions</a></span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>controlConnection</code></td>
            

            <td class="type">
            
                
<span class="param-type">ControlConnection</span>


            
            </td>

            

            

            <td class="description last"><p>Control connection used to retrieve information.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L45" target="_blank" rel="noopener">metadata/index.js, line 45</a></p></div>




















    
    

    

    

    

    

    

    

    

    
        </div>

## Methods

<div class="jsdoc-content">

        
            

    

    
    <h4 class="name" id="checkSchemaAgreement"><span class="type-signature"></span>checkSchemaAgreement<span class="signature">()</span><span class="type-signature"> &rarr; {Boolean}</span></h4>
    

    



<div class="description">
    <p>Checks whether hosts that are currently up agree on the schema definition.</p>
<p>This method performs a one-time check only, without any form of retry; therefore
<code>protocolOptions.maxSchemaAgreementWaitSeconds</code> setting does not apply in this case.</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L219" target="_blank" rel="noopener">metadata/index.js, line 219</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p><code>true</code> when all hosts agree on the schema and <code>false</code> when there is no agreement or when
the check could not be performed (for example, if the control connection is down).</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Boolean</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getAggregate"><span class="type-signature"></span>getAggregate<span class="signature">(keyspaceName, name, signature)</span><span class="type-signature"> &rarr; {Aggregate|null}</span></h4>
    

    



<div class="description">
    <p>Gets a definition of CQL aggregate for a given name and signature.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>keyspaceName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the keyspace.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the aggregate.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>signature</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array&lt;string></span>
|

<span class="param-type">Array&lt;{code, info}></span>


            
            </td>

            

            

            <td class="description last"><p>Array of types of the parameters.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L181" target="_blank" rel="noopener">metadata/index.js, line 181</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The schema aggregate metadata, or <code>null</code> if it does not exist.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Aggregate</span>
|

<span class="param-type">null</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getAggregates"><span class="type-signature"></span>getAggregates<span class="signature">(keyspaceName, name)</span><span class="type-signature"> &rarr; {Array&lt;Aggregate>}</span></h4>
    

    



<div class="description">
    <p>Gets the definition of CQL aggregate for a given name.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>keyspaceName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the keyspace.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the aggregate.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L170" target="_blank" rel="noopener">metadata/index.js, line 170</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>An array of schema aggregate metadata.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array&lt;Aggregate></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getFunction"><span class="type-signature"></span>getFunction<span class="signature">(keyspaceName, name, signature)</span><span class="type-signature"> &rarr; {SchemaFunction|null}</span></h4>
    

    



<div class="description">
    <p>Gets a definition of CQL function for a given name and signature.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>keyspaceName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the keyspace.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the Function.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>signature</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array&lt;string></span>
|

<span class="param-type">Array&lt;{code, info}></span>


            
            </td>

            

            

            <td class="description last"><p>Array of types of the parameters.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L160" target="_blank" rel="noopener">metadata/index.js, line 160</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The schema function metadata, or <code>null</code> if it does not exist.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">SchemaFunction</span>
|

<span class="param-type">null</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getFunctions"><span class="type-signature"></span>getFunctions<span class="signature">(keyspaceName, name)</span><span class="type-signature"> &rarr; {Array&lt;SchemaFunction>}</span></h4>
    

    



<div class="description">
    <p>Gets the definition of CQL functions for a given name.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>keyspaceName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the keyspace.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the Function.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L149" target="_blank" rel="noopener">metadata/index.js, line 149</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>An array of schema function metadata.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array&lt;SchemaFunction></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getKeyspace"><span class="type-signature"></span>getKeyspace<span class="signature">(name)</span><span class="type-signature"> &rarr; {KeyspaceMetadata|null}</span></h4>
    

    



<div class="description">
    <p>Gets the keyspace metadata by name.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <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">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the keyspace.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L59" target="_blank" rel="noopener">metadata/index.js, line 59</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The keyspace metadata, or <code>null</code> if it does not exist.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">KeyspaceMetadata</span>
|

<span class="param-type">null</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getKeyspaces"><span class="type-signature"></span>getKeyspaces<span class="signature">()</span><span class="type-signature"> &rarr; {Map&lt;string, KeyspaceMetadata>}</span></h4>
    

    



<div class="description">
    <p>Gets all keyspace metadata.</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L67" target="_blank" rel="noopener">metadata/index.js, line 67</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A map of all keyspaces indexed by name.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Map&lt;string, KeyspaceMetadata></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getMaterializedView"><span class="type-signature"></span>getMaterializedView<span class="signature">(keyspaceName, name)</span><span class="type-signature"> &rarr; {MaterializedView|null}</span></h4>
    

    



<div class="description">
    <p>Gets the definition of a CQL materialized view for a given name.</p>
<p>Note that, unlike the rest of the Metadata methods, this method does not cache the result for following
calls, as the current version of the Cassandra native protocol does not support schema change events for
materialized views. Each call to this method will produce one or more queries to the cluster.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>keyspaceName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the keyspace</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the materialized view</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L195" target="_blank" rel="noopener">metadata/index.js, line 195</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The materialized view definition, or <code>null</code> if it does not exist.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">MaterializedView</span>
|

<span class="param-type">null</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getReplicas"><span class="type-signature"></span>getReplicas<span class="signature">(keyspaceName, token)</span><span class="type-signature"> &rarr; {Array&lt;<a href="Host.html">Host</a>>}</span></h4>
    

    



<div class="description">
    <p>Gets the host list representing the replicas that contain the given partition key, token or token range.</p>
<p>It uses the pre-loaded keyspace metadata to retrieve the replicas for a token for a given keyspace.
When the keyspace metadata has not been loaded, it returns null.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>keyspaceName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the keyspace.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>token</code></td>
            

            <td class="type">
            
                
<span class="param-type">Buffer</span>
|

<span class="param-type"><a href="../Token.html">Token</a></span>
|

<span class="param-type"><a href="../TokenRange.html">TokenRange</a></span>


            
            </td>

            

            

            <td class="description last"><p>Can be Buffer (serialized partition key), Token or TokenRange.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L80" target="_blank" rel="noopener">metadata/index.js, line 80</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array&lt;<a href="Host.html">Host</a>></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getTable"><span class="type-signature"></span>getTable<span class="signature">(keyspaceName, name)</span><span class="type-signature"> &rarr; {TableMetadata|null}</span></h4>
    

    



<div class="description">
    <p>Gets the definition of a table.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>keyspaceName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the keyspace.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the Table.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L139" target="_blank" rel="noopener">metadata/index.js, line 139</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The table metadata, or <code>null</code> if it does not exist.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">TableMetadata</span>
|

<span class="param-type">null</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getTokenRanges"><span class="type-signature"></span>getTokenRanges<span class="signature">()</span><span class="type-signature"> &rarr; {Set&lt;<a href="../TokenRange.html">TokenRange</a>>}</span></h4>
    

    



<div class="description">
    <p>Gets the token ranges that define data distribution in the ring.</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L88" target="_blank" rel="noopener">metadata/index.js, line 88</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The ranges of the ring or empty set if schema metadata is not enabled.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Set&lt;<a href="../TokenRange.html">TokenRange</a>></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getTokenRangesForHost"><span class="type-signature"></span>getTokenRangesForHost<span class="signature">(keyspaceName, host)</span><span class="type-signature"> &rarr; {Set&lt;<a href="../TokenRange.html">TokenRange</a>>|null}</span></h4>
    

    



<div class="description">
    <p>Gets the token ranges that are replicated on the given host, for the given keyspace.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>keyspaceName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>The name of the keyspace to get ranges for.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>host</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Host.html">Host</a></span>


            
            </td>

            

            

            <td class="description last"><p>The host.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L99" target="_blank" rel="noopener">metadata/index.js, line 99</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Ranges for the keyspace on this host or null if keyspace
isn't found or hasn't been loaded.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Set&lt;<a href="../TokenRange.html">TokenRange</a>></span>
|

<span class="param-type">null</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getTrace"><span class="type-signature"></span>getTrace<span class="signature">(traceId, consistency<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Gets the trace session generated by Cassandra when query tracing is enabled for the
query. The trace itself is stored in Cassandra in the <code>sessions</code> and
<code>events</code> table in the <code>system_traces</code> keyspace and can be
retrieve manually using the trace identifier.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>traceId</code></td>
            

            <td class="type">
            
                
<span class="param-type">Uuid</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>Identifier of the trace session.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>consistency</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The consistency level to obtain the trace.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L207" target="_blank" rel="noopener">metadata/index.js, line 207</a></p></div>




















        
            

    

    
    <h4 class="name" id="getUdt"><span class="type-signature"></span>getUdt<span class="signature">(keyspaceName, name)</span><span class="type-signature"> &rarr; {Udt|null}</span></h4>
    

    



<div class="description">
    <p>Gets the definition of an user-defined type.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>keyspaceName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the keyspace.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>Name of the UDT.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L129" target="_blank" rel="noopener">metadata/index.js, line 129</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The UDT definition, or <code>null</code> if it does not exist.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Udt</span>
|

<span class="param-type">null</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="newToken"><span class="type-signature"></span>newToken<span class="signature">(components)</span><span class="type-signature"> &rarr; {<a href="../Token.html">Token</a>}</span></h4>
    

    



<div class="description">
    <p>Constructs a Token from the input buffer(s) or string input. If a string is passed in
it is assumed this matches the token representation reported by cassandra.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>components</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array&lt;Buffer></span>
|

<span class="param-type">Buffer</span>
|

<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>The token components.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L109" target="_blank" rel="noopener">metadata/index.js, line 109</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>constructed token from the input buffer.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="../Token.html">Token</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="newTokenRange"><span class="type-signature"></span>newTokenRange<span class="signature">(start, end)</span><span class="type-signature"> &rarr; {<a href="../TokenRange.html">TokenRange</a>}</span></h4>
    

    



<div class="description">
    <p>Constructs a TokenRange from the given start and end tokens.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>start</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="../Token.html">Token</a></span>


            
            </td>

            

            

            <td class="description last"><p>The start token.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>end</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="../Token.html">Token</a></span>


            
            </td>

            

            

            <td class="description last"><p>The end token.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/metadata/index.js#L119" target="_blank" rel="noopener">metadata/index.js, line 119</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>build range spanning from start (exclusive) to end (inclusive).</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="../TokenRange.html">TokenRange</a></span>


    </dd>
</dl></div>
