mozIStorageStatementWrapper 编辑

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.

Firefox 3.5 note

Firefox 3.5 adds support for these features directly into the mozIStorageStatement interface, so this interface is essentially deprecated.

storage/public/mozIStorageStatementWrapper.idlScriptable Please add a summary to this article.   Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)

Inherits from: nsISupports

Method overview

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

Attributes

AttributeTypeDescription
statementmozIStorageStatementThe statement that is wrapped.
rowmozIStorageStatementRowThe 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.
paramsmozIStorageStatementParamsThe parameters; these can be set in lieu of using the call notation on this.

Methods

initialize()

This method initializes this wrapper with aStatement.

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

reset()

This method resets the wrapped statement.

 void reset();
Parameters

None.

step()

This method steps the wrapped statement.

 boolean step();
Parameters

None.

Return value

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

execute()

This method executes the wrapped statement.

 void execute();
Parameters

None.

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:59 次

字数:5303

最后编辑:6年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文