mozIStorageStatementCallback 编辑
The mozIStorageStatementCallback
interface represents a callback handler that the Storage API calls with result, error, and completion notifications while handling asynchronous database queries.
storage/public/mozIStorageStatementCallback.idl
Scriptable 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论