aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/idbdatabase/version/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/idbdatabase/version/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/api/idbdatabase/version/index.html')
-rw-r--r--files/ja/web/api/idbdatabase/version/index.html114
1 files changed, 114 insertions, 0 deletions
diff --git a/files/ja/web/api/idbdatabase/version/index.html b/files/ja/web/api/idbdatabase/version/index.html
new file mode 100644
index 0000000000..05d3e26e56
--- /dev/null
+++ b/files/ja/web/api/idbdatabase/version/index.html
@@ -0,0 +1,114 @@
+---
+title: IDBDatabase.version
+slug: Web/API/IDBDatabase/version
+tags:
+ - Database
+ - IDBDatabase
+ - IndexedDB
+ - Property
+ - Storage
+ - version
+translation_of: Web/API/IDBDatabase/version
+---
+<p>{{ APIRef("IDBDatabase") }}</p>
+<div>
+ <p><code>{{domxref("IDBDatabase")}}インターフェイスのversion</code>プロパティ は、接続しているデータベースのバージョンを含む<a href="https://developer.mozilla.org/en-US/docs/NSPR_API_Reference/Long_Long_%2864-bit%29_Integers">64-bit integer</a>です。データベースを初めて生成した時、この属性は空文字です。</p>
+</div>
+<h2 id="構文">構文</h2>
+<pre class="brush: js">db.version</pre>
+<h3 id="値">値</h3>
+<p>接続しているデータベースのバージョンを含む整数値。</p>
+<h2 id="例">例</h2>
+<pre class="brush: js;highlight:[16]">// Let us open our database
+var DBOpenRequest = window.indexedDB.open("toDoList", 4);
+
+// these two event handlers act on the database being opened successfully, or not
+DBOpenRequest.onerror = function(event) {
+ note.innerHTML += '&lt;li&gt;Error loading database.&lt;/li&gt;';
+};
+
+DBOpenRequest.onsuccess = function(event) {
+ note.innerHTML += '&lt;li&gt;Database initialised.&lt;/li&gt;';
+
+ // store the result of opening the database in the db variable. This is used a lot below
+ db = DBOpenRequest.result;
+
+ // This line will log the version of the connected database, which should be "4"
+ console.log(db.version);
+};</pre>
+<h2 id="仕様">仕様</h2>
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('IndexedDB', '#widl-IDBDatabase-version', 'version')}}</td>
+ <td>{{Spec2('IndexedDB')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザ実装状況</h2>
+<div>
+ {{CompatibilityTable}}</div>
+<div id="compat-desktop">
+ <table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>23{{property_prefix("webkit")}}<br>
+ 24</td>
+ <td>10 {{property_prefix("moz")}}<br>
+ {{CompatGeckoDesktop("16.0")}}</td>
+ <td>10, partial</td>
+ <td>15</td>
+ <td>7.1</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+<div id="compat-mobile">
+ <table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>Firefox OS</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>4.4</td>
+ <td>{{CompatGeckoMobile("22.0")}}</td>
+ <td>1.0.1</td>
+ <td>10</td>
+ <td>22</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+<h2 id="関連情報">関連情報</h2>
+<ul>
+ <li><a href="/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB">Using IndexedDB</a></li>
+ <li>Starting transactions: {{domxref("IDBDatabase")}}</li>
+ <li>Using transactions: {{domxref("IDBTransaction")}}</li>
+ <li>Setting a range of keys: {{domxref("IDBKeyRange")}}</li>
+ <li>Retrieving and making changes to your data: {{domxref("IDBObjectStore")}}</li>
+ <li>Using cursors: {{domxref("IDBCursor")}}</li>
+ <li>Reference example: <a class="external" href="https://github.com/mdn/to-do-notifications/tree/gh-pages">To-do Notifications</a> (<a class="external" href="http://mdn.github.io/to-do-notifications/">view example live</a>.)</li>
+</ul>