Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
メモ: この機能はウェブワーカー内で利用可能です。
upper は IDBKeyRange インターフェイスの読み取り専用プロパティで、キーの範囲の上限を返します。
キーの範囲の上限です。(任意の型になり得ます)
以下の例では、キーの範囲の使用法を示します。keyRangeValue = IDBKeyRange.upperBound("F", "W", true, true); と定義します。上限と下限の両方が開 (true) として宣言されているので、これは "F" と "W" の間の全ての値を含むが、これらの値は含まない範囲です。(IDBTransaction により) トランザクションを開き、オブジェクトストアを開き、省略可能なキーの範囲の値を keyRangeValue として IDBObjectStore.openCursor でカーソルを開きます。
キーの範囲を宣言した後、その upper プロパティの値をコンソールに記録します。これは "W" になるはずです。
メモ: キーの範囲に関する実験ができるより完全な例は、IDBKeyRange-example リポジトリーを参照してください。(動く例も見る)
| Indexed Database API 3.0 # ref-for-dom-idbkeyrange-upper① |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2024年8月12日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.