| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 IDBRequest* count(ScriptState*, const ScriptValue& range, ExceptionState&); | 90 IDBRequest* count(ScriptState*, const ScriptValue& range, ExceptionState&); |
| 91 | 91 |
| 92 // Used by IDBCursor::update(): | 92 // Used by IDBCursor::update(): |
| 93 IDBRequest* put(ScriptState*, WebIDBPutMode, IDBAny* source, const ScriptVal
ue&, IDBKey*, ExceptionState&); | 93 IDBRequest* put(ScriptState*, WebIDBPutMode, IDBAny* source, const ScriptVal
ue&, IDBKey*, ExceptionState&); |
| 94 | 94 |
| 95 // Used internally and by InspectorIndexedDBAgent: | 95 // Used internally and by InspectorIndexedDBAgent: |
| 96 IDBRequest* openCursor(ScriptState*, IDBKeyRange*, WebIDBCursorDirection, We
bIDBTaskType = WebIDBTaskTypeNormal); | 96 IDBRequest* openCursor(ScriptState*, IDBKeyRange*, WebIDBCursorDirection, We
bIDBTaskType = WebIDBTaskTypeNormal); |
| 97 | 97 |
| 98 void markDeleted() { m_deleted = true; } | 98 void markDeleted() { m_deleted = true; } |
| 99 bool isDeleted() const { return m_deleted; } | 99 bool isDeleted() const { return m_deleted; } |
| 100 void abort(); | 100 void versionChangeTransactionAborted(); |
| 101 void transactionFinished(); | 101 void transactionFinished(); |
| 102 | 102 |
| 103 const IDBObjectStoreMetadata& metadata() const { return m_metadata; } | 103 const IDBObjectStoreMetadata& metadata() const { return m_metadata; } |
| 104 void setMetadata(const IDBObjectStoreMetadata& metadata) { m_metadata = meta
data; } | 104 // Rolls back the object store's metadata to a previous version. |
| 105 // |
| 106 // Used when a versionchange transaction is aborted. |
| 107 void rollbackMetadata(const IDBObjectStoreMetadata& previousMetadata); |
| 105 | 108 |
| 106 typedef HeapVector<Member<IDBKey>> IndexKeys; | 109 typedef HeapVector<Member<IDBKey>> IndexKeys; |
| 107 | 110 |
| 108 WebIDBDatabase* backendDB() const; | 111 WebIDBDatabase* backendDB() const; |
| 109 | 112 |
| 110 private: | 113 private: |
| 111 IDBObjectStore(const IDBObjectStoreMetadata&, IDBTransaction*); | 114 IDBObjectStore(const IDBObjectStoreMetadata&, IDBTransaction*); |
| 112 | 115 |
| 113 IDBIndex* createIndex(ScriptState*, const String& name, const IDBKeyPath&, c
onst IDBIndexParameters&, ExceptionState&); | 116 IDBIndex* createIndex(ScriptState*, const String& name, const IDBKeyPath&, c
onst IDBIndexParameters&, ExceptionState&); |
| 114 IDBRequest* put(ScriptState*, WebIDBPutMode, IDBAny* source, const ScriptVal
ue&, const ScriptValue& key, ExceptionState&); | 117 IDBRequest* put(ScriptState*, WebIDBPutMode, IDBAny* source, const ScriptVal
ue&, const ScriptValue& key, ExceptionState&); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 127 IDBIndexMap m_indexMap; | 130 IDBIndexMap m_indexMap; |
| 128 | 131 |
| 129 // Used to mark indexes created in an aborted upgrade transaction as | 132 // Used to mark indexes created in an aborted upgrade transaction as |
| 130 // deleted. | 133 // deleted. |
| 131 HeapHashSet<Member<IDBIndex>> m_createdIndexes; | 134 HeapHashSet<Member<IDBIndex>> m_createdIndexes; |
| 132 }; | 135 }; |
| 133 | 136 |
| 134 } // namespace blink | 137 } // namespace blink |
| 135 | 138 |
| 136 #endif // IDBObjectStore_h | 139 #endif // IDBObjectStore_h |
| OLD | NEW |