Visit Mozilla.org

mozIStorageStatementWrapper

From MDC

This article covers features introduced in Firefox 2

The mozIStorageStatementWrapper interface is a storage statement wrapper. When you call the mozIStorageConnection interface's createStatement() method, you get a mozIStorageStatement which has just direct bindings to SQLITE. You can then wrap that statement with a wrapper, which implements nsIXPCScriptable and provides scriptable helpers letting you execute the statement as a function, access bind variables by name as properties, etc.

Contents

mozIStorageStatementWrapper is defined in storage/public/mozIStorageStatementWrapper.idl. It is scriptable and unfrozen (hasn't changed since Mozilla 1.8).

Inherits from: nsISupports

[edit] Method overview

void initialize(in mozIStorageStatement aStatement);
void reset();
boolean step();
void execute();

[edit] Attributes

Attribute Type Description
statement mozIStorageStatement The statement that is wrapped.
row mozIStorageStatementRow The current row. Throws an exception if no row is currently available. Useful only from script. The value of this is only valid while the statement is still executing, and is still on the appropriate row.
params mozIStorageStatementParams The parameters; these can be set in lieu of using the call notation on this.

[edit] Methods

[edit] initialize()

This method initializes this wrapper with aStatement.

 void initialize(
   in mozIStorageStatement aStatement
 );
[edit] Parameters
aStatement
The statement to be initialized.

[edit] reset()

This method resets the wrapped statement.

 void reset();
[edit] Parameters

None.

[edit] step()

This method steps the wrapped statement.

 boolean step();
[edit] Parameters

None.

[edit] Return value

Returns true if the stepping the wrapped statement was successful, otherwise returns false.

[edit] execute()

This method executes the wrapped statement.

 void execute();
[edit] Parameters

None.

[edit] See also