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

#include <dataset.h>

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

Public Member Functions

 Database ()
 
virtual ~Database ()
 
virtual DatasetCreateDataset () const =0
 
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 status (void)
 
virtual int setErr (int err_code, const char *qry)=0
 
virtual const char * getErrorMsg (void)
 
virtual int connect (bool create)
 
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 void disconnect (void)
 
virtual int reset (void)
 
virtual int create (void)
 
virtual int drop (void)
 
virtual long nextid (const char *seq_name)=0
 
virtual int copy (const char *new_name)
 
virtual int drop_analytics (void)
 
virtual bool exists (void)
 
virtual void start_transaction ()
 
virtual void commit_transaction ()
 
virtual void rollback_transaction ()
 
virtual std::string prepare (const char *format,...)
 Prepare a SQL statement for execution or querying using C printf nomenclature.
 
virtual std::string vprepare (const char *format, va_list args)=0
 Prepare a SQL statement for execution or querying using C printf nomenclature.
 
virtual bool in_transaction ()
 

Protected Attributes

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

◆ Database()

dbiplus::Database::Database ( )

◆ ~Database()

dbiplus::Database::~Database ( )
virtual

Member Function Documentation

◆ commit_transaction()

virtual void dbiplus::Database::commit_transaction ( )
inlinevirtual

◆ connect()

virtual int dbiplus::Database::connect ( bool create)
inlinevirtual

◆ connectFull()

int dbiplus::Database::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

◆ copy()

virtual int dbiplus::Database::copy ( const char * new_name)
inlinevirtual

◆ create()

virtual int dbiplus::Database::create ( void )
inlinevirtual

◆ CreateDataset()

virtual Dataset * dbiplus::Database::CreateDataset ( ) const
pure virtual

◆ disconnect()

virtual void dbiplus::Database::disconnect ( void )
inlinevirtual

◆ drop()

virtual int dbiplus::Database::drop ( void )
inlinevirtual

◆ drop_analytics()

virtual int dbiplus::Database::drop_analytics ( void )
inlinevirtual

◆ exists()

virtual bool dbiplus::Database::exists ( void )
inlinevirtual

◆ getDatabase()

const char * dbiplus::Database::getDatabase ( void ) const
inline

◆ getDefaultCharset()

const char * dbiplus::Database::getDefaultCharset ( void )
inline

◆ getErrorMsg()

virtual const char * dbiplus::Database::getErrorMsg ( void )
inlinevirtual

◆ getHostName()

const char * dbiplus::Database::getHostName ( void ) const
inline

◆ getLogin()

const char * dbiplus::Database::getLogin ( void ) const
inline

◆ getPasswd()

const char * dbiplus::Database::getPasswd ( void ) const
inline

◆ getPort()

const char * dbiplus::Database::getPort ( void ) const
inline

◆ getSequenceTable()

const char * dbiplus::Database::getSequenceTable ( void )
inline

◆ in_transaction()

virtual bool dbiplus::Database::in_transaction ( )
inlinevirtual

◆ init()

virtual int dbiplus::Database::init ( void )
inlinevirtual

◆ isActive()

virtual bool dbiplus::Database::isActive ( void ) const
inlinevirtual

◆ nextid()

virtual long dbiplus::Database::nextid ( const char * seq_name)
pure virtual

◆ prepare()

std::string dbiplus::Database::prepare ( const char * format,
... )
virtual

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

Parameters
format- C printf compliant format string
...- optional comma separated list of variables for substitution in format string placeholders.
Returns
escaped and formatted string.

◆ reset()

virtual int dbiplus::Database::reset ( void )
inlinevirtual

◆ rollback_transaction()

virtual void dbiplus::Database::rollback_transaction ( )
inlinevirtual

◆ setConfig()

virtual void dbiplus::Database::setConfig ( const char * newKey,
const char * newCert,
const char * newCA,
const char * newCApath,
const char * newCiphers,
bool newCompression )
inlinevirtual

◆ setDatabase()

virtual void dbiplus::Database::setDatabase ( const char * newDb)
inlinevirtual

Reimplemented in dbiplus::SqliteDatabase.

◆ setErr()

virtual int dbiplus::Database::setErr ( int err_code,
const char * qry )
pure virtual

◆ setHostName()

virtual void dbiplus::Database::setHostName ( const char * newHost)
inlinevirtual

Reimplemented in dbiplus::SqliteDatabase.

◆ setLogin()

void dbiplus::Database::setLogin ( const char * newLogin)
inline

◆ setPasswd()

void dbiplus::Database::setPasswd ( const char * newPasswd)
inline

◆ setPort()

void dbiplus::Database::setPort ( const char * newPort)
inline

◆ setSequenceTable()

void dbiplus::Database::setSequenceTable ( const char * new_seq_table)
inline

◆ start_transaction()

virtual void dbiplus::Database::start_transaction ( )
inlinevirtual

◆ status()

virtual int dbiplus::Database::status ( void )
inlinevirtual

◆ vprepare()

virtual std::string dbiplus::Database::vprepare ( const char * format,
va_list args )
pure virtual

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.

Implemented in dbiplus::MysqlDatabase, and dbiplus::SqliteDatabase.

Member Data Documentation

◆ active

bool dbiplus::Database::active
protected

◆ ca

std::string dbiplus::Database::ca
protected

◆ capath

std::string dbiplus::Database::capath
protected

◆ cert

std::string dbiplus::Database::cert
protected

◆ ciphers

std::string dbiplus::Database::ciphers
protected

◆ compression

bool dbiplus::Database::compression
protected

◆ db

std::string dbiplus::Database::db
protected

◆ default_charset

std::string dbiplus::Database::default_charset
protected

◆ error

std::string dbiplus::Database::error
protected

◆ host

std::string dbiplus::Database::host
protected

◆ key

std::string dbiplus::Database::key
protected

◆ login

std::string dbiplus::Database::login
protected

◆ passwd

std::string dbiplus::Database::passwd
protected

◆ port

std::string dbiplus::Database::port
protected

◆ sequence_table

std::string dbiplus::Database::sequence_table
protected

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