# Index

<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>Index<span class="signature">(name, target, kind, options)</span><span class="type-signature"></span></h2>
        
            <div class="class-description"><p>Describes a CQL index.</p></div>
        
    
</header>


    
        

    
    </div>

## Constructor

<div class="jsdoc-content">
    

    
    <h4 class="name" id="Index"><span class="type-signature"></span>new Index<span class="signature">(name, target, kind, options)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Creates a new Index instance.</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"></td>
        </tr>

    

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

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


            
            </td>

            

            

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

    

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

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

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


            
            </td>

            

            

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

    

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

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


            
            </td>

            

            

            <td class="description last"></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/schema-index.js#L17" target="_blank" rel="noopener">metadata/schema-index.js, line 17</a></p></div>




















    
    

    

    

    

    

    

    

    
        </div>

## Members

<div class="jsdoc-content">

        
            
<h4 class="name" id="kind"><span class="type-signature"></span>kind<span class="type-signature"> :Number</span></h4>




<div class="description">
    <p>A numeric value representing index kind (0: custom, 1: keys, 2: composite);</p>
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Number</span>


        </li>
    </ul>





<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/schema-index.js#L40" target="_blank" rel="noopener">metadata/schema-index.js, line 40</a></p></div>






        
            
<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"> :String</span></h4>




<div class="description">
    <p>Name of the index.</p>
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">String</span>


        </li>
    </ul>





<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/schema-index.js#L30" target="_blank" rel="noopener">metadata/schema-index.js, line 30</a></p></div>






        
            
<h4 class="name" id="options"><span class="type-signature"></span>options<span class="type-signature"> :Object</span></h4>




<div class="description">
    <p>An associative array containing the index options</p>
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Object</span>


        </li>
    </ul>





<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/schema-index.js#L45" target="_blank" rel="noopener">metadata/schema-index.js, line 45</a></p></div>






        
            
<h4 class="name" id="target"><span class="type-signature"></span>target<span class="type-signature"> :String</span></h4>




<div class="description">
    <p>Target of the index.</p>
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">String</span>


        </li>
    </ul>





<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/schema-index.js#L35" target="_blank" rel="noopener">metadata/schema-index.js, line 35</a></p></div>






        
    

    
        </div>

## Methods

<div class="jsdoc-content">

        
            

    

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

    



<div class="description">
    <p>Determines if the index is of composites kind</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/schema-index.js#L117" target="_blank" rel="noopener">metadata/schema-index.js, line 117</a></p></div>















<h5>Returns:</h5>

        


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


    </dd>
</dl>

    





        
            

    

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

    



<div class="description">
    <p>Determines if the index is of custom kind</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/schema-index.js#L131" target="_blank" rel="noopener">metadata/schema-index.js, line 131</a></p></div>















<h5>Returns:</h5>

        


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


    </dd>
</dl>

    





        
            

    

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

    



<div class="description">
    <p>Determines if the index is of keys kind</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/schema-index.js#L124" target="_blank" rel="noopener">metadata/schema-index.js, line 124</a></p></div>















<h5>Returns:</h5>

        


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


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id=".fromColumnRows"><span class="type-signature">(static) </span>fromColumnRows<span class="signature">(columnRows, columnsByName)</span><span class="type-signature"> &rarr; {Array&lt;Index>}</span></h4>
    

    



<div class="description">
    <p>Parses Index information from rows in the legacy 'system.schema_columns' 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>columnRows</code></td>
            

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


            
            </td>

            

            

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

    

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

            <td class="type">
            
                
<span class="param-type">Object&lt;String, {name, type}></span>


            
            </td>

            

            

            <td class="description last"></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/schema-index.js#L74" target="_blank" rel="noopener">metadata/schema-index.js, line 74</a></p></div>
<div class="admonition warning"><p class="admonition-title">Deprecated</p><p>It will be removed in the next major version.</p></div>















<h5>Returns:</h5>

        


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


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id=".fromRows"><span class="type-signature">(static) </span>fromRows<span class="signature">(indexRows)</span><span class="type-signature"> &rarr; {Array&lt;Index>}</span></h4>
    

    



<div class="description">
    <p>Parses Index information from rows in the 'system_schema.indexes' 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>indexRows</code></td>
            

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


            
            </td>

            

            

            <td class="description last"></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/schema-index.js#L53" target="_blank" rel="noopener">metadata/schema-index.js, line 53</a></p></div>
<div class="admonition warning"><p class="admonition-title">Deprecated</p><p>It will be removed in the next major version.</p></div>















<h5>Returns:</h5>

        


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


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