Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
mozISqlResult Interface Reference

The result of an SQL query. More...

import "mozISqlResult.idl";

Inheritance diagram for mozISqlResult:
Inheritance graph
[legend]
Collaboration diagram for mozISqlResult:
Collaboration graph
[legend]

List of all members.

Public Member Functions

AString getColumnName (in long aColumnIndex)
 Retrieves the name of a column given its index.
long getColumnIndex (in AString aColumnName)
 Retrieves the index of a column given its name.
long getColumnType (in long aColumnIndex)
 Returns the type of the data in a given column.
AString getColumnTypeAsString (in long aColumnIndex)
 Returns the type of the data in a given column as a string.
long getColumnDisplaySize (in long aColumnIndex)
 Returns the maximum number of bytes that are needed to hold a value in a particular column.
mozISqlResultEnumerator enumerate ()
 Returns an enumerator to enumerator over the returned rows.
mozISqlInputStream open ()
 Returns a stream which may be used to return the rows as XML.
void reload ()
 Re-executes the query.

Public Attributes

attribute boolean displayNullAsText
 By default, this value is false.
readonly attribute
mozISqlConnection 
connection
 The connection used to execute the query.
readonly attribute AString query
 The SQL query.
readonly attribute AString tableName
 The table that was used in the query.
readonly attribute long rowCount
 The number of rows in the result.
readonly attribute long columnCount
 The number of columns in the result.
const long TYPE_STRING = 1
 column type constants used by |getColumnType|.
const long TYPE_INT = 2
const long TYPE_FLOAT = 3
const long TYPE_DECIMAL = 4
const long TYPE_DATE = 5
const long TYPE_TIME = 6
const long TYPE_DATETIME = 7
const long TYPE_BOOL = 8

Detailed Description

The result of an SQL query.

Use the enumerate method to retrieve each row.

UNDER_DEVELOPMENT

Definition at line 51 of file mozISqlResult.idl.


Member Function Documentation

Returns an enumerator to enumerator over the returned rows.

Returns:
the row enumerator

Returns the maximum number of bytes that are needed to hold a value in a particular column.

Parameters:
aColumnIndexthe index of the column to return the size of
Returns:
the column size
long mozISqlResult::getColumnIndex ( in AString  aColumnName)

Retrieves the index of a column given its name.

If the column does not exist, -1 is returned.

Parameters:
aColumnNamethe column name to return
Returns:
the column index
AString mozISqlResult::getColumnName ( in long  aColumnIndex)

Retrieves the name of a column given its index.

Indicies start at zero.

Parameters:
aColumnIndexthe index of the column to return
Returns:
the column name

Returns the type of the data in a given column.

Parameters:
aColumnIndexthe index of the column to return the type of
Returns:
the column type
AString mozISqlResult::getColumnTypeAsString ( in long  aColumnIndex)

Returns the type of the data in a given column as a string.

This is used as an alternative to using the constants and will return either string, int, float, decimal, date, time, datetime or bool.

Parameters:
aColumnIndexthe index of the column to return the type of
Returns:
the column type

Returns a stream which may be used to return the rows as XML.

The XML format is: <?xml version="1.0"?> <document> <body> <row> <cell>value11</cell> <cell>value12</cell> ... </row> </body> </document>

Returns:
the input stream

Re-executes the query.


Member Data Documentation

The number of columns in the result.

Definition at line 82 of file mozISqlResult.idl.

The connection used to execute the query.

Definition at line 61 of file mozISqlResult.idl.

By default, this value is false.

Definition at line 56 of file mozISqlResult.idl.

readonly attribute AString mozISqlResult::query

The SQL query.

Definition at line 66 of file mozISqlResult.idl.

The number of rows in the result.

Definition at line 77 of file mozISqlResult.idl.

The table that was used in the query.

If more than one table was used, only the first is returned.

Definition at line 72 of file mozISqlResult.idl.

Definition at line 111 of file mozISqlResult.idl.

Definition at line 108 of file mozISqlResult.idl.

Definition at line 110 of file mozISqlResult.idl.

Definition at line 107 of file mozISqlResult.idl.

Definition at line 106 of file mozISqlResult.idl.

Definition at line 105 of file mozISqlResult.idl.

column type constants used by |getColumnType|.

Definition at line 104 of file mozISqlResult.idl.

Definition at line 109 of file mozISqlResult.idl.


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