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
;
13 * IDBIndex interface. See
14 * http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IDBIndex for more
17 [scriptable
, builtinclass
, uuid(a859747a
-0f05
-4dfb
-8f42
-05c61415d4e4
)]
18 interface nsIIDBIndex
: nsISupports
20 readonly attribute DOMString name
;
22 readonly attribute DOMString storeName
;
25 readonly attribute jsval keyPath
;
27 readonly attribute
boolean unique;
29 readonly attribute
boolean multiEntry
;
31 readonly attribute nsIIDBObjectStore objectStore
;
41 [implicit_jscontext
, optional_argc
, binaryname
(GetAll
)]
43 mozGetAll
([optional /* null */] in jsval key
,
44 [optional /* unlimited */] in unsigned long limit
);
46 [implicit_jscontext
, optional_argc
, binaryname
(GetAllKeys
)]
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
]
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
]
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
]
66 count
([optional] in jsval key
);