Shaka Player Embedded
Public Member Functions | Public Attributes | List of all members
shaka::js::idb::IDBObjectStore Class Reference

#include <object_store.h>

Inheritance diagram for shaka::js::idb::IDBObjectStore:
shaka::BackingObject shaka::memory::Traceable

Public Member Functions

 IDBObjectStore (RefPtr< IDBTransaction > transaction, const std::string &name)
 
void Trace (memory::HeapTracer *tracer) const override
 
ExceptionOr< RefPtr< IDBRequest > > Add (Any value, optional< IdbKeyType > key)
 
ExceptionOr< RefPtr< IDBRequest > > Put (Any value, optional< IdbKeyType > key)
 
ExceptionOr< RefPtr< IDBRequest > > Delete (IdbKeyType key)
 
ExceptionOr< RefPtr< IDBRequest > > Get (IdbKeyType key)
 
ExceptionOr< RefPtr< IDBRequest > > OpenCursor (optional< IdbKeyType > range, optional< IDBCursorDirection > direction)
 
ExceptionOr< RefPtr< IDBRequest > > AddOrPut (Any value, optional< IdbKeyType > key, bool no_overwrite)
 
- Public Member Functions inherited from shaka::BackingObject
 BackingObject ()
 
void Trace (memory::HeapTracer *tracer) const override
 
bool IsRootedAlive () const override
 
std::string name () const
 
virtual BackingObjectFactoryBasefactory () const =0
 
bool DerivedFrom (const std::string &base)
 
ReturnVal< JsValue > JsThis () const
 
void SetJsThis (Handle< JsObject > this_)
 
- Public Member Functions inherited from shaka::memory::Traceable
virtual ~Traceable ()
 
virtual bool IsShortLived () const
 

Public Attributes

const bool auto_increment = true
 
const optional< std::string > key_path
 
const std::string store_name
 
const Member< IDBTransactiontransaction
 

Additional Inherited Members

- Static Public Member Functions inherited from shaka::BackingObject
static void * operator new[] (size_t size)=delete
 
static void operator delete[] (void *)=delete
 
- Static Public Attributes inherited from shaka::BackingObject
static constexpr const size_t kInternalFieldCount = 2
 
- Static Public Attributes inherited from shaka::memory::Traceable
static constexpr const uint64_t kShortLiveDurationMs = 5000
 
- Protected Member Functions inherited from shaka::BackingObject
 ~BackingObject () override
 

Detailed Description

Definition at line 37 of file object_store.h.

Constructor & Destructor Documentation

§ IDBObjectStore()

shaka::js::idb::IDBObjectStore::IDBObjectStore ( RefPtr< IDBTransaction transaction,
const std::string &  name 
)

Definition at line 31 of file object_store.cc.

Member Function Documentation

§ Add()

ExceptionOr< RefPtr< IDBRequest > > shaka::js::idb::IDBObjectStore::Add ( Any  value,
optional< IdbKeyType key 
)

Definition at line 43 of file object_store.cc.

§ AddOrPut()

ExceptionOr< RefPtr< IDBRequest > > shaka::js::idb::IDBObjectStore::AddOrPut ( Any  value,
optional< IdbKeyType key,
bool  no_overwrite 
)

Definition at line 53 of file object_store.cc.

§ Delete()

ExceptionOr< RefPtr< IDBRequest > > shaka::js::idb::IDBObjectStore::Delete ( IdbKeyType  key)

Definition at line 84 of file object_store.cc.

§ Get()

ExceptionOr< RefPtr< IDBRequest > > shaka::js::idb::IDBObjectStore::Get ( IdbKeyType  key)

Definition at line 97 of file object_store.cc.

§ OpenCursor()

ExceptionOr< RefPtr< IDBRequest > > shaka::js::idb::IDBObjectStore::OpenCursor ( optional< IdbKeyType range,
optional< IDBCursorDirection direction 
)

Definition at line 111 of file object_store.cc.

§ Put()

ExceptionOr< RefPtr< IDBRequest > > shaka::js::idb::IDBObjectStore::Put ( Any  value,
optional< IdbKeyType key 
)

Definition at line 48 of file object_store.cc.

§ Trace()

Doxygen_Skip void shaka::js::idb::IDBObjectStore::Trace ( memory::HeapTracer tracer) const
overridevirtual

Called during a GC run. This should call HeapTracer::Trace on all Traceable members. Be sure to call the base method when overriding.

Implements shaka::memory::Traceable.

Definition at line 38 of file object_store.cc.

Member Data Documentation

§ auto_increment

const bool shaka::js::idb::IDBObjectStore::auto_increment = true

Definition at line 45 of file object_store.h.

§ key_path

const optional<std::string> shaka::js::idb::IDBObjectStore::key_path

Definition at line 46 of file object_store.h.

§ store_name

const std::string shaka::js::idb::IDBObjectStore::store_name

Definition at line 47 of file object_store.h.

§ transaction

const Member<IDBTransaction> shaka::js::idb::IDBObjectStore::transaction

Definition at line 48 of file object_store.h.


The documentation for this class was generated from the following files: