![]() |
TkN 2.1
Toolkit for Nuclei
|
Interface to the sqlite database. More...
Interface to the sqlite database.
Definition at line 57 of file tkdatabase.h.
#include <tkdatabase.h>
Public Member Functions | |
tkdatabase (bool opening_db=true) | |
virtual | ~tkdatabase ()=default |
void | add_table (tkdb_table &_table) |
void | begin (tkstring _selection, tkstring _from, tkstring _condition="", tkstring _loop_name="default", tkstring _extra_cmd="") |
void | close () |
int | count (const tkstring &_from, const tkstring &_condition="") |
resets column values and ends the select statement More... | |
void | end (const tkstring &_loop_name="default") |
reads the next entry coresponding to the select statement and fills columns More... | |
int | exec_sql (const char *_cmd) |
returns the first value for selection More... | |
tkstring | get_full_name () |
tkstring | get_name () |
sqlite3 * | get_sql_db () |
tkdb_table * | get_table (tkstring _table_name) |
tkstring | get_value (tkstring _selection, tkstring _from, tkstring _condition="") |
std::vector< tkstring > & | get_views () |
bool | has_table (const tkstring &_table_name) |
bool | has_view (const tkstring &_table_name) |
void | load_tables () |
void | load_views () |
tkdb_table & | new_table (tkstring _table_name) |
bool | next (const tkstring &_loop_name="default") |
executes the select statement More... | |
sqlite3 * | open (tkstring _db, tkstring _option="OPEN") |
tkdb_table & | operator[] (const char *_table) |
void | print (const tkstring &_properties="", const tkstring &_opt="") |
void | remove_table (tkstring _table_name) |
void | set_sql_db (sqlite3 *_sql_db) |
Static Public Member Functions | |
static int | getdir (tkstring _dir, std::vector< tkstring > &_files) |
static void | list_files (tkstring _dir, tkstring _pattern) |
static tkdatabase * | the_database () |
tkdatabase | ( | bool | opening_db = true | ) |
Definition at line 72 of file tkdatabase.cpp.
|
virtualdefault |
void add_table | ( | tkdb_table & | _table | ) |
Definition at line 172 of file tkdatabase.cpp.
void begin | ( | tkstring | _selection, |
tkstring | _from, | ||
tkstring | _condition = "" , |
||
tkstring | _loop_name = "default" , |
||
tkstring | _extra_cmd = "" |
||
) |
Definition at line 219 of file tkdatabase.cpp.
void close | ( | ) |
Definition at line 140 of file tkdatabase.cpp.
resets column values and ends the select statement
Definition at line 296 of file tkdatabase.cpp.
void end | ( | const tkstring & | _loop_name = "default" | ) |
reads the next entry coresponding to the select statement and fills columns
Definition at line 280 of file tkdatabase.cpp.
int exec_sql | ( | const char * | _cmd | ) |
returns the first value for selection
Definition at line 327 of file tkdatabase.cpp.
|
inline |
Definition at line 89 of file tkdatabase.h.
|
inline |
Definition at line 88 of file tkdatabase.h.
|
inline |
Definition at line 84 of file tkdatabase.h.
tkdb_table * get_table | ( | tkstring | _table_name | ) |
Definition at line 200 of file tkdatabase.cpp.
Definition at line 304 of file tkdatabase.cpp.
|
inline |
Definition at line 97 of file tkdatabase.h.
bool has_table | ( | const tkstring & | _table_name | ) |
Definition at line 177 of file tkdatabase.cpp.
bool has_view | ( | const tkstring & | _table_name | ) |
Definition at line 182 of file tkdatabase.cpp.
void load_tables | ( | ) |
Definition at line 145 of file tkdatabase.cpp.
void load_views | ( | ) |
Definition at line 159 of file tkdatabase.cpp.
tkdb_table & new_table | ( | tkstring | _table_name | ) |
Definition at line 187 of file tkdatabase.cpp.
bool next | ( | const tkstring & | _loop_name = "default" | ) |
executes the select statement
Definition at line 245 of file tkdatabase.cpp.
Definition at line 80 of file tkdatabase.cpp.
|
inline |
Definition at line 108 of file tkdatabase.h.
Definition at line 205 of file tkdatabase.cpp.
void remove_table | ( | tkstring | _table_name | ) |
Definition at line 193 of file tkdatabase.cpp.
|
inline |
Definition at line 83 of file tkdatabase.h.
|
static |
Definition at line 59 of file tkdatabase.cpp.