|
sqlite3 *(* | GetHandle )() |
| Return's the bot's sqlite3 handle. More...
|
|
int(* | Query )(const char *query, sqlite3_callback cb, void *parm, char **error) |
|
void(* | Free )(char *ptr) |
|
int(* | GetTable )(const char *query, char ***resultp, int *nrow, int *ncolumn, char **errmsg) |
|
const char *(* | GetTableEntry )(int row, int col, char **result, int nrow, int ncol) |
|
void(* | FreeTable )(char **result) |
|
char *(* | MPrintf )(const char *fmt,...) |
| Identical to sqlite3_mprintf, free returned string with API_db::Free. More...
|
|
void(* | Lock )() |
| Lock the database for exclusive access, only use this if you have to (mainly for InsertID) More...
|
|
void(* | Release )() |
| Release the database lock. More...
|
|
int64(* | InsertID )() |
| Last insert ID. More...
|
|
This structure contains functions related to the bot's internal SQLite DB. Plugins can use this to store any kind of information they want.
If you create your own tables make sure to prefix them with something unique to make sure it doesn't conflict with anyone else's work.
Also do not mess with the busy/timeout handlers, by default IRCBot will handle that for you in Query/GetTable and try the query several times to make sure it works.
I won't document all these functions since they work the same way as sqlite3's API so you can just read up there.
- See also
- http://www.sqlite.org/c3ref/intro.html