diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:43:23 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:43:23 -0500 |
commit | 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (patch) | |
tree | a9ef8ac1e1b8fe4207b6d64d3841bfb8990b6fd0 /files/tr/web/api/idbindex/getall/index.html | |
parent | 074785cea106179cb3305637055ab0a009ca74f2 (diff) | |
download | translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.gz translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.bz2 translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.zip |
initial commit
Diffstat (limited to 'files/tr/web/api/idbindex/getall/index.html')
-rw-r--r-- | files/tr/web/api/idbindex/getall/index.html | 164 |
1 files changed, 164 insertions, 0 deletions
diff --git a/files/tr/web/api/idbindex/getall/index.html b/files/tr/web/api/idbindex/getall/index.html new file mode 100644 index 0000000000..dfbd31c48d --- /dev/null +++ b/files/tr/web/api/idbindex/getall/index.html @@ -0,0 +1,164 @@ +--- +title: IDBIndex.getAll() +slug: Web/API/IDBIndex/getAll +translation_of: Web/API/IDBIndex/getAll +--- +<p>{{ APIRef("IndexedDB") }}</p> + +<div> +<p><strong><code>getAll()</code></strong> metodu {{domxref("IDBIndex")}} Arabirimi, dizinin içindeki tüm nesneleri alır.</p> +</div> + +<p>Nesne tembel olarak oluşturulduğundan, bir imlecin value özelliğine bakmakla ilişkili bir performans maliyeti söz konusudur. GetAll () gibi bir özellik kullanmak için, tarayıcının tüm nesneleri aynı anda oluşturması gerekir. Örneğin sadece anahtarların her birine bakmak istiyorsanız, bir imleci kullanmak daha etkilidir. Ancak, bir nesne deposundaki tüm nesnelerin bir dizisini almaya çalışıyorsanız, getAll () kullanmalısınız.</p> + +<h2 id="Syntax">Syntax</h2> + +<pre class="syntaxbox">var getAllKeysRequest = <em>IDBIndex</em>.getAll(); +var getAllKeysRequest = <em>IDBIndex</em>.getAll(<em>query</em>); +var getAllKeysRequest = <em>IDBIndex</em>.getAll(<em>query</em>, <em>count</em>);</pre> + +<h3 id="Parametreler">Parametreler</h3> + +<dl> + <dt><em>query</em> {{optional_inline}}</dt> + <dd>A key or an {{domxref("IDBKeyRange")}} identifying the records to retrieve. If this value is null or missing, the browser will use an unbound key range.</dd> + <dt><em>count</em> {{optional_inline}}</dt> + <dd>The number records to return. If this value exceeds the number of records in the query, the browser will only retrieve the first item. If it is lower than <code>0</code> or greater than <code>2<sup>32</sup>-1</code> a {{jsxref("TypeError")}} exception will be thrown.</dd> +</dl> + +<h3 id="Return_value">Return value</h3> + +<p>An {{domxref("IDBRequest")}} object on which subsequent events related to this operation are fired.</p> + +<h3 id="Exceptions">Exceptions</h3> + +<p>This method may raise a {{domxref("DOMException")}} of the following types:</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Exception</th> + <th scope="col">Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>TransactionInactiveError</code></td> + <td>This {{domxref("IDBIndex")}}'s transaction is inactive.</td> + </tr> + <tr> + <td><code>InvalidStateError</code></td> + <td>The {{domxref("IDBIndex")}} has been deleted or removed.</td> + </tr> + </tbody> +</table> + +<p>A {{jsxref("TypeError")}} exception is thrown if the <code>count</code> parameter is not between <code>0</code> and <code>2<sup>32</sup>-1</code> included.</p> + +<h2 id="Example">Example</h2> + +<pre class="brush: js">var myIndex = objectStore.index('index'); +var getAllKeysRequest = myIndex.getAllKeys(); +getAllKeysRequest.onsuccess = function() { + console.log(getAllKeysRequest.result); +}</pre> + +<h2 id="Specification">Specification</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 2', '#dom-idbindex-getall', 'getAll()')}}</td> + <td>{{Spec2('IndexedDB 2')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility">Browser compatibility</h2> + +<p>{{ CompatibilityTable }}</p> + +<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>{{ CompatChrome(48) }}</td> + <td>{{ CompatGeckoDesktop("44.0") }} [1]</td> + <td>{{ CompatNo }}</td> + <td>{{CompatOpera(35)}}</td> + <td>{{ CompatNo}}</td> + </tr> + <tr> + <td>Indexed Database 2.0</td> + <td>{{CompatChrome(58)}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatOpera(45)}}</td> + <td>{{CompatUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android Webview</th> + <th>Chrome for Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Phone</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{ CompatChrome(48) }}</td> + <td>{{ CompatChrome(48) }}</td> + <td>{{ CompatGeckoDesktop("44.0") }} [1]</td> + <td>{{ CompatNo}}</td> + <td>{{CompatOperaMobile(35)}}</td> + <td>{{ CompatNo}}</td> + </tr> + <tr> + <td>Indexed Database 2.0</td> + <td>{{CompatChrome(58)}}</td> + <td>{{CompatChrome(58)}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatOperaMobile(45)}}</td> + <td>{{CompatUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<p> [1] This feature was available since Firefox 24, but behind the <code>dom.indexedDB.experimental</code> pref, off by default</p> + +<h2 id="See_also">See also</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="https://mdn.github.io/to-do-notifications/">view example live</a>.)</li> +</ul> |