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