Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
dbiplus::SqliteDatabase Class Reference

#include <sqlitedataset.h>

Inheritance diagram for dbiplus::SqliteDatabase:
dbiplus::Database

Public Member Functions

 SqliteDatabase ()
 
 ~SqliteDatabase () override
 
DatasetCreateDataset () const override
 
sqlite3 * getHandle ()
 
int status () override
 
int setErr (int err_code, const char *qry) override
 
const char * getErrorMsg () override
 
void setHostName (const char *newHost) override
 
void setDatabase (const char *newDb) override
 
int connect (bool create) override
 
void disconnect () override
 
int postconnect () override
 
int create () override
 
int drop () override
 
bool exists () override
 
int copy (const char *backup_name) override
 
int drop_analytics (void) override
 
long nextid (const char *seq_name) override
 
void start_transaction () override
 
void commit_transaction () override
 
void rollback_transaction () override
 
std::string vprepare (const char *format, va_list args) override
 Prepare a SQL statement for execution or querying using C printf nomenclature.
 
bool in_transaction () override
 
- Public Member Functions inherited from dbiplus::Database
 Database ()
 
virtual ~Database ()
 
const char * getHostName (void) const
 
void setPort (const char *newPort)
 
const char * getPort (void) const
 
const char * getDatabase (void) const
 
void setLogin (const char *newLogin)
 
const char * getLogin (void) const
 
void setPasswd (const char *newPasswd)
 
const char * getPasswd (void) const
 
virtual bool isActive (void) const
 
void setSequenceTable (const char *new_seq_table)
 
const char * getSequenceTable (void)
 
const char * getDefaultCharset (void)
 
virtual void setConfig (const char *newKey, const char *newCert, const char *newCA, const char *newCApath, const char *newCiphers, bool newCompression)
 
virtual int init (void)
 
virtual int connectFull (const char *newDb, const char *newHost=NULL, const char *newLogin=NULL, const char *newPasswd=NULL, const char *newPort=NULL, const char *newKey=NULL, const char *newCert=NULL, const char *newCA=NULL, const char *newCApath=NULL, const char *newCiphers=NULL, bool newCompression=false)
 
virtual int reset (void)
 
virtual std::string prepare (const char *format,...)
 Prepare a SQL statement for execution or querying using C printf nomenclature.
 

Protected Attributes

sqlite3 * conn
 
bool _in_transaction
 
int last_err
 
- Protected Attributes inherited from dbiplus::Database
bool active
 
bool compression
 
std::string error
 
std::string host
 
std::string port
 
std::string db
 
std::string login
 
std::string passwd
 
std::string sequence_table
 
std::string default_charset
 
std::string key
 
std::string cert
 
std::string ca
 
std::string capath
 
std::string ciphers
 

Constructor & Destructor Documentation

◆ SqliteDatabase()

dbiplus::SqliteDatabase::SqliteDatabase ( )

◆ ~SqliteDatabase()

dbiplus::SqliteDatabase::~SqliteDatabase ( )
override

Member Function Documentation

◆ commit_transaction()

void dbiplus::SqliteDatabase::commit_transaction ( )
overridevirtual

Reimplemented from dbiplus::Database.

◆ connect()

int dbiplus::SqliteDatabase::connect ( bool create)
overridevirtual

Reimplemented from dbiplus::Database.

◆ copy()

int dbiplus::SqliteDatabase::copy ( const char * backup_name)
overridevirtual

Reimplemented from dbiplus::Database.

◆ create()

int dbiplus::SqliteDatabase::create ( void )
overridevirtual

Reimplemented from dbiplus::Database.

◆ CreateDataset()

Dataset * dbiplus::SqliteDatabase::CreateDataset ( ) const
overridevirtual

Implements dbiplus::Database.

◆ disconnect()

void dbiplus::SqliteDatabase::disconnect ( void )
overridevirtual

Reimplemented from dbiplus::Database.

◆ drop()

int dbiplus::SqliteDatabase::drop ( void )
overridevirtual

Reimplemented from dbiplus::Database.

◆ drop_analytics()

int dbiplus::SqliteDatabase::drop_analytics ( void )
overridevirtual

Reimplemented from dbiplus::Database.

◆ exists()

bool dbiplus::SqliteDatabase::exists ( void )
overridevirtual

Reimplemented from dbiplus::Database.

◆ getErrorMsg()

const char * dbiplus::SqliteDatabase::getErrorMsg ( void )
overridevirtual

Reimplemented from dbiplus::Database.

◆ getHandle()

sqlite3 * dbiplus::SqliteDatabase::getHandle ( )
inline

◆ in_transaction()

bool dbiplus::SqliteDatabase::in_transaction ( )
inlineoverridevirtual

Reimplemented from dbiplus::Database.

◆ nextid()

long dbiplus::SqliteDatabase::nextid ( const char * seq_name)
overridevirtual

Implements dbiplus::Database.

◆ postconnect()

int dbiplus::SqliteDatabase::postconnect ( )
overridevirtual

Reimplemented from dbiplus::Database.

◆ rollback_transaction()

void dbiplus::SqliteDatabase::rollback_transaction ( )
overridevirtual

Reimplemented from dbiplus::Database.

◆ setDatabase()

void dbiplus::SqliteDatabase::setDatabase ( const char * newDb)
overridevirtual

Reimplemented from dbiplus::Database.

◆ setErr()

int dbiplus::SqliteDatabase::setErr ( int err_code,
const char * qry )
overridevirtual

Implements dbiplus::Database.

◆ setHostName()

void dbiplus::SqliteDatabase::setHostName ( const char * newHost)
overridevirtual

Reimplemented from dbiplus::Database.

◆ start_transaction()

void dbiplus::SqliteDatabase::start_transaction ( )
overridevirtual

Reimplemented from dbiplus::Database.

◆ status()

int dbiplus::SqliteDatabase::status ( void )
overridevirtual

Reimplemented from dbiplus::Database.

◆ vprepare()

std::string dbiplus::SqliteDatabase::vprepare ( const char * format,
va_list args )
overridevirtual

Prepare a SQL statement for execution or querying using C printf nomenclature.

Parameters
format- C printf compliant format string
args- va_list of variables for substitution in format string placeholders.
Returns
escaped and formatted string.

Implements dbiplus::Database.

Member Data Documentation

◆ _in_transaction

bool dbiplus::SqliteDatabase::_in_transaction
protected

◆ conn

sqlite3* dbiplus::SqliteDatabase::conn
protected

◆ last_err

int dbiplus::SqliteDatabase::last_err
protected

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