FFmpegfs Fuse Multi Media Filesystem 2.16
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Cache::sqlite_t Class Reference

The sqlite_t class Wrapper for sqlite3 struct to make use of std::shared_ptr. More...

#include <cache.h>

Public Member Functions

 sqlite_t (const std::string &filename, int flags, const char *zVfs=nullptr)
 Construct sqlite_t object. More...
 
virtual ~sqlite_t ()
 Free sqlite_t object. More...
 
int ret () const
 Return code of last Sqlite operation. More...
 
 operator sqlite3 * ()
 operator sqlite_t * Default return operator. More...
 
const std::string & filename () const
 Get current database file name. More...
 

Public Attributes

sqlite3_stmtm_select_stmt
 Prepared select statement. More...
 
sqlite3_stmtm_insert_stmt
 Prepared insert statement. More...
 
sqlite3_stmtm_delete_stmt
 Prepared delete statement. More...
 

Protected Attributes

int m_ret
 Return code of last SQL operation. More...
 
std::string m_filename
 Name of SQLite cache index database. More...
 
sqlite3m_db_handle
 SQLite handle of cache index database. More...
 

Detailed Description

The sqlite_t class Wrapper for sqlite3 struct to make use of std::shared_ptr.

Definition at line 141 of file cache.h.

Constructor & Destructor Documentation

◆ sqlite_t()

Cache::sqlite_t::sqlite_t ( const std::string &  filename,
int  flags,
const char *  zVfs = nullptr 
)
explicit

Construct sqlite_t object.

Parameters
[in]filename- Database filename (UTF-8)
[in]flags- Flags
[in]zVfs- Name of VFS module to use

Definition at line 48 of file cache.cc.

References m_db_handle, m_filename, and m_ret.

◆ ~sqlite_t()

Cache::sqlite_t::~sqlite_t ( )
virtual

Free sqlite_t object.

Definition at line 58 of file cache.cc.

Member Function Documentation

◆ filename()

const std::string & Cache::sqlite_t::filename ( ) const
inline

Get current database file name.

Returns
Returns current database file name

Definition at line 181 of file cache.h.

References m_filename.

◆ operator sqlite3 *()

Cache::sqlite_t::operator sqlite3 * ( )
inline

operator sqlite_t * Default return operator.

Returns
Returns sqlite_t handle. May be nullptr if invalid.

Definition at line 175 of file cache.h.

References m_db_handle.

◆ ret()

int Cache::sqlite_t::ret ( ) const
inline

Return code of last Sqlite operation.

Returns
Returns result code of last Sqlite operation

Definition at line 160 of file cache.h.

References m_ret.

Member Data Documentation

◆ m_db_handle

sqlite3* Cache::sqlite_t::m_db_handle
protected

SQLite handle of cache index database.

Definition at line 186 of file cache.h.

Referenced by operator sqlite3 *(), and sqlite_t().

◆ m_delete_stmt

sqlite3_stmt* Cache::sqlite_t::m_delete_stmt

Prepared delete statement.

Definition at line 190 of file cache.h.

◆ m_filename

std::string Cache::sqlite_t::m_filename
protected

Name of SQLite cache index database.

Definition at line 185 of file cache.h.

Referenced by filename(), and sqlite_t().

◆ m_insert_stmt

sqlite3_stmt* Cache::sqlite_t::m_insert_stmt

Prepared insert statement.

Definition at line 189 of file cache.h.

◆ m_ret

int Cache::sqlite_t::m_ret
protected

Return code of last SQL operation.

Definition at line 184 of file cache.h.

Referenced by ret(), and sqlite_t().

◆ m_select_stmt

sqlite3_stmt* Cache::sqlite_t::m_select_stmt

Prepared select statement.

Definition at line 188 of file cache.h.


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