mozIStorageValueArray

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.

Please add a summary to this article.
  Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)

Inherits from: 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, [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

The zero-based numerical index for the column to get the data from.

Return value

One of the constants mozIStorageValueArray.VALUE_TYPE_NULL, mozIStorageValueArray.VALUE_TYPE_INTEGER, mozIStorageValueArray.VALUE_TYPE_FLOAT, mozIStorageValueArray.VALUE_TYPE_TEXT, or mozIStorageValueArray.VALUE_TYPE_BLOB describing the type aIndex is.

getInt32()

Obtains a from the specified index.

Note: SQLite is not a typed database, which means that any data type can be put into any cell, regardless of the type declared for the column and the database will attempt to convert it. Likewise, if you request a different type than the column type, SQLite will convert this value as well.

 long getInt32(
   in unsigned long aIndex
 );
Parameters
aIndex

The zero-based numerical index for the column to get the data from.

Return value

The undefined for the specified entry.

 

getInt64()

Obtains a from the specified index.

Note: SQLite is not a typed database, which means that any data type can be put into any cell, regardless of the type declared for the column and the database will attempt to convert it. Likewise, if you request a different type than the column type, SQLite will convert this value as well.

 long long getInt64(
   in unsigned long aIndex
 );
Parameters
aIndex

The zero-based numerical index for the column to get the data from.

Return value

The undefined for the specified entry.

getDouble()

Obtains a from the specified index.

Note: SQLite is not a typed database, which means that any data type can be put into any cell, regardless of the type declared for the column and the database will attempt to convert it. Likewise, if you request a different type than the column type, SQLite will convert this value as well.

 double getDouble(
   in unsigned long aIndex
 );
Parameters
aIndex

The zero-based numerical index for the column to get the data from.

Return value

The undefined for the specified entry.

 

getUTF8String()

Obtains a from the specified index.

Note: SQLite is not a typed database, which means that any data type can be put into any cell, regardless of the type declared for the column and the database will attempt to convert it. Likewise, if you request a different type than the column type, SQLite will convert this value as well.

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

The zero-based numerical index for the column to get the data from.

Return value

The undefined for the specified entry.

 

getString()

Obtains a from the specified index.

Note: SQLite is not a typed database, which means that any data type can be put into any cell, regardless of the type declared for the column and the database will attempt to convert it. Likewise, if you request a different type than the column type, SQLite will convert this value as well.

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

The zero-based numerical index for the column to get the data from.

Return value

The undefined for the specified entry.

getBlob()

Obtains a from the specified index.

Note: SQLite is not a typed database, which means that any data type can be put into any cell, regardless of the type declared for the column and the database will attempt to convert it. Likewise, if you request a different type than the column type, SQLite will convert this value as well.

 void getBlob(
   in unsigned long aIndex,
   out unsigned long aDataSize,
   [array,size_is(aDataSize)] out octet aData
 );
Parameters
aIndex

The zero-based numerical index for the column to get the data from.

aDataSize
The size of the returned array.
Return value

The undefined for the specified entry.

getIsNull()

Checks if given column index is NULL.

 boolean getIsNull(
   in unsigned long aIndex
 );
Parameters
aIndex

The zero-based numerical index for the column to get the data from.

Return value

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

See also

 

Document Tags and Contributors

Contributors to this page: Arehman4, sdwilsh, Boo, Sheppy
Last updated by: sdwilsh,