WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

mozIStorageValueArray

IID:07b5b93e-113c-4150-863c-d247b003a55d
Inherits From:nsISupports

MozIStorageValueArray wraps an array of SQL values, such as a single database row.


Constants

These type values are returned by getTypeOfIndex to indicate what type of value is present at a given column.
PRInt32 VALUE_TYPE_NULL = 0
PRInt32 VALUE_TYPE_INTEGER = 1
PRInt32 VALUE_TYPE_FLOAT = 2
PRInt32 VALUE_TYPE_TEXT = 3
PRInt32 VALUE_TYPE_BLOB = 4

Properties

readonly PRUint32 numEntries

NumEntries

Number of entries in the array (each corresponding to a column in the database row)


Methods

void getBlob ( PRUint32 index , out PRUint32 dataSize , out arrayof PRUint8 data ) double getDouble ( PRUint32 index ) PRInt32 getInt32 ( PRUint32 index ) PRInt64 getInt64 ( PRUint32 index ) PRBool getIsNull ( PRUint32 index ) [noscript] void getSharedBlob ( PRUint32 index , out PRUint32 length , out octetPtr* result ) [noscript] void getSharedString ( PRUint32 index , out PRUint32 length , out PRUnichar* result ) [noscript] void getSharedUTF8String ( PRUint32 index , out PRUint32 length , out char* result ) AString getString ( PRUint32 index ) PRInt32 getTypeOfIndex ( PRUint32 index ) AUTF8String getUTF8String ( PRUint32 index )

void getBlob ( PRUint32 index , out PRUint32 dataSize , out arrayof PRUint8 data )

Arguments:
index
dataSize
data

double getDouble ( PRUint32 index )

Arguments:
index

PRInt32 getInt32 ( PRUint32 index )

Obtain a value for the given entry (column) index. Due to SQLite's type conversion rules, any of these are valid for any column regardless of the column's data type. However, if the specific type matters, getTypeOfIndex should be used first to identify the column type, and then the appropriate get method should be called.

If you ask for a string value for a NULL column, you will get an empty string with IsVoid set to distinguish it from an explicitly set empty string.

Arguments:
index

PRInt64 getInt64 ( PRUint32 index )

Arguments:
index

PRBool getIsNull ( PRUint32 index )

Arguments:
index

void getSharedBlob ( PRUint32 index , out PRUint32 length , out octetPtr* result )

Arguments:
index
length
result

void getSharedString ( PRUint32 index , out PRUint32 length , out PRUnichar* result )

Arguments:
index
length
result

void getSharedUTF8String ( PRUint32 index , out PRUint32 length , out char* result )

Returns a shared string pointer

Arguments:
index
length
result

AString getString ( PRUint32 index )

Arguments:
index

PRInt32 getTypeOfIndex ( PRUint32 index )

Returns the type of the value at the given column index; one of VALUE_TYPE_NULL, VALUE_TYPE_INTEGER, VALUE_TYPE_FLOAT, VALUE_TYPE_TEXT, VALUE_TYPE_BLOB.

Arguments:
index

AUTF8String getUTF8String ( PRUint32 index )

Arguments:
index

References

This interface is passed as an argument to the following methods:

mozIStorageAggregateFunction.onStep, mozIStorageFunction.onFunctionCall

Reference documentation is generated from Mozilla's source.