TkN 2.1
Toolkit for Nuclei
tkdb_table Class Reference

Representaiton of a sqlite data table. More...

Detailed Description

Representaiton of a sqlite data table.

Definition at line 51 of file tkdb_table.h.

#include <tkdb_table.h>

Classes

struct  measure_data_struct
 data structure used to fill a tkmeasure object from the sqlite database More...
 

Public Member Functions

 tkdb_table ()
 
 tkdb_table (const char *_name, sqlite3 *_db)
 
virtual ~tkdb_table ()
 
void add_column (const char *_colname, const char *_coltype)
 
void add_constraint (const char *_constraint)
 
void begin (tkstring _condition, tkstring _selection="*")
 
void end ()
 reads the next entry coresponding to the select statement and fills columns More...
 
rowget_columns ()
 
tkstring get_name ()
 
bool has_column (const tkstring &_col_name)
 
void load ()
 resets column values and ends the select statement More...
 
bool next ()
 executes the select statement More...
 
tkdb_columnoperator[] (const char *_column)
 
void print (const tkstring &_opt="")
 
void print_columns (const tkstring &_opt="")
 
void print_rows (const char *_selection, const char *_properties="*")
 
void push_dummy_row ()
 
void push_row ()
 
void read_measure (measure_data_struct &_struct, const tkstring &_col_base_name)
 
void reset_column_values ()
 
void update_row (const tkstring &_where)
 
void write_to_database ()
 

Constructor & Destructor Documentation

◆ tkdb_table() [1/2]

tkdb_table ( const char *  _name,
sqlite3 *  _db 
)

Definition at line 52 of file tkdb_table.cpp.

◆ tkdb_table() [2/2]

tkdb_table ( )
inline

Definition at line 113 of file tkdb_table.h.

◆ ~tkdb_table()

~tkdb_table ( )
virtualdefault

Member Function Documentation

◆ add_column()

void add_column ( const char *  _colname,
const char *  _coltype 
)

Definition at line 195 of file tkdb_table.cpp.

◆ add_constraint()

void add_constraint ( const char *  _constraint)

Definition at line 203 of file tkdb_table.cpp.

◆ begin()

void begin ( tkstring  _condition,
tkstring  _selection = "*" 
)

Definition at line 121 of file tkdb_table.cpp.

◆ end()

void end ( )

reads the next entry coresponding to the select statement and fills columns

Definition at line 163 of file tkdb_table.cpp.

◆ get_columns()

row & get_columns ( )
inline

Definition at line 139 of file tkdb_table.h.

◆ get_name()

tkstring get_name ( )
inline

Definition at line 116 of file tkdb_table.h.

◆ has_column()

bool has_column ( const tkstring _col_name)

Definition at line 209 of file tkdb_table.cpp.

◆ load()

void load ( )

resets column values and ends the select statement

Definition at line 62 of file tkdb_table.cpp.

◆ next()

bool next ( )

executes the select statement

Definition at line 140 of file tkdb_table.cpp.

◆ operator[]()

tkdb_column & operator[] ( const char *  _column)
inline

Definition at line 118 of file tkdb_table.h.

◆ print()

void print ( const tkstring _opt = "")

Definition at line 82 of file tkdb_table.cpp.

◆ print_columns()

void print_columns ( const tkstring _opt = "")

Definition at line 88 of file tkdb_table.cpp.

◆ print_rows()

void print_rows ( const char *  _selection,
const char *  _properties = "*" 
)

Definition at line 100 of file tkdb_table.cpp.

◆ push_dummy_row()

void push_dummy_row ( )

Definition at line 284 of file tkdb_table.cpp.

◆ push_row()

void push_row ( )

Definition at line 220 of file tkdb_table.cpp.

◆ read_measure()

void read_measure ( measure_data_struct _struct,
const tkstring _col_base_name 
)

Definition at line 304 of file tkdb_table.cpp.

◆ reset_column_values()

void reset_column_values ( )

Definition at line 214 of file tkdb_table.cpp.

◆ update_row()

void update_row ( const tkstring _where)

Definition at line 242 of file tkdb_table.cpp.

◆ write_to_database()

void write_to_database ( )

Definition at line 265 of file tkdb_table.cpp.


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