michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBObjectStore michael@0: */ michael@0: michael@0: dictionary IDBObjectStoreParameters { michael@0: // TODO (DOMString or sequence)? keyPath = null; michael@0: any keyPath = null; michael@0: boolean autoIncrement = false; michael@0: }; michael@0: michael@0: interface IDBObjectStore { michael@0: readonly attribute DOMString name; michael@0: michael@0: [Throws] michael@0: readonly attribute any keyPath; michael@0: michael@0: [Throws] michael@0: readonly attribute DOMStringList indexNames; michael@0: readonly attribute IDBTransaction transaction; michael@0: readonly attribute boolean autoIncrement; michael@0: michael@0: [Throws] michael@0: IDBRequest put (any value, optional any key); michael@0: michael@0: [Throws] michael@0: IDBRequest add (any value, optional any key); michael@0: michael@0: [Throws] michael@0: IDBRequest delete (any key); michael@0: michael@0: [Throws] michael@0: IDBRequest get (any key); michael@0: michael@0: [Throws] michael@0: IDBRequest clear (); michael@0: michael@0: [Throws] michael@0: IDBRequest openCursor (optional any range, optional IDBCursorDirection direction = "next"); michael@0: michael@0: // Bug 899972 michael@0: // IDBIndex createIndex (DOMString name, (DOMString or sequence) keyPath, optional IDBIndexParameters optionalParameters); michael@0: michael@0: [Throws] michael@0: IDBIndex createIndex (DOMString name, DOMString keyPath, optional IDBIndexParameters optionalParameters); michael@0: michael@0: [Throws] michael@0: IDBIndex createIndex (DOMString name, sequence keyPath, optional IDBIndexParameters optionalParameters); michael@0: michael@0: [Throws] michael@0: IDBIndex index (DOMString name); michael@0: michael@0: [Throws] michael@0: void deleteIndex (DOMString indexName); michael@0: michael@0: [Throws] michael@0: IDBRequest count (optional any key); michael@0: }; michael@0: michael@0: partial interface IDBObjectStore { michael@0: // Success fires IDBTransactionEvent, result == array of values for given keys michael@0: [Throws] michael@0: IDBRequest mozGetAll (optional any key, optional unsigned long limit); michael@0: michael@0: [Pref="dom.indexedDB.experimental", Throws] michael@0: IDBRequest getAll (optional any key, optional unsigned long limit); michael@0: michael@0: [Pref="dom.indexedDB.experimental", Throws] michael@0: IDBRequest getAllKeys (optional any key, optional unsigned long limit); michael@0: michael@0: [Pref="dom.indexedDB.experimental", Throws] michael@0: IDBRequest openKeyCursor (optional any range, optional IDBCursorDirection direction = "next"); michael@0: };