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

#include <mysqldataset.h>

Inheritance diagram for dbiplus::MysqlDatabase:
dbiplus::Database

Public Member Functions

 MysqlDatabase ()
 
 ~MysqlDatabase () override
 
DatasetCreateDataset () const override
 
MYSQL * getHandle ()
 
int status () override
 
int setErr (int err_code, const char *qry) override
 
const char * getErrorMsg () override
 
int connect (bool create) override
 
void disconnect () 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
 
int query_with_reconnect (const char *query)
 
void configure_connection ()
 
- Public Member Functions inherited from dbiplus::Database
 Database ()
 
virtual ~Database ()
 
virtual void setHostName (const char *newHost)
 
const char * getHostName (void) const
 
void setPort (const char *newPort)
 
const char * getPort (void) const
 
virtual void setDatabase (const char *newDb)
 
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 postconnect ()
 
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

MYSQL * 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

◆ MysqlDatabase()

dbiplus::MysqlDatabase::MysqlDatabase ( )

◆ ~MysqlDatabase()

dbiplus::MysqlDatabase::~MysqlDatabase ( )
override

Member Function Documentation

◆ commit_transaction()

void dbiplus::MysqlDatabase::commit_transaction ( )
overridevirtual

Reimplemented from dbiplus::Database.

◆ configure_connection()

void dbiplus::MysqlDatabase::configure_connection ( )

◆ connect()

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

Reimplemented from dbiplus::Database.

◆ copy()

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

Reimplemented from dbiplus::Database.

◆ create()

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

Reimplemented from dbiplus::Database.

◆ CreateDataset()

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

Implements dbiplus::Database.

◆ disconnect()

void dbiplus::MysqlDatabase::disconnect ( void )
overridevirtual

Reimplemented from dbiplus::Database.

◆ drop()

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

Reimplemented from dbiplus::Database.

◆ drop_analytics()

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

Reimplemented from dbiplus::Database.

◆ exists()

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

Reimplemented from dbiplus::Database.

◆ getErrorMsg()

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

Reimplemented from dbiplus::Database.

◆ getHandle()

MYSQL * dbiplus::MysqlDatabase::getHandle ( )
inline

◆ in_transaction()

bool dbiplus::MysqlDatabase::in_transaction ( )
inlineoverridevirtual

Reimplemented from dbiplus::Database.

◆ nextid()

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

Implements dbiplus::Database.

◆ query_with_reconnect()

int dbiplus::MysqlDatabase::query_with_reconnect ( const char * query)

◆ rollback_transaction()

void dbiplus::MysqlDatabase::rollback_transaction ( )
overridevirtual

Reimplemented from dbiplus::Database.

◆ setErr()

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

Implements dbiplus::Database.

◆ start_transaction()

void dbiplus::MysqlDatabase::start_transaction ( )
overridevirtual

Reimplemented from dbiplus::Database.

◆ status()

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

Reimplemented from dbiplus::Database.

◆ vprepare()

std::string dbiplus::MysqlDatabase::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::MysqlDatabase::_in_transaction
protected

◆ conn

MYSQL* dbiplus::MysqlDatabase::conn
protected

◆ last_err

int dbiplus::MysqlDatabase::last_err
protected

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