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 nsIIDBRequest
;
12 * IDBCursor interface. See
13 * http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IDBCursor for more
16 [scriptable
, builtinclass
, uuid(148579a3
-6b28
-4b2a
-92c3
-ff5719e8e03e
)]
17 interface nsIIDBCursor
: nsISupports
19 // "next", "nextunique", "prev" or "prevunique"
20 readonly attribute DOMString direction
;
22 readonly attribute nsISupports
source;
25 readonly attribute jsval key
;
28 readonly attribute jsval primaryKey
;
30 // Calling continue means that the same onsuccess function will be called
31 // again with the new key/value (or null if no more matches).
33 void continue
([optional /* undefined */] in jsval key
);
35 // Success fires IDBTransactionEvent, result == key
37 nsIIDBRequest update
(in jsval value
);
39 // Success fires IDBTransactionEvent, result == null
41 nsIIDBRequest delete
();
44 advance
(in long long count
);