# ResultColumnsCache

<div class="jsdoc-content"><header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>ResultColumnsCache<span class="signature">()</span><span class="type-signature"></span></h2>
        
            <div class="class-description"><p>Converted result columns of one prepared statement handle.</p>
<p>Goal: cache the converted result metadata (column names and types) on the JS side.
Converting it from Rust to JS takes many N-API calls per column. Without the cache,
this conversion runs for each result. With it, it runs only when the result metadata
of the prepared statement changes.</p>
<p>Rust tags each result of the handle with a metadata generation.
The same generation means the same column names and types,
so the converted columns are reused until the generation changes.</p></div>
        
    
</header>


    
        

    
    </div>

## Constructor

<div class="jsdoc-content">
    

    
    <h4 class="name" id="ResultColumnsCache"><span class="type-signature"></span>new ResultColumnsCache<span class="signature">()</span><span class="type-signature"></span></h4>
    

    















<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/results-wrapper.ts#L98" target="_blank" rel="noopener">types/results-wrapper.ts, line 98</a></p></div>




















    
    

    

    

    

    

    

    

    

    
        </div>

## Methods

<div class="jsdoc-content">

        
            

    

    
    <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns the columns of the result, converting them only when the generation changes.</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/results-wrapper.ts#L103" target="_blank" rel="noopener">types/results-wrapper.ts, line 103</a></p></div></div>
