The mozIStorageStatementCallback
interface represents a callback handler that the Storage API calls with result, error, and completion notifications while handling asynchronous database queries.
Inherits from: nsISupports
void handleCompletion(in unsigned short aReason); |
void handleError(in |
void handleResult(in |
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. |
Called when a statement finishes executing.
void handleCompletion( in unsigned short aReason );
aReason
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 );
aError
mozIStorageError
object describing the error that occurred.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 );
aResultSet
mozIStorageResultSet
object describing the available results from the statement's execution.