#ifndef IDBObjectStore_h
#define IDBObjectStore_h
-#include "bindings/core/v8/Dictionary.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "bindings/core/v8/SerializedScriptValue.h"
#include "modules/indexeddb/IDBCursor.h"
#include "modules/indexeddb/IDBIndex.h"
+#include "modules/indexeddb/IDBIndexParameters.h"
#include "modules/indexeddb/IDBKey.h"
#include "modules/indexeddb/IDBKeyRange.h"
#include "modules/indexeddb/IDBMetadata.h"
class ExceptionState;
class IDBObjectStore : public GarbageCollectedFinalized<IDBObjectStore>, public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
public:
static IDBObjectStore* create(const IDBObjectStoreMetadata& metadata, IDBTransaction* transaction)
{
IDBRequest* openCursor(ScriptState*, const ScriptValue& range, const String& direction, ExceptionState&);
IDBRequest* openKeyCursor(ScriptState*, const ScriptValue& range, const String& direction, ExceptionState&);
IDBRequest* get(ScriptState*, const ScriptValue& key, ExceptionState&);
- IDBRequest* add(ScriptState*, ScriptValue&, const ScriptValue& key, ExceptionState&);
- IDBRequest* put(ScriptState*, ScriptValue&, const ScriptValue& key, ExceptionState&);
+ IDBRequest* add(ScriptState*, const ScriptValue&, const ScriptValue& key, ExceptionState&);
+ IDBRequest* put(ScriptState*, const ScriptValue&, const ScriptValue& key, ExceptionState&);
IDBRequest* deleteFunction(ScriptState*, const ScriptValue& key, ExceptionState&);
IDBRequest* clear(ScriptState*, ExceptionState&);
- IDBIndex* createIndex(ScriptState* scriptState, const String& name, const String& keyPath, const Dictionary& options, ExceptionState& exceptionState)
+ IDBIndex* createIndex(ScriptState* scriptState, const String& name, const String& keyPath, const IDBIndexParameters& options, ExceptionState& exceptionState)
{
return createIndex(scriptState, name, IDBKeyPath(keyPath), options, exceptionState);
}
- IDBIndex* createIndex(ScriptState* scriptState, const String& name, const Vector<String>& keyPath, const Dictionary& options, ExceptionState& exceptionState)
+ IDBIndex* createIndex(ScriptState* scriptState, const String& name, const Vector<String>& keyPath, const IDBIndexParameters& options, ExceptionState& exceptionState)
{
return createIndex(scriptState, name, IDBKeyPath(keyPath), options, exceptionState);
}
IDBRequest* count(ScriptState*, const ScriptValue& range, ExceptionState&);
// Used by IDBCursor::update():
- IDBRequest* put(ScriptState*, WebIDBPutMode, IDBAny* source, ScriptValue&, IDBKey*, ExceptionState&);
+ IDBRequest* put(ScriptState*, WebIDBPutMode, IDBAny* source, const ScriptValue&, IDBKey*, ExceptionState&);
// Used internally and by InspectorIndexedDBAgent:
IDBRequest* openCursor(ScriptState*, IDBKeyRange*, WebIDBCursorDirection, WebIDBTaskType = WebIDBTaskTypeNormal);
private:
IDBObjectStore(const IDBObjectStoreMetadata&, IDBTransaction*);
- IDBIndex* createIndex(ScriptState*, const String& name, const IDBKeyPath&, const Dictionary&, ExceptionState&);
- IDBIndex* createIndex(ScriptState*, const String& name, const IDBKeyPath&, bool unique, bool multiEntry, ExceptionState&);
- IDBRequest* put(ScriptState*, WebIDBPutMode, IDBAny* source, ScriptValue&, const ScriptValue& key, ExceptionState&);
+ IDBIndex* createIndex(ScriptState*, const String& name, const IDBKeyPath&, const IDBIndexParameters&, ExceptionState&);
+ IDBRequest* put(ScriptState*, WebIDBPutMode, IDBAny* source, const ScriptValue&, const ScriptValue& key, ExceptionState&);
int64_t findIndexId(const String& name) const;
bool containsIndex(const String& name) const