mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-17 17:51:59 +00:00
FS-9741: lua expose db err str in freeeswitch.dbh
Added 2 methods to lua freeswitch.Dbh `last_error()` Returns the error string from the last query or nil. `clear_error()` clears the error string.
This commit is contained in:
@@ -58,6 +58,7 @@ namespace LUA {
|
||||
class Dbh {
|
||||
protected:
|
||||
switch_cache_db_handle_t *dbh;
|
||||
char *err;
|
||||
bool m_connected;
|
||||
static int query_callback(void *pArg, int argc, char **argv, char **cargv);
|
||||
public:
|
||||
@@ -68,6 +69,8 @@ namespace LUA {
|
||||
bool test_reactive(char *test_sql, char *drop_sql = NULL, char *reactive_sql = NULL);
|
||||
bool query(char *sql, SWIGLUA_FN lua_fun);
|
||||
int affected_rows();
|
||||
char *last_error();
|
||||
void clear_error();
|
||||
int load_extension(const char *extension);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user