Shaka Player Embedded
|
#include <sqlite.h>
Public Member Functions | |
SqliteConnection (const std::string &file_path) | |
~SqliteConnection () | |
SHAKA_NON_COPYABLE_OR_MOVABLE_TYPE (SqliteConnection) | |
DatabaseStatus | Init () |
DatabaseStatus | BeginTransaction (SqliteTransaction *transaction) |
DatabaseStatus | Flush () |
Represents a connection to a sqlite database. This sets up the connection and ensures the correct tables exist.
|
explicit |
DatabaseStatus shaka::js::idb::SqliteConnection::BeginTransaction | ( | SqliteTransaction * | transaction | ) |
DatabaseStatus shaka::js::idb::SqliteConnection::Flush | ( | ) |
Flushes pending transactions from the journal to the database. Note this doesn't need to be called and will be handled automatically by the database ending. Also note a crash will preserve the journal and there will be no data loss.
This is called to reduce the size of the journal to make reads faster. This can be called from a background thread to periodically update the journal. Calling this will not block other transactions from completing.
DatabaseStatus shaka::js::idb::SqliteConnection::Init | ( | ) |
shaka::js::idb::SqliteConnection::SHAKA_NON_COPYABLE_OR_MOVABLE_TYPE | ( | SqliteConnection | ) |