aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/idbobjectstore/getall/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/web/api/idbobjectstore/getall/index.html')
-rw-r--r--files/fr/web/api/idbobjectstore/getall/index.html128
1 files changed, 128 insertions, 0 deletions
diff --git a/files/fr/web/api/idbobjectstore/getall/index.html b/files/fr/web/api/idbobjectstore/getall/index.html
new file mode 100644
index 0000000000..714ca578d7
--- /dev/null
+++ b/files/fr/web/api/idbobjectstore/getall/index.html
@@ -0,0 +1,128 @@
+---
+title: IDBObjectStore.getAll()
+slug: Web/API/IDBObjectStore/getAll
+translation_of: Web/API/IDBObjectStore/getAll
+---
+<p>{{ APIRef("IndexedDB") }}</p>
+
+<p>La méthode <strong><code>getAll()</code></strong> de l'interface {{domxref("IDBObjectStore")}} fait une {{domxref("IDBRequest","requête")}} qui renvoie un tableau ordonné suivant les clés, des valeurs de tous les enregistrements du magasin d'objet {{domxref("IDBObjectStore","relié")}}. On peut limité le nombre d'enregistrements en les filtrants suivant leurs clés ou en paramétrant le compteur.</p>
+
+<p>{{ Note("Cette méthode renverras un tableau vide si aucun enregistrement ne correspond. Si la valeur est undefined elle prendra une case du tableau.") }}</p>
+
+<h2 id="Syntaxe">Syntaxe</h2>
+
+<pre class="syntaxbox">var request = objectStore.getAll(query, count);</pre>
+
+<h2 id="Paramètres">Paramètres</h2>
+
+<dl>
+ <dt>query {{optional_inline}}</dt>
+ <dd>Une clé ou l'{{domxref("IDBKeyRange","intervalle de clé")}} <strong>pour filtrer</strong>, seule les valeurs des enregistrements correspondant sont renvoyées. Par défaut toutes les valeurs des enregistrements du magasin d'objet sont renvoyées.</dd>
+ <dt>count {{optional_inline}}</dt>
+ <dd>Le nombre de valeurs d'enregistrement <strong>maximum renvoyées</strong>. Un nombre décimal sera tronqué. Zéro annule le compteur et toutes les valeurs sont retournées.</dd>
+</dl>
+
+<h2 id="Renvoie">Renvoie</h2>
+
+<dl>
+ <dt>Une {{domxref("IDBRequest","requête")}}</dt>
+ <dd>La propriété {{domxref("IDBRequest.result","result")}} de cette requête renvoie le tableau des valeurs des enregistrements en cas de succès.</dd>
+</dl>
+
+<h2 id="Exceptions">Exceptions</h2>
+
+<dl>
+ <dt><code>TransactionInactiveError</code></dt>
+ <dd>Cette {{domxref("DOMException","exception")}} est levée si la {{domxref("IDBTransaction","transaction")}} est inactive.</dd>
+ <dt><code>DataError</code></dt>
+ <dd>Cette {{domxref("DOMException","exception")}} est levée si la clé où l'{{domxref("IDBKeyRange","intervalle de clé")}} est invalide.</dd>
+ <dt><code>InvalidStateError</code></dt>
+ <dd>Cette {{domxref("DOMException","exception")}} est levée si le magasin d'objets a été supprimé.</dd>
+ <dt><code>TypeError</code></dt>
+ <dd>Cette {{domxref("DOMException","exception")}} est levée si le compteur n'est pas un nombre positif.</dd>
+</dl>
+
+<h2 id="Spécifications">Spécifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Spécification</th>
+ <th scope="col">Statut</th>
+ <th scope="col">Commentaire</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('IndexedDB2', '#dom-idbobjectstore-getall', 'getAll()')}}</td>
+ <td>{{Spec2('IndexedDB')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilité_avec_les_navigateurs">Compatibilité avec les navigateurs</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Fonctionnalité</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Support basique</td>
+ <td>{{CompatChrome(48.0)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Fonctionnalité</th>
+ <th>Android</th>
+ <th>Android Webview</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>Firefox OS</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ <th>Chrome for Android</th>
+ </tr>
+ <tr>
+ <td>Support basique</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatChrome(48.0)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatChrome(48.0)}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Voir_aussi">Voir aussi</h2>
+
+<ul>
+ <li>{{domxref("IndexedDB_API.Using_IndexedDB","Utiliser IndexedDB")}}</li>
+ <li>{{domxref("IDBDatabase","Débuter une connexion")}}</li>
+ <li>{{domxref("IDBTransaction","Utiliser les transactions")}}</li>
+ <li>{{domxref("IDBKeyRange","Définir l'intervalle des clés")}}</li>
+ <li>{{domxref("IDBObjectStore","Accès aux magasins d'objets")}}</li>
+ <li>{{domxref("IDBCursor","Utiliser les curseurs")}}</li>
+ <li>Exemple de référence: <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>