2010-06-23 23:46:08 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2010-06-23 23:46:08 +04:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2010-12-10 05:14:09 +03:00
|
|
|
interface nsIIDBObjectStore;
|
2010-06-28 22:51:06 +04:00
|
|
|
interface nsIIDBRequest;
|
|
|
|
|
2010-06-23 23:46:08 +04:00
|
|
|
/**
|
|
|
|
* IDBIndex interface. See
|
|
|
|
* http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IDBIndex for more
|
|
|
|
* information.
|
|
|
|
*/
|
2012-03-13 08:44:45 +04:00
|
|
|
[scriptable, builtinclass, uuid(a859747a-0f05-4dfb-8f42-05c61415d4e4)]
|
2010-06-23 23:46:08 +04:00
|
|
|
interface nsIIDBIndex : nsISupports
|
|
|
|
{
|
|
|
|
readonly attribute DOMString name;
|
|
|
|
|
|
|
|
readonly attribute DOMString storeName;
|
|
|
|
|
2011-12-20 14:59:07 +04:00
|
|
|
[implicit_jscontext]
|
|
|
|
readonly attribute jsval keyPath;
|
2010-06-23 23:46:08 +04:00
|
|
|
|
|
|
|
readonly attribute boolean unique;
|
2010-06-28 22:51:06 +04:00
|
|
|
|
2011-12-04 21:39:01 +04:00
|
|
|
readonly attribute boolean multiEntry;
|
|
|
|
|
2010-12-10 05:14:09 +03:00
|
|
|
readonly attribute nsIIDBObjectStore objectStore;
|
|
|
|
|
2011-11-03 19:57:30 +04:00
|
|
|
[implicit_jscontext]
|
2010-06-28 22:51:06 +04:00
|
|
|
nsIIDBRequest
|
2011-11-03 19:57:30 +04:00
|
|
|
get(in jsval key);
|
2010-06-28 22:51:06 +04:00
|
|
|
|
2011-11-03 19:57:30 +04:00
|
|
|
[implicit_jscontext]
|
2010-06-28 22:51:06 +04:00
|
|
|
nsIIDBRequest
|
2011-11-03 19:57:30 +04:00
|
|
|
getKey(in jsval key);
|
2010-06-28 22:51:06 +04:00
|
|
|
|
2012-06-29 20:48:35 +04:00
|
|
|
[implicit_jscontext, optional_argc, binaryname(GetAll)]
|
2010-06-28 22:51:06 +04:00
|
|
|
nsIIDBRequest
|
2012-06-29 20:48:35 +04:00
|
|
|
mozGetAll([optional /* null */] in jsval key,
|
|
|
|
[optional /* unlimited */] in unsigned long limit);
|
2010-06-28 22:51:06 +04:00
|
|
|
|
2012-06-29 20:48:35 +04:00
|
|
|
[implicit_jscontext, optional_argc, binaryname(GetAllKeys)]
|
2010-06-28 22:51:06 +04:00
|
|
|
nsIIDBRequest
|
2012-06-29 20:48:35 +04:00
|
|
|
mozGetAllKeys([optional /* null */] in jsval key,
|
|
|
|
[optional /* unlimited */] in unsigned long limit);
|
2010-06-28 22:51:06 +04:00
|
|
|
|
2012-03-13 08:44:45 +04:00
|
|
|
// direction can be "next", "nextunique", "prev" or "prevunique"
|
2011-11-03 19:57:30 +04:00
|
|
|
[implicit_jscontext, optional_argc]
|
2010-06-28 22:51:06 +04:00
|
|
|
nsIIDBRequest
|
2011-11-03 19:57:30 +04:00
|
|
|
openCursor([optional /* null */] in jsval key,
|
2012-03-13 08:44:45 +04:00
|
|
|
[optional /* "next" */] in DOMString direction);
|
2010-06-28 22:51:06 +04:00
|
|
|
|
2012-03-13 08:44:45 +04:00
|
|
|
// direction can be "next", "nextunique", "prev" or "prevunique"
|
2011-11-03 19:57:30 +04:00
|
|
|
[implicit_jscontext, optional_argc]
|
2010-06-28 22:51:06 +04:00
|
|
|
nsIIDBRequest
|
2011-11-03 19:57:30 +04:00
|
|
|
openKeyCursor([optional /* null */] in jsval key,
|
2012-03-13 08:44:45 +04:00
|
|
|
[optional /* "next" */] in DOMString direction);
|
2011-11-03 19:57:30 +04:00
|
|
|
|
|
|
|
// Accepts null, a key value, or a nsIIDBKeyRange object.
|
|
|
|
[implicit_jscontext, optional_argc]
|
|
|
|
nsIIDBRequest
|
|
|
|
count([optional] in jsval key);
|
2010-06-23 23:46:08 +04:00
|
|
|
};
|