Public Member Functions | Public Attributes

mozIStorageValueArray Interface Reference

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

import "mozIStorageValueArray.idl";

Inheritance diagram for mozIStorageValueArray:

List of all members.

Public Member Functions

long getTypeOfIndex (in unsigned long aIndex)
 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.
long getInt32 (in unsigned long aIndex)
 Obtain a value for the given entry (column) index.
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)
void getSharedUTF8String (in unsigned long aIndex, out unsigned long aLength,[shared, retval] out string aResult)
 Returns a shared string pointer.
void getSharedString (in unsigned long aIndex, out unsigned long aLength,[shared, retval] out wstring aResult)
void getSharedBlob (in unsigned long aIndex, out unsigned long aLength,[shared, retval] out octetPtr aResult)
PRInt32 AsInt32 (PRUint32 idx)
 Getters for native code that return their values as the return type, for convenience and sanity.
PRInt64 AsInt64 (PRUint32 idx)
double AsDouble (PRUint32 idx)
const char * AsSharedUTF8String (PRUint32 idx, PRUint32 *len)
const PRUnicharAsSharedWString (PRUint32 idx, PRUint32 *len)
const PRUint8 * AsSharedBlob (PRUint32 idx, PRUint32 *len)
PRBool IsNull (PRUint32 idx)

Public Attributes

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

Detailed Description

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


Member Function Documentation

double mozIStorageValueArray::AsDouble ( PRUint32  idx  )  [inline]
PRInt32 mozIStorageValueArray::AsInt32 ( PRUint32  idx  )  [inline]

Getters for native code that return their values as the return type, for convenience and sanity.

Not virtual; no vtable bloat.

PRInt64 mozIStorageValueArray::AsInt64 ( PRUint32  idx  )  [inline]
const PRUint8* mozIStorageValueArray::AsSharedBlob ( PRUint32  idx,
PRUint32 *  len 
) [inline]
const char* mozIStorageValueArray::AsSharedUTF8String ( PRUint32  idx,
PRUint32 *  len 
) [inline]
const PRUnichar* mozIStorageValueArray::AsSharedWString ( PRUint32  idx,
PRUint32 *  len 
) [inline]
void mozIStorageValueArray::getBlob ( in unsigned long  aIndex,
out unsigned long  aDataSize,
[array, size_is(aDataSize)] out octet  aData 
)
double mozIStorageValueArray::getDouble ( in unsigned long  aIndex  ) 
long mozIStorageValueArray::getInt32 ( in unsigned long  aIndex  ) 

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.

long long mozIStorageValueArray::getInt64 ( in unsigned long  aIndex  ) 
boolean mozIStorageValueArray::getIsNull ( in unsigned long  aIndex  ) 
void mozIStorageValueArray::getSharedBlob ( in unsigned long  aIndex,
out unsigned long  aLength,
[shared, retval] out octetPtr  aResult 
)
void mozIStorageValueArray::getSharedString ( in unsigned long  aIndex,
out unsigned long  aLength,
[shared, retval] out wstring  aResult 
)
void mozIStorageValueArray::getSharedUTF8String ( in unsigned long  aIndex,
out unsigned long  aLength,
[shared, retval] out string  aResult 
)

Returns a shared string pointer.

AString mozIStorageValueArray::getString ( in unsigned long  aIndex  ) 
long mozIStorageValueArray::getTypeOfIndex ( in unsigned long  aIndex  ) 

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.

AUTF8String mozIStorageValueArray::getUTF8String ( in unsigned long  aIndex  ) 
PRBool mozIStorageValueArray::IsNull ( PRUint32  idx  )  [inline]

Member Data Documentation

readonly attribute unsigned long mozIStorageValueArray::numEntries

numEntries

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

These type values are returned by getTypeOfIndex to indicate what type of value is present at a given column.


The documentation for this interface was generated from the following file: