# Global Functions and Constants

<div class="jsdoc-content"><header>
    
        <h2></h2>
        
    
</header>


    
        

        





        
    
    

    

    

    

    

    

    

    
        </div>

## Members

<div class="jsdoc-content">

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




<div class="description">
    <p>The buffer size of a new <a href="FrameWriter.html">FrameWriter</a>.</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/frame-writer.ts#L12" target="_blank" rel="noopener">frame-writer.ts, line 12</a></p></div>






        
            
<h4 class="name" id="Integer"><span class="type-signature">(constant) </span>Integer<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/encoder.ts#L10" target="_blank" rel="noopener">encoder.ts, line 10</a></p></div>
<div class="admonition warning"><p class="admonition-title">Deprecated</p><p>Integer is deprecated. See \`./types/integer.ts\`</p></div>






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




<div class="description">
    <p>Largest value count that the <code>[short]</code> count of a frame can hold.</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/frame-writer.ts#L8" target="_blank" rel="noopener">frame-writer.ts, line 8</a></p></div>






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




<div class="description">
    <p>A <a href="FrameWriter.html">FrameWriter</a> keeps its buffer between frames up to this size.
After a larger frame, it starts again with a small buffer.</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/frame-writer.ts#L17" target="_blank" rel="noopener">frame-writer.ts, line 17</a></p></div>






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




<div class="description">
    <p>Contains the methods for reading and writing vints into binary format.
Exposes only 2 internal methods, the rest are hidden.</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/utils.ts#L941" target="_blank" rel="noopener">utils.ts, line 941</a></p></div>






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




<div class="description">
    <p>Highest value of the ring, and its inclusive end.</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/token.ts#L19" target="_blank" rel="noopener">token.ts, line 19</a></p></div>






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




<div class="description">
    <p>The token the ring starts at, exclusively, and ends at, inclusively: the range
]minToken, minToken] covers the whole 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.7.1/lib/token.ts#L80" target="_blank" rel="noopener">token.ts, line 80</a></p></div>






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




<div class="description">
    <p>Lowest value of the ring: not a valid token, but the exclusive start of 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.7.1/lib/token.ts#L15" target="_blank" rel="noopener">token.ts, line 15</a></p></div>






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




<div class="description">
    <p>Number of values the ring spans, used to wrap around its end.</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/token.ts#L23" target="_blank" rel="noopener">token.ts, line 23</a></p></div>






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




<div class="description">
    <p>Core connections per host for protocol versions 1 and 2</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/client-options.ts#L644" target="_blank" rel="noopener">client-options.ts, line 644</a></p></div>






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




<div class="description">
    <p>Core connections per host for protocol version 3 and above</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/client-options.ts#L651" target="_blank" rel="noopener">client-options.ts, line 651</a></p></div>






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




<div class="description">
    <p>FinalizationRegistry that ensures the Rust logging callback is unregistered
when a Client instance is garbage-collected without being explicitly shut down.</p>
<p>While in general FinalizationRegistry usage is discouraged, we use it here
to avoid blocking the client from being cleaned up, once it's no longer used by the user,
and also clean up all the resources in the process.
This justifies using finalization registry, despite heavy warnings against it in the documentation.</p>
<p>To understand more, check the JS documentation.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry</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/client.ts#L66" target="_blank" rel="noopener">client.ts, line 66</a></p></div>






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




<div class="description">
    <p>Max int that can be accurately represented with 64-bit Number (2^53)</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/utils.ts#L27" target="_blank" rel="noopener">utils.ts, line 27</a></p></div>






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




<div class="description">
    <p>Default maxRequestsPerConnection value for protocol v1 and v2</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/client-options.ts#L658" target="_blank" rel="noopener">client-options.ts, line 658</a></p></div>






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




<div class="description">
    <p>Default maxRequestsPerConnection value for protocol v3+</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/client-options.ts#L661" target="_blank" rel="noopener">client-options.ts, line 661</a></p></div>






        
    

    
        </div>

## Methods

<div class="jsdoc-content">

        
            

    

    
    <h4 class="name" id="_split"><span class="type-signature"></span>_split<span class="signature">(start, end, numberOfSplits)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Splits the range ]start, end] into <code>numberOfSplits</code> parts of equal &quot;size&quot; (referring to the
number of tokens, not the actual amount of data), returning the tokens the parts are split at.</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">
            
            </td>

            

            

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

    

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

            <td class="type">
            
            </td>

            

            

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

    

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

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Number of splits to make.</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.7.1/lib/token.ts#L91" target="_blank" rel="noopener">token.ts, line 91</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The <code>numberOfSplits - 1</code> points the range is split at.</p>
</div>



    





        
            

    

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

    



<div class="description">
    <p>Adapts the parameters based on the prepared metadata.
This function assumes params are passed as an associative array (Object),
and it adapts the object into an array with the same order as bound parameters in the prepared statement.</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/utils.ts#L321" target="_blank" rel="noopener">utils.ts, line 321</a></p></div>













<h5>Throws:</h5>

        

<dl>
    <dt>
        <div class="param-desc">
        <p>In case a parameter with a specific name is not defined.</p>
        </div>
    </dt>
    <dd></dd>
    <dt>
        <dl>
            <dt>
                Type
            </dt>
            <dd>
                
<span class="param-type">Error</span>


            </dd>
        </dl>
    </dt>
    <dd></dd>
</dl>


    


<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns an array of parameters.</p>
</div>



    





        
            

    

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

    



<div class="description">
    <p>Adapts the associative-array of parameters and hints for simple statements
into Arrays based on the (arbitrary) position of the keys.</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/utils.ts#L344" target="_blank" rel="noopener">utils.ts, line 344</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns an array of
parameters and the keys as an associative array.</p>
</div>



    





        
            

    

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

    



<div class="description">
    <p>Ensure the value is one of the accepted numeric types, and convert them to BigInt.</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/new-utils.ts#L43" target="_blank" rel="noopener">new-utils.ts, line 43</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Uses the iterator protocol to go through the items of the Array</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/utils.ts#L231" target="_blank" rel="noopener">utils.ts, line 231</a></p></div>




















        
            

    

    
    <h4 class="name" id="asDouble"><span class="type-signature"></span>asDouble<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/datastax/graph/wrappers.js#L15" target="_blank" rel="noopener">datastax/graph/wrappers.js, line 15</a></p></div>
<div class="admonition warning"><p class="admonition-title">Deprecated</p><p>Not supported by the driver. Usage will throw an error.</p></div>




















        
            

    

    
    <h4 class="name" id="asFloat"><span class="type-signature"></span>asFloat<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/datastax/graph/wrappers.js#L22" target="_blank" rel="noopener">datastax/graph/wrappers.js, line 22</a></p></div>
<div class="admonition warning"><p class="admonition-title">Deprecated</p><p>Not supported by the driver. Usage will throw an error.</p></div>




















        
            

    

    
    <h4 class="name" id="asInt"><span class="type-signature"></span>asInt<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/datastax/graph/wrappers.js#L8" target="_blank" rel="noopener">datastax/graph/wrappers.js, line 8</a></p></div>
<div class="admonition warning"><p class="admonition-title">Deprecated</p><p>Not supported by the driver. Usage will throw an error.</p></div>




















        
            

    

    
    <h4 class="name" id="asTimestamp"><span class="type-signature"></span>asTimestamp<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/datastax/graph/wrappers.js#L29" target="_blank" rel="noopener">datastax/graph/wrappers.js, line 29</a></p></div>
<div class="admonition warning"><p class="admonition-title">Deprecated</p><p>Not supported by the driver. Usage will throw an error.</p></div>




















        
            

    

    
    <h4 class="name" id="asUdt"><span class="type-signature"></span>asUdt<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/datastax/graph/wrappers.js#L36" target="_blank" rel="noopener">datastax/graph/wrappers.js, line 36</a></p></div>
<div class="admonition warning"><p class="admonition-title">Deprecated</p><p>Not supported by the driver. Usage will throw an error.</p></div>




















        
            

    

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

    



<div class="description">
    <p>Converts from bigint provided by napi into Long type.
BigInt is the way napi handles values too big for js Number type,
while Long is the legacy way the code handles 64-bit integers.</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/new-utils.ts#L29" target="_blank" rel="noopener">new-utils.ts, line 29</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Searches the specified Array for the provided key using the binary
search algorithm.  The Array must be sorted.</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>key</code></td>
            

            <td class="type">
            
            </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.7.1/lib/utils.ts#L256" target="_blank" rel="noopener">utils.ts, line 256</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The position of the key in the Array, if it is found.
If it is not found, it returns a negative number which is the bitwise complement of the index of the first element that is larger than key.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="callbackOnce"><span class="type-signature"></span>callbackOnce<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/utils.ts#L48" target="_blank" rel="noopener">utils.ts, line 48</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns a wrapper function that invokes the underlying callback only once.</p>
</div>



    





        
            

    

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

    



<div class="description">
    <p>Convert rust ComplexType into type representation used in the driver encoder</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/cql-utils.ts#L87" target="_blank" rel="noopener">types/cql-utils.ts, line 87</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>According to the TS type definition, SecureVersion (the value we are handling here),
can be one of the following:
type SecureVersion = &quot;TLSv1.3&quot; | &quot;TLSv1.2&quot; | &quot;TLSv1.1&quot; | &quot;TLSv1&quot;;</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/client-options.ts#L1112" target="_blank" rel="noopener">client-options.ts, line 1112</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Creates a copy of a buffer</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/utils.ts#L60" target="_blank" rel="noopener">utils.ts, line 60</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Extends the target by the most inner props of sources</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/utils.ts#L170" target="_blank" rel="noopener">utils.ts, line 170</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Creates a non-clearable timer that resolves the promise once elapses.</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/promise-utils.ts#L18" target="_blank" rel="noopener">promise-utils.ts, line 18</a></p></div>




















        
            

    

    
    <h4 class="name" id="ensure32SignedInteger"><span class="type-signature"></span>ensure32SignedInteger<span class="signature">(number, name)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Checks whether the number is a 32 bit signed integer.
Throws an error, when a value that cannot be represented as i32 is passed.</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>number</code></td>
            

            <td class="type">
            
            </td>

            

            

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

    

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

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>used in the thrown error</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.7.1/lib/new-utils.ts#L102" target="_blank" rel="noopener">new-utils.ts, line 102</a></p></div>













<h5>Throws:</h5>

        

    <div class="param-desc">
    
        
<span class="param-type">TypeError</span>


    
    </div>


    







        
            

    

    
    <h4 class="name" id="ensure64SignedInteger"><span class="type-signature"></span>ensure64SignedInteger<span class="signature">(number, name)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Checks whether the number is a 64 bit signed integer.
Throws an error, when a value that cannot be represented as i64 is passed.</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>number</code></td>
            

            <td class="type">
            
            </td>

            

            

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

    

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

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>used in the thrown error</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.7.1/lib/new-utils.ts#L130" target="_blank" rel="noopener">new-utils.ts, line 130</a></p></div>













<h5>Throws:</h5>

        

    <div class="param-desc">
    
        
<span class="param-type">TypeError</span>


    
    </div>


    







        
            

    

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

    



<div class="description">
    <p>Extends and validates the user options</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>baseOptions</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The source object instance that will be overridden</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.7.1/lib/client-options.ts#L724" target="_blank" rel="noopener">client-options.ts, line 724</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Merge the contents of two or more objects together into the first object. Similar to jQuery.extend / Object.assign.
The main difference between this method is that declared properties with an <code>undefined</code> value are not set
to the target.</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/utils.ts#L134" target="_blank" rel="noopener">utils.ts, line 134</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Appends the original stack trace to the error after a tick of the event loop</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/utils.ts#L69" target="_blank" rel="noopener">utils.ts, line 69</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Creates a Promise from a callback based function.</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/promise-utils.ts#L43" target="_blank" rel="noopener">promise-utils.ts, line 43</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Creates a Promise that gets resolved or rejected based on an event.</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/promise-utils.ts#L25" target="_blank" rel="noopener">promise-utils.ts, line 25</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Gets a function that has the signature of a callback that invokes the appropriate promise handler parameters.</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/promise-utils.ts#L60" target="_blank" rel="noopener">promise-utils.ts, line 60</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Simple way of getting results from rust driver.
Calls the driver, decoding the whole page at once.</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>columnsCache</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Converted columns of the prepared handle that produced the result, when available.</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.7.1/lib/types/results-wrapper.ts#L128" target="_blank" rel="noopener">types/results-wrapper.ts, line 128</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns array of rows if the result is of the RowsResult kind, and undefined otherwise</p>
</div>



    





        
            

    

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

    



<div class="description">
    <p>Derives the hex string representation of a host id from a host id's raw bytes.</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/host.ts#L24" target="_blank" rel="noopener">host.ts, line 24</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Returns the first not undefined param</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/utils.ts#L453" target="_blank" rel="noopener">utils.ts, line 453</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Returns the first not undefined param</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/utils.ts#L460" target="_blank" rel="noopener">utils.ts, line 460</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Inserts the value in the position determined by its natural order determined by the compare func</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>item</code></td>
            

            <td class="type">
            
            </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.7.1/lib/utils.ts#L285" target="_blank" rel="noopener">utils.ts, line 285</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Returns true when params is a named (object) parameter set rather than an array.</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/new-utils.ts#L172" target="_blank" rel="noopener">new-utils.ts, line 172</a></p></div>













<h5>Throws:</h5>

        

<dl>
    <dt>
        <div class="param-desc">
        <p>In case params are of unexpected type</p>
        </div>
    </dt>
    <dd></dd>
    <dt>
        <dl>
            <dt>
                Type
            </dt>
            <dd>
                
<span class="param-type">ArgumentError</span>


            </dd>
        </dl>
    </dt>
    <dd></dd>
</dl>


    







        
            

    

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

    



<div class="description">
    <p>Convert the iterator values into an array</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>iterator</code></td>
            

            <td class="type">
            
            </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.7.1/lib/utils.ts#L239" target="_blank" rel="noopener">utils.ts, line 239</a></p></div>




















        
            

    

    
    <h4 class="name" id="log"><span class="type-signature"></span>log<span class="signature">(furtherInfo<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Uses the logEmitter to emit log events.
Respects the <code>logLevel</code> option — events below the configured severity are suppressed.</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>furtherInfo</code></td>
            

            <td class="type">
            
            </td>

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

                

                
                </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.7.1/lib/utils.ts#L83" target="_blank" rel="noopener">utils.ts, line 83</a></p></div>




















        
            

    

    
    <h4 class="name" id="newQueryPlan"><span class="type-signature"></span>newQueryPlan<span class="signature">(lbp, keyspace, executionOptions)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Invokes the new query plan of the load balancing policy and returns a Promise.</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>lbp</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The load balancing policy.</p></td>
        </tr>

    

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

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Name of currently logged keyspace at <code>Client</code> level.</p></td>
        </tr>

    

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

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The information related to the execution of the request.</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.7.1/lib/promise-utils.ts#L90" target="_blank" rel="noopener">promise-utils.ts, line 90</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Normalizes a key that can be either a string or a buffer into a string.</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">
            
            </td>

            

            

            <td class="description last"><p>Name of the option being normalized, used for error messages</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.7.1/lib/client-options.ts#L1095" target="_blank" rel="noopener">client-options.ts, line 1095</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>This function normalizes the type, and combines all possible page state sources.</p>
<p>Page state can come from two sources:</p>
<ul>
<li>pageState variable: when we execute the following page of the query</li>
<li>execOptions: when the user start a new query from requested state</li>
</ul>
<p>PageState has a priority over execOptions, as execOptions.pageState
will not be cleared for the following pages of the execution.</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/client.ts#L1110" target="_blank" rel="noopener">client.ts, line 1110</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Normalizes SSL options to be passed to the Rust layer.
The SslOptions class can have values as multiple types,
while the Rust code expects a specific format.
We could do this at the napi layer by trying all accepted types
until we successfully convert it, but we can also convert it here.</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/client-options.ts#L1139" target="_blank" rel="noopener">client-options.ts, line 1139</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Returns an array containing the values of the Object, similar to Object.values().
If obj is null or undefined, it will return an empty array.</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/utils.ts#L402" target="_blank" rel="noopener">utils.ts, line 402</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Method that handles optional callbacks (dual promise and callback support).
When callback is undefined it returns the promise.
When using a callback, it will use it as handlers of the continuation of the promise.</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/promise-utils.ts#L111" target="_blank" rel="noopener">promise-utils.ts, line 111</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Wraps the callback-based method. When no originalCallback is not defined, it returns a Promise.</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/utils.ts#L419" target="_blank" rel="noopener">utils.ts, line 419</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Rejects legacy timeout settings that would otherwise be silently ignored.
Only socketOptions.readTimeout may retain its built-in 12000 ms default;
query and execution-profile settings have no such default.</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/new-utils.ts#L83" target="_blank" rel="noopener">new-utils.ts, line 83</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Similar to async.series(), but instead accumulating the result in an Array, it callbacks with the result of the last
function in the array.</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/utils.ts#L759" target="_blank" rel="noopener">utils.ts, line 759</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Sets the default options that depend on the protocol version and other 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.7.1/lib/client-options.ts#L1211" target="_blank" rel="noopener">client-options.ts, line 1211</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Returns the string representation of a given socket address.</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/host.ts#L15" target="_blank" rel="noopener">host.ts, line 15</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Returns a string with a value repeated n times</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/utils.ts#L383" target="_blank" rel="noopener">utils.ts, line 383</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Internal utility for marking not supported endpoints.</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">
            
            </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.7.1/lib/new-utils.ts#L16" target="_blank" rel="noopener">new-utils.ts, line 16</a></p></div>













<h5>Throws:</h5>

        

    <div class="param-desc">
    
        
<span class="param-type">ReferenceError</span>


    
    </div>


    







        
            

    

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

    



<div class="description">
    <p>Invokes the provided function multiple times, considering the concurrency level limit.</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/promise-utils.ts#L125" target="_blank" rel="noopener">promise-utils.ts, line 125</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Deals with unexpected rejections in order to avoid the unhandled promise rejection warning or failure.</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/promise-utils.ts#L150" target="_blank" rel="noopener">promise-utils.ts, line 150</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Invokes the callback once outside the promise chain the promise is resolved or rejected.</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/promise-utils.ts#L157" target="_blank" rel="noopener">promise-utils.ts, line 157</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Returns a new object with the property names set to lowercase.</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/utils.ts#L155" target="_blank" rel="noopener">utils.ts, line 155</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Gets the sum of the length of the items of an array</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/utils.ts#L116" target="_blank" rel="noopener">utils.ts, line 116</a></p></div>




















        
            

    

    
    <h4 class="name" id="validateFn"><span class="type-signature"></span>validateFn<span class="signature">(fn, name)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Validates the provided parameter is of type function.</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>fn</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The instance to validate.</p></td>
        </tr>

    

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

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Name of the function to use in the error message. Defaults to 'callback'.</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.7.1/lib/utils.ts#L305" target="_blank" rel="noopener">utils.ts, line 305</a></p></div>




















        
            

    

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

    



<div class="description">
    <p>Validates a request timeout before it crosses the N-API boundary as an i32.
<code>undefined</code> means that the caller should use the next value in the option
precedence chain.</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/new-utils.ts#L62" target="_blank" rel="noopener">new-utils.ts, line 62</a></p></div></div>
