1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/IDBIndex.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + * 1.9 + * The origin of this IDL file is 1.10 + * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBIndexParameters 1.11 + */ 1.12 + 1.13 +dictionary IDBIndexParameters { 1.14 + boolean unique = false; 1.15 + boolean multiEntry = false; 1.16 +}; 1.17 + 1.18 +interface IDBIndex { 1.19 + readonly attribute DOMString name; 1.20 + readonly attribute IDBObjectStore objectStore; 1.21 + 1.22 + [Throws] 1.23 + readonly attribute any keyPath; 1.24 + 1.25 + readonly attribute boolean multiEntry; 1.26 + readonly attribute boolean unique; 1.27 + 1.28 + [Throws] 1.29 + IDBRequest openCursor (optional any range, optional IDBCursorDirection direction = "next"); 1.30 + 1.31 + [Throws] 1.32 + IDBRequest openKeyCursor (optional any range, optional IDBCursorDirection direction = "next"); 1.33 + 1.34 + [Throws] 1.35 + IDBRequest get (any key); 1.36 + 1.37 + [Throws] 1.38 + IDBRequest getKey (any key); 1.39 + 1.40 + [Throws] 1.41 + IDBRequest count (optional any key); 1.42 +}; 1.43 + 1.44 +partial interface IDBIndex { 1.45 + readonly attribute DOMString storeName; 1.46 + 1.47 + [Throws] 1.48 + IDBRequest mozGetAll (optional any key, optional unsigned long limit); 1.49 + 1.50 + [Throws] 1.51 + IDBRequest mozGetAllKeys (optional any key, optional unsigned long limit); 1.52 +};