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

#include <mysqldataset.h>

Inheritance diagram for dbiplus::MysqlDataset:
dbiplus::Dataset

Public Member Functions

 MysqlDataset ()
 
 MysqlDataset (MysqlDatabase *newDb)
 
 ~MysqlDataset () override
 
void set_autorefresh (bool val)
 
void open () override
 
void open (const std::string &sql) override
 
int exec () override
 
int exec (const std::string &sql) override
 
const voidgetExecRes () override
 
bool query (const std::string &query) override
 
void close (void) override
 
void cancel () override
 
int64_t lastinsertid () override
 
long nextid (const char *seq_name) override
 
int num_rows () override
 
void interrupt () override
 
bool bof () override
 
bool eof () override
 
void first () override
 
void last () override
 
void prev () override
 
void next () override
 
bool seek (int pos=0) override
 
bool dropIndex (const char *table, const char *index) override
 Drop an index from the database table, provided it exists.
 
- Public Member Functions inherited from dbiplus::Dataset
 Dataset ()
 
 Dataset (Database *newDb)
 
virtual ~Dataset ()
 
void setDatabase (Database *newDb)
 
DatabasegetDatabase (void)
 
void setExecSql (const char *newSql)
 
const char * getExecSql (void)
 
virtual bool isActive (void)
 
virtual void setSqlParams (sqlType t, const char *sqlFrmt,...)
 
virtual void refresh ()
 
virtual bool goto_rec (int pos=1)
 
virtual void insert ()
 
virtual void append ()
 
virtual void edit ()
 
virtual void del ()
 
virtual void post ()
 
virtual void deletion ()
 
virtual void setParamList (const ParamList &params)
 
virtual bool locate ()
 
virtual bool locate (const ParamList &params)
 
virtual bool findNext ()
 
virtual int field_count ()
 
virtual int fieldCount ()
 
virtual const char * fieldName (int n)
 
virtual int fieldIndex (const char *fn)
 
virtual bool set_field_value (const char *f_name, const field_value &value)
 
virtual bool sf (const char *f, const field_value &v)
 
virtual const field_valueget_field_value (const char *f_name)
 
virtual const field_valueget_field_value (int index)
 
const field_valuefv (const char *f)
 
const field_valuefv (int index)
 
void set_autocommit (bool v)
 
bool get_autocommit ()
 
Fieldsget_fields_object ()
 
Fieldsget_edit_object ()
 
const result_setget_result_set ()
 
const sql_recordget_sql_record ()
 
dsStates get_state ()
 
void set_select_sql (const char *sel_sql)
 
void set_select_sql (const std::string &select_sql)
 
void add_update_sql (const char *upd_sql)
 
void add_update_sql (const std::string &upd_sql)
 
void add_insert_sql (const char *ins_sql)
 
void add_insert_sql (const std::string &ins_sql)
 
void add_delete_sql (const char *del_sql)
 
void add_delete_sql (const std::string &del_sql)
 
void clear_update_sql ()
 
void clear_insert_sql ()
 
void clear_delete_sql ()
 
size_t insert_sql_count ()
 
size_t delete_sql_count ()
 
const char * get_select_sql ()
 

Protected Member Functions

MYSQL * handle ()
 
virtual void make_query (StringList &_sql)
 
void make_insert () override
 
void make_edit () override
 
void make_deletion () override
 
void fill_fields () override
 
virtual void free_row ()
 
- Protected Member Functions inherited from dbiplus::Dataset
void parse_sql (std::string &sql)
 
virtual field_value f_old (const char *f)
 
char * str_toLower (char *s)
 

Additional Inherited Members

- Protected Attributes inherited from dbiplus::Dataset
Databasedb
 
dsStates ds_state
 
Fieldsfields_object
 
Fieldsedit_object
 
std::unordered_map< std::string, unsigned intname2indexMap
 
result_set result
 
result_set exec_res
 
bool autorefresh
 
bool active
 
bool haveError
 
int frecno
 
std::string sql
 
ParamList plist
 
bool fbof
 
bool feof
 
bool autocommit
 
std::string empty_sql
 
std::string select_sql
 
StringList update_sql
 
StringList insert_sql
 
StringList delete_sql
 

Constructor & Destructor Documentation

◆ MysqlDataset() [1/2]

dbiplus::MysqlDataset::MysqlDataset ( )

◆ MysqlDataset() [2/2]

dbiplus::MysqlDataset::MysqlDataset ( MysqlDatabase * newDb)
explicit

◆ ~MysqlDataset()

dbiplus::MysqlDataset::~MysqlDataset ( )
override

Member Function Documentation

◆ bof()

bool dbiplus::MysqlDataset::bof ( void )
overridevirtual

Reimplemented from dbiplus::Dataset.

◆ cancel()

void dbiplus::MysqlDataset::cancel ( )
overridevirtual

Reimplemented from dbiplus::Dataset.

◆ close()

void dbiplus::MysqlDataset::close ( void )
overridevirtual

Reimplemented from dbiplus::Dataset.

◆ dropIndex()

bool dbiplus::MysqlDataset::dropIndex ( const char * table,
const char * index )
overridevirtual

Drop an index from the database table, provided it exists.

Parameters
table- name of the table the index to be dropped is associated with
index- name of the index to be dropped
Returns
true when the index is guaranteed to no longer exist in the database.

Reimplemented from dbiplus::Dataset.

◆ eof()

bool dbiplus::MysqlDataset::eof ( void )
overridevirtual

Reimplemented from dbiplus::Dataset.

◆ exec() [1/2]

int dbiplus::MysqlDataset::exec ( )
overridevirtual

Implements dbiplus::Dataset.

◆ exec() [2/2]

int dbiplus::MysqlDataset::exec ( const std::string & sql)
overridevirtual
Todo
collect results and store in exec_res

Implements dbiplus::Dataset.

◆ fill_fields()

void dbiplus::MysqlDataset::fill_fields ( void )
overrideprotectedvirtual

Implements dbiplus::Dataset.

◆ first()

void dbiplus::MysqlDataset::first ( )
overridevirtual

Reimplemented from dbiplus::Dataset.

◆ free_row()

void dbiplus::MysqlDataset::free_row ( void )
protectedvirtual

◆ getExecRes()

const void * dbiplus::MysqlDataset::getExecRes ( )
overridevirtual

Implements dbiplus::Dataset.

◆ handle()

MYSQL * dbiplus::MysqlDataset::handle ( )
protected

◆ interrupt()

void dbiplus::MysqlDataset::interrupt ( )
overridevirtual

Reimplemented from dbiplus::Dataset.

◆ last()

void dbiplus::MysqlDataset::last ( )
overridevirtual

Reimplemented from dbiplus::Dataset.

◆ lastinsertid()

int64_t dbiplus::MysqlDataset::lastinsertid ( )
overridevirtual

Implements dbiplus::Dataset.

◆ make_deletion()

void dbiplus::MysqlDataset::make_deletion ( )
overrideprotectedvirtual

Implements dbiplus::Dataset.

◆ make_edit()

void dbiplus::MysqlDataset::make_edit ( )
overrideprotectedvirtual

Implements dbiplus::Dataset.

◆ make_insert()

void dbiplus::MysqlDataset::make_insert ( )
overrideprotectedvirtual

Implements dbiplus::Dataset.

◆ make_query()

void dbiplus::MysqlDataset::make_query ( StringList & _sql)
protectedvirtual

◆ next()

void dbiplus::MysqlDataset::next ( void )
overridevirtual

Reimplemented from dbiplus::Dataset.

◆ nextid()

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

Implements dbiplus::Dataset.

◆ num_rows()

int dbiplus::MysqlDataset::num_rows ( )
overridevirtual

Implements dbiplus::Dataset.

◆ open() [1/2]

void dbiplus::MysqlDataset::open ( )
overridevirtual

Implements dbiplus::Dataset.

◆ open() [2/2]

void dbiplus::MysqlDataset::open ( const std::string & sql)
overridevirtual

Implements dbiplus::Dataset.

◆ prev()

void dbiplus::MysqlDataset::prev ( void )
overridevirtual

Reimplemented from dbiplus::Dataset.

◆ query()

bool dbiplus::MysqlDataset::query ( const std::string & query)
overridevirtual

Implements dbiplus::Dataset.

◆ seek()

bool dbiplus::MysqlDataset::seek ( int pos = 0)
overridevirtual

Reimplemented from dbiplus::Dataset.

◆ set_autorefresh()

void dbiplus::MysqlDataset::set_autorefresh ( bool val)

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