Bug 835381 - Update libnestegg to 38c83d9d4c0c5c84373aa285bd30094a12d6b6f6. r=kinetik
[gecko.git] / dom / indexedDB / nsIIDBIndex.idl
blob00bd6f3bcb58020d75e38a82fc9ea73d0f9df3b1
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.idl"
9 interface nsIIDBObjectStore;
10 interface nsIIDBRequest;
12 /**
13 * IDBIndex interface. See
14 * http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IDBIndex for more
15 * information.
17 [scriptable, builtinclass, uuid(a859747a-0f05-4dfb-8f42-05c61415d4e4)]
18 interface nsIIDBIndex : nsISupports
20 readonly attribute DOMString name;
22 readonly attribute DOMString storeName;
24 [implicit_jscontext]
25 readonly attribute jsval keyPath;
27 readonly attribute boolean unique;
29 readonly attribute boolean multiEntry;
31 readonly attribute nsIIDBObjectStore objectStore;
33 [implicit_jscontext]
34 nsIIDBRequest
35 get(in jsval key);
37 [implicit_jscontext]
38 nsIIDBRequest
39 getKey(in jsval key);
41 [implicit_jscontext, optional_argc, binaryname(GetAll)]
42 nsIIDBRequest
43 mozGetAll([optional /* null */] in jsval key,
44 [optional /* unlimited */] in unsigned long limit);
46 [implicit_jscontext, optional_argc, binaryname(GetAllKeys)]
47 nsIIDBRequest
48 mozGetAllKeys([optional /* null */] in jsval key,
49 [optional /* unlimited */] in unsigned long limit);
51 // direction can be "next", "nextunique", "prev" or "prevunique"
52 [implicit_jscontext, optional_argc]
53 nsIIDBRequest
54 openCursor([optional /* null */] in jsval key,
55 [optional /* "next" */] in DOMString direction);
57 // direction can be "next", "nextunique", "prev" or "prevunique"
58 [implicit_jscontext, optional_argc]
59 nsIIDBRequest
60 openKeyCursor([optional /* null */] in jsval key,
61 [optional /* "next" */] in DOMString direction);
63 // Accepts null, a key value, or a nsIIDBKeyRange object.
64 [implicit_jscontext, optional_argc]
65 nsIIDBRequest
66 count([optional] in jsval key);