mozIStorageBindingParams 编辑

The mozIStorageBindingParams interface is used to bind values to parameters prior to calling mozIStorageStatement.executeAsync().

storage/public/mozIStorageBindingParams.idlScriptable Please add a summary to this article.   Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)

Inherits from: nsISupports

You can only create mozIStorageBindingParams objects by calling the mozIStorageBindingParamsArray.newBindingParams().

Method overview

void bindByIndex(in unsigned long aIndex, in nsIVariant aValue);
void bindBlobByIndex(in unsigned long aIndex, [array, const, size_is(aValueSize)] in octet aValue, in unsigned long aValueSize);
void bindDoubleByIndex(in unsigned long aIndex, in double aValue); Native code only!
void bindInt32ByIndex(in unsigned long aIndex, in long aValue); Native code only!
void bindInt64ByIndex(in unsigned long aIndex, in long long aValue); Native code only!
void bindNullByIndex(in unsigned long aIndex); Native code only!
void bindStringByIndex(in unsigned long aIndex, in AString aValue); Native code only!
void bindUTF8StringByIndex(in unsigned long aIndex, in AUTF8String aValue); Native code only!
void bindByName(in AUTF8String aName, in nsIVariant aValue);
void bindBlobByName(in AUTF8String aName, [array, const, size_is(aValueSize)] in octet aValue, in unsigned long aValueSize);
void bindDoubleByName(in AUTF8String aName, in double aValue); Native code only!
void bindInt32ByName(in AUTF8String aName, in long aValue); Native code only!
void bindInt64ByName(in AUTF8String aName, in long long aValue); Native code only!
void bindNullByName(in AUTF8String aName); Native code only!
void bindStringByName(in AUTF8String aName, in AString aValue); Native code only!
void bindUTF8StringByName(in AUTF8String aName, in AUTF8String aValue); Native code only!

Methods

bindByIndex()

Binds a to the specified index.

void bindByIndex(
  in unsigned long aIndex,
  in nsIVariant aValue
);
Parameters
aIndex
The zero-based numerical index for the parameter to be bound. This will be one less than the number used in the SQL (<code>?1</code> maps to <code>0</code>, and so on).
aValue

to be bound to the specified index.

bindBlobByIndex()

Binds a blob to the specified index.

void bindBlobByIndex(
  in unsigned long aIndex,
  [array, const, size_is(aValueSize)] in octet aValue,
  in unsigned long aValueSize
);
Parameters
aIndex
The zero-based numerical index for the parameter to be bound. This will be one less than the number used in the SQL (<code>?1</code> maps to <code>0</code>, and so on).
aValue
to be bound to the specified index.
aValueSize
The size of aValue.
Native code only!

bindDoubleByIndex

Binds a double to the specified index.

void bindDoubleByIndex(
  in unsigned long aIndex,
  in double aValue
);
Parameters
aIndex
The zero-based numerical index for the parameter to be bound. This will be one less than the number used in the SQL (<code>?1</code> maps to <code>0</code>, and so on).
aValue
to be bound to the specified index.
Native code only!

bindInt32ByIndex

Binds an Int32 to the specified index.

void bindInt32ByIndex(
  in unsigned long aIndex,
  in long aValue
);
Parameters
aIndex
The zero-based numerical index for the parameter to be bound. This will be one less than the number used in the SQL (<code>?1</code> maps to <code>0</code>, and so on).
aValue
to be bound to the specified index.
Native code only!

bindInt64ByIndex

Binds an Int64 to the specified index.

void bindInt32ByIndex(
  in unsigned long aIndex,
  in long long aValue
);
Parameters
aIndex
The zero-based numerical index for the parameter to be bound. This will be one less than the number used in the SQL (<code>?1</code> maps to <code>0</code>, and so on).
aValue
to be bound to the specified index.
Native code only!

bindNullByIndex

Binds Null to the specified index.

void bindNullByIndex(
  in unsigned long aIndex
);
Parameters
aIndex
The zero-based numerical index for the parameter to be bound. This will be one less than the number used in the SQL (<code>?1</code> maps to <code>0</code>, and so on).
Native code only!

bindStringByIndex

Binds a stringr to the specified index.

void bindStringByIndex(
  in unsigned long aIndex,
  in AString aValue
);
Parameters
aIndex
The zero-based numerical index for the parameter to be bound. This will be one less than the number used in the SQL (<code>?1</code> maps to <code>0</code>, and so on).
aValue
to be bound to the specified index.
Native code only!

bindUTF8StringByIndex

Binds a UTF8String to the specified index.

void bindStringByIndex(
  in unsigned long aIndex,
  in AUTF8String aValue
);
Parameters
aIndex
The zero-based numerical index for the parameter to be bound. This will be one less than the number used in the SQL (<code>?1</code> maps to <code>0</code>, and so on).
aValue
to be bound to the specified index.

bindByName()

Binds a value to a parameter with the specified name.

void bindByName(
  in AUTF8String aName,
  in nsIVariant aValue
);
Parameters
aName

The name of the named index for the parameter to be bound.

aValue
to be bound to the specified index.

bindBlobByName()

Binds a blob to the specified index.

void bindBlobByName(
  in AUTF8String aName,
  [array, const, size_is(aValueSize)] in octet aValue,
  in unsigned long aValueSize
);
Parameters
aName
The name of the named index for the parameter to be bound.
aValue
to be bound to the specified index.
aValueSize
The size of aValue.
Native code only!

bindDoubleByName

Binds a double to the specified index.

void bindDoubleByName(
  in AUTF8String aName,
  in double aValue
);
Parameters
aName
The name of the named index for the parameter to be bound.
aValue
to be bound to the specified index.
Native code only!

bindInt32ByName

Binds an Int32 to the specified index.

void bindInt32ByName(
  in AUTF8String aName,
  in long aValue
);
Parameters
aName
The name of the named index for the parameter to be bound.
aValue
to be bound to the specified index.
Native code only!

bindInt64ByName

Binds an Int64 to the specified index.

void bindInt32ByName(
  in AUTF8String aName,
  in long long aValue
);
Parameters
aName
The name of the named index for the parameter to be bound.
aValue
to be bound to the specified index.
Native code only!

bindNullByName

Binds Null to the specified index.

void bindNullByName(
  in AUTF8String aName
);
Parameters
aName
The name of the named index for the parameter to be bound.
Native code only!

bindStringByName

Binds a string to the specified index.

void bindStringByName(
  in AUTF8String aName,
  in AString aValue
);
Parameters
aName
The name of the named index for the parameter to be bound.
aValue
to be bound to the specified index.
Native code only!

bindUTF8StringByName

Binds a UTF8String to the specified index.

void bindStringByName(
  in AUTF8String aName,
  in AUTF8String aValue
);
Parameters
aName
The name of the named index for the parameter to be bound.
aValue
to be bound to the specified index.

See also

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

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

发布评论

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

词条统计

浏览:70 次

字数:13417

最后编辑:8年前

编辑次数:0 次

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