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