mozIStorageValueArray

  • Revision slug: mozIStorageValueArray
  • Revision title: mozIStorageValueArray
  • Revision id: 137648
  • Created:
  • Creator: sdwilsh
  • Is current revision? Yes
  • Comment 1 words removed

Revision Content

The mozIStorageValueArray interface obtains provides methods to obtain data from a given result.

For an introduction on how to use this interface, see the Storage overview document.

{{ InterfaceStatus("mozIStorageValueArray", "storage/public/mozIStorageValueArray.idl", "unfrozen", "Mozilla 1.8", "yes") }}

Inherits from: {{ interface("nsISupports") }}

Method overview

long getTypeOfIndex(in unsigned long aIndex);
long getInt32(in unsigned long aIndex);
long long getInt64(in unsigned long aIndex);
double getDouble(in unsigned long aIndex);
AUTF8String getUTF8String(in unsigned long aIndex);
AString getString(in unsigned long aIndex);
void getBlob(in unsigned long aIndex, out unsigned long aDataSize, {{ mediawiki.external('array,size_is(aDataSize)') }} out octet aData);
boolean getIsNull(in unsigned long aIndex);

Attributes

Attribute Type Description
numEntries unsigned long The number of entries in the array.

Constants

Constant Value Description
VALUE_TYPE_NULL 0 Null data type.
VALUE_TYPE_INTEGER 1 INTEGER data type.
VALUE_TYPE_FLOAT 2 FLOAT data type.
VALUE_TYPE_TEXT 3 TEXT data type.
VALUE_TYPE_BLOB 4 BLOB data type.

Methods

getTypeOfIndex()

Returns the type of the value at the given column index.

 long getTypeOfIndex(
   in unsigned long aIndex
 );
Parameters
aIndex
{{ Storage:value_getter_index_description() }}
Return value

One of the constants {{ ifconstant("mozIStorageValueArray", "VALUE_TYPE_NULL") }}, {{ ifconstant("mozIStorageValueArray", "VALUE_TYPE_INTEGER") }}, {{ ifconstant("mozIStorageValueArray", "VALUE_TYPE_FLOAT") }}, {{ ifconstant("mozIStorageValueArray", "VALUE_TYPE_TEXT") }}, or {{ ifconstant("mozIStorageValueArray", "VALUE_TYPE_BLOB") }} describing the type aIndex is.

getInt32()

{{ Storage:value_getter_by_index_description() }}

 long getInt32(
   in unsigned long aIndex
 );
Parameters
aIndex
{{ Storage:value_getter_index_description() }}
Return value

{{ Storage:value_getter_return_description() }} 

getInt64()

{{ Storage:value_getter_by_index_description() }}

 long long getInt64(
   in unsigned long aIndex
 );
Parameters
aIndex
{{ Storage:value_getter_index_description() }}
Return value

{{ Storage:value_getter_return_description() }}

getDouble()

{{ Storage:value_getter_by_index_description() }}

 double getDouble(
   in unsigned long aIndex
 );
Parameters
aIndex
{{ Storage:value_getter_index_description() }}
Return value

{{ Storage:value_getter_return_description() }} 

getUTF8String()

{{ Storage:value_getter_by_index_description() }}

{{ Note("C++ callers should be aware that a string value for a <tt>NULL</tt> column has <tt>IsVoid</tt> set to distinguish it from an empty string.") }}

 AUTF8String getUTF8String(
   in unsigned long aIndex
 );
Parameters
aIndex
{{ Storage:value_getter_index_description() }}
Return value

{{ Storage:value_getter_return_description() }} 

getString()

{{ Storage:value_getter_by_index_description() }}

{{ Note("C++ callers should be aware that a string value for a <tt>NULL</tt> column has <tt>IsVoid</tt> set to distinguish it from an empty string.") }}

 AString getString(
   in unsigned long aIndex
 );
Parameters
aIndex
{{ Storage:value_getter_index_description() }}
Return value

{{ Storage:value_getter_return_description() }}

getBlob()

{{ Storage:value_getter_by_index_description() }}

 void getBlob(
   in unsigned long aIndex,
   out unsigned long aDataSize,
   [array,size_is(aDataSize)] out octet aData
 );
Parameters
aIndex
{{ Storage:value_getter_index_description() }}
aDataSize
The size of the returned array.
Return value

{{ Storage:value_getter_return_description() }}

getIsNull()

Checks if given column index is NULL.

 boolean getIsNull(
   in unsigned long aIndex
 );
Parameters
aIndex
{{ Storage:value_getter_index_description() }}
Return value

Returns true if the column specified by aIndex is NULL, or false otherwise.

See also

 

Revision Source

<p>The <code>mozIStorageValueArray</code> interface obtains provides methods to obtain data from a given result.</p>
<p>For an introduction on how to use this interface, see the <a href="/en/Storage" title="Storage">Storage overview document</a>.</p>
<p>{{ InterfaceStatus("mozIStorageValueArray", "storage/public/mozIStorageValueArray.idl", "unfrozen", "Mozilla 1.8", "yes") }}</p>
<p>Inherits from: {{ interface("nsISupports") }}</p>
<h2 id="Method_overview" name="Method_overview">Method overview</h2>
<table class="standard-table"> <tbody> <tr> <td><code>long <a href="#getTypeOfIndex()">getTypeOfIndex</a>(in unsigned long aIndex);</code></td> </tr> <tr> <td><code>long <a href="#getInt32()">getInt32</a>(in unsigned long aIndex);</code></td> </tr> <tr> <td><code>long long <a href="#getInt64()">getInt64</a>(in unsigned long aIndex);</code></td> </tr> <tr> <td><code>double <a href="#getDouble()">getDouble</a>(in unsigned long aIndex);</code></td> </tr> <tr> <td><code>AUTF8String <a href="#getUTF8String()">getUTF8String</a>(in unsigned long aIndex);</code></td> </tr> <tr> <td><code>AString <a href="#getString()">getString</a>(in unsigned long aIndex);</code></td> </tr> <tr> <td><code>void <a href="#getBlob()">getBlob</a>(in unsigned long aIndex, out unsigned long aDataSize, {{ mediawiki.external('array,size_is(aDataSize)') }} out octet aData);</code></td> </tr> <tr> <td><code>boolean <a href="#getIsNull()">getIsNull</a>(in unsigned long aIndex);</code></td> </tr> </tbody>
</table>
<h2 id="Attributes" name="Attributes">Attributes</h2>
<table class="standard-table"> <tbody> <tr> <td class="header">Attribute</td> <td class="header">Type</td> <td class="header">Description</td> </tr> <tr> <td><code>numEntries</code></td> <td><code>unsigned long</code></td> <td>The number of entries in the array.</td> </tr> </tbody>
</table>
<h2 id="Constants" name="Constants">Constants</h2>
<table class="standard-table"> <tbody> <tr> <td class="header">Constant</td> <td class="header">Value</td> <td class="header">Description</td> </tr> <tr> <td><code>VALUE_TYPE_NULL</code></td> <td>0</td> <td>Null data type.</td> </tr> <tr> <td><code>VALUE_TYPE_INTEGER</code></td> <td>1</td> <td><code>INTEGER</code> data type.</td> </tr> <tr> <td><code>VALUE_TYPE_FLOAT</code></td> <td>2</td> <td><code>FLOAT</code> data type.</td> </tr> <tr> <td><code>VALUE_TYPE_TEXT</code></td> <td>3</td> <td><code>TEXT</code> data type.</td> </tr> <tr> <td><code>VALUE_TYPE_BLOB</code></td> <td>4</td> <td><code>BLOB</code> data type.</td> </tr> </tbody>
</table>
<h2 id="Methods" name="Methods">Methods</h2>
<h3 id="getTypeOfIndex.28.29" name="getTypeOfIndex.28.29">getTypeOfIndex()</h3>
<p>Returns the type of the value at the given column index.</p>
<pre class="eval"> long getTypeOfIndex(
   in unsigned long aIndex
 );
</pre>
<h6 id="Parameters" name="Parameters">Parameters</h6>
<dl><dt><code>aIndex</code> </dt><dd>{{ Storage:value_getter_index_description() }}</dd></dl>
<h6 id="Return_value" name="Return_value">Return value</h6>
<p>One of the constants {{ ifconstant("mozIStorageValueArray", "VALUE_TYPE_NULL") }}, {{ ifconstant("mozIStorageValueArray", "VALUE_TYPE_INTEGER") }}, {{ ifconstant("mozIStorageValueArray", "VALUE_TYPE_FLOAT") }}, {{ ifconstant("mozIStorageValueArray", "VALUE_TYPE_TEXT") }}, or {{ ifconstant("mozIStorageValueArray", "VALUE_TYPE_BLOB") }} describing the type <code>aIndex</code> is.</p>
<h3 id="getInt32.28.29" name="getInt32.28.29">getInt32()</h3>
<p>{{ Storage:value_getter_by_index_description() }}</p>
<pre class="eval"> long getInt32(
   in unsigned long aIndex
 );
</pre>
<h6 id="Parameters_2" name="Parameters_2">Parameters</h6>
<dl><dt><code>aIndex</code> </dt><dd>{{ Storage:value_getter_index_description() }} </dd></dl>
<h6 id="Return_value_2" name="Return_value_2">Return value</h6>
<p>{{ Storage:value_getter_return_description() }} </p>
<h3 id="getInt64.28.29" name="getInt64.28.29">getInt64()</h3>
<p>{{ Storage:value_getter_by_index_description() }}</p>
<pre class="eval"> long long getInt64(
   in unsigned long aIndex
 );
</pre>
<h6 id="Parameters_3" name="Parameters_3">Parameters</h6>
<dl><dt><code>aIndex</code> </dt><dd>{{ Storage:value_getter_index_description() }} </dd></dl>
<h6 id="Return_value_3" name="Return_value_3">Return value</h6>
<p>{{ Storage:value_getter_return_description() }}</p>
<h3 id="getDouble.28.29" name="getDouble.28.29">getDouble()</h3>
<p>{{ Storage:value_getter_by_index_description() }}</p>
<pre class="eval"> double getDouble(
   in unsigned long aIndex
 );
</pre>
<h6 id="Parameters_4" name="Parameters_4">Parameters</h6>
<dl><dt><code>aIndex</code> </dt><dd>{{ Storage:value_getter_index_description() }} </dd></dl>
<h6 id="Return_value_4" name="Return_value_4">Return value</h6>
<p>{{ Storage:value_getter_return_description() }} </p>
<h3 id="getUTF8String.28.29" name="getUTF8String.28.29">getUTF8String()</h3>
<p>{{ Storage:value_getter_by_index_description() }}</p>
<p>{{ Note("C++ callers should be aware that a string value for a <tt>NULL</tt> column has <tt>IsVoid</tt> set to distinguish it from an empty string.") }}</p>
<pre class="eval"> AUTF8String getUTF8String(
   in unsigned long aIndex
 );
</pre>
<h6 id="Parameters_5" name="Parameters_5">Parameters</h6>
<dl><dt><code>aIndex</code> </dt><dd>{{ Storage:value_getter_index_description() }} </dd></dl>
<h6 id="Return_value_5" name="Return_value_5">Return value</h6>
<p>{{ Storage:value_getter_return_description() }} </p>
<h3 id="getString.28.29" name="getString.28.29">getString()</h3>
<p>{{ Storage:value_getter_by_index_description() }}</p>
<p>{{ Note("C++ callers should be aware that a string value for a <tt>NULL</tt> column has <tt>IsVoid</tt> set to distinguish it from an empty string.") }}</p>
<pre class="eval"> AString getString(
   in unsigned long aIndex
 );
</pre>
<h6 id="Parameters_6" name="Parameters_6">Parameters</h6>
<dl><dt><code>aIndex</code> </dt><dd>{{ Storage:value_getter_index_description() }} </dd></dl>
<h6 id="Return_value_6" name="Return_value_6">Return value</h6>
<p>{{ Storage:value_getter_return_description() }}</p>
<h3 id="getBlob.28.29" name="getBlob.28.29">getBlob()</h3>
<p>{{ Storage:value_getter_by_index_description() }}</p>
<pre class="eval"> void getBlob(
   in unsigned long aIndex,
   out unsigned long aDataSize,
   [array,size_is(aDataSize)] out octet aData
 );
</pre>
<h6 id="Parameters_7" name="Parameters_7">Parameters</h6>
<dl><dt><code>aIndex</code> </dt><dd>{{ Storage:value_getter_index_description() }} </dd><dt><code>aDataSize</code> </dt><dd>The size of the returned array.</dd></dl>
<h6 id="Return_value_6" name="Return_value_6">Return value</h6>
<p>{{ Storage:value_getter_return_description() }}</p>
<h3 id="getIsNull.28.29" name="getIsNull.28.29">getIsNull()</h3>
<p>Checks if given column index is <code>NULL</code>.</p>
<pre class="eval"> boolean getIsNull(
   in unsigned long aIndex
 );
</pre>
<h6 id="Parameters_8" name="Parameters_8">Parameters</h6>
<dl><dt><code>aIndex</code> </dt><dd>{{ Storage:value_getter_index_description() }} </dd></dl>
<h6 id="Return_value_7" name="Return_value_7">Return value</h6>
<p>Returns <code>true</code> if the column specified by <code>aIndex</code> is <code>NULL</code>, or false otherwise.</p><h2 id="See_also" name="See_also">See also</h2>
<ul> <li><a href="/en/Storage" title="en/Storage">Storage</a> introduction and how-to article</li> <li><a href="/en/mozIStorageConnection" title="en/mozIStorageConnection">mozIStorageConnection</a> Database connection to a specific file or in-memory data storage</li> <li><a href="/en/mozIStorageStatement" title="en/mozIStorageStatement">mozIStorageStatement</a> Create and execute SQL statements on a SQLite database.</li> <li><a href="/en/mozIStorageFunction" title="en/mozIStorageFunction">mozIStorageFunction</a> Create a new SQLite function.</li> <li><a href="/en/MozIStorageAggregateFunction" title="en/MozIStorageAggregateFunction">mozIStorageAggregateFunction</a> Create a new SQLite aggregate function.</li> <li><a href="/en/mozIStorageProgressHandler" title="en/mozIStorageProgressHandler">mozIStorageProgressHandler</a> Monitor progress during the execution of a statement.</li> <li><a href="/en/mozIStorageStatementWrapper" title="en/mozIStorageStatementWrapper">mozIStorageStatementWrapper</a> Storage statement wrapper</li>
</ul>
<p> </p>
Revert to this revision