The mozIStorageStatementCallback
interface represents a callback handler that the Storage API calls with result, error, and completion notifications while handling asynchronous database queries.
Please add a summary to this article.
Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0)
Inherits from: nsISupports
Method overview
void handleCompletion(in unsigned short aReason); |
void handleError(in |
void handleResult(in |
Constants
Constant | Value | Description |
REASON_FINISHED |
0 | The statement has finished executing normally. |
REASON_CANCELED |
1 | The statement stopped executing because it was canceled. |
REASON_ERROR |
2 | The statement stopped executing because an error occurred. |
Methods
handleCompletion()
Called when a statement finishes executing.
void handleCompletion( in unsigned short aReason );
Parameters
-
aReason
- The reason the statement stopped executing; see the list of possible values in the Constants section.
handleError()
Called when an error occurs while executing a statement. This function may be called more than once with a different storageIError each time for any given asynchronous statement, and handleCompletion will be called once the statement is complete.
void handleError( in mozIStorageError aError );
Parameters
-
aError
-
A
mozIStorageError
object describing the error that occurred.
handleResult()
Called when results from the statement are available. Generally, this method will be called several times, each time providing one or more results. Once there are no more results, handleCompletion will be called.
void handleResult( in mozIStorageResultSet aResultSet );
Parameters
-
aResultSet
-
An
mozIStorageResultSet
object describing the available results from the statement's execution.
See also
Document Tags and Contributors
Last updated by:
Zorbing,