freeswitch/src/mod/legacy/languages/mod_lua
Peter Wu 8e4423f126 Document Dbh.test_reactive, return saner values
In the FreeSWITCH core, the return value of switch_case_db_test_reactive
is ignored, but it is usable in LUA modules (and other bindings via
SWIG). The LUA API example[1] shows how to check the return value, but
that example miserably fails if the database did not exist before.

Changes:

 - Document the expected behavior of the test_reactive function.
 - Assert that test_sql and sql_reactive are both given. If either
   query is not given, the caller is using the wrong API.
 - When SCF_AUTO_SCHEMAS is cleared, use the return value of the
   test_sql execution. Does anybody use this? Why not remove it?
 - Do not unconditionally return SWITCH_FALSE when test_sql fails,
   instead allow it to become SWITCH_TRUE when reactive_sql passes.
 - Remove the unnecessary test_sql check for SCDB_TYPE_CORE_DB
   (this is now enforced through an assert check). (+reindent)
 - Clarify the error message of drop_sql, prepending "Ignoring" to
   the "SQL ERR" message.
 - LUA: Do not print "DBH NOT Connected" if the query fails. This was
   the initial source of confusion.

 [1]: https://confluence.freeswitch.org/display/FREESWITCH/Lua+API+Reference
2014-09-15 15:39:08 +02:00
..
lua add legacy subdir for mods with 5.1 edition of mod_lua, change languages/mod_lua to legacy/languages/mod_lua in modules.conf to use older lua mod 2014-01-10 01:25:51 +05:00
.gitattributes Catch more swig-generated files with gitattributes 2014-09-04 03:36:44 +00:00
.gitignore Update gitignore 2014-04-05 07:57:05 +00:00
Makefile.am reswig 2014-01-10 01:28:58 +05:00
freeswitch.i FS-6615 test this patch 2014-07-16 19:33:10 +05:00
freeswitch_lua.cpp Document Dbh.test_reactive, return saner values 2014-09-15 15:39:08 +02:00
freeswitch_lua.h add legacy subdir for mods with 5.1 edition of mod_lua, change languages/mod_lua to legacy/languages/mod_lua in modules.conf to use older lua mod 2014-01-10 01:25:51 +05:00
hack.diff add legacy subdir for mods with 5.1 edition of mod_lua, change languages/mod_lua to legacy/languages/mod_lua in modules.conf to use older lua mod 2014-01-10 01:25:51 +05:00
lua-mode.el add legacy subdir for mods with 5.1 edition of mod_lua, change languages/mod_lua to legacy/languages/mod_lua in modules.conf to use older lua mod 2014-01-10 01:25:51 +05:00
mod_lua.2008.vcproj add legacy subdir for mods with 5.1 edition of mod_lua, change languages/mod_lua to legacy/languages/mod_lua in modules.conf to use older lua mod 2014-01-10 01:25:51 +05:00
mod_lua.2010.vcxproj add legacy subdir for mods with 5.1 edition of mod_lua, change languages/mod_lua to legacy/languages/mod_lua in modules.conf to use older lua mod 2014-01-10 01:25:51 +05:00
mod_lua.2012.vcxproj add legacy subdir for mods with 5.1 edition of mod_lua, change languages/mod_lua to legacy/languages/mod_lua in modules.conf to use older lua mod 2014-01-10 01:25:51 +05:00
mod_lua.cpp FS-6241 applying the patch to the legacy 5.1 mod_lua as well 2014-02-19 15:08:49 -08:00
mod_lua.log add legacy subdir for mods with 5.1 edition of mod_lua, change languages/mod_lua to legacy/languages/mod_lua in modules.conf to use older lua mod 2014-01-10 01:25:51 +05:00
mod_lua.vcproj add legacy subdir for mods with 5.1 edition of mod_lua, change languages/mod_lua to legacy/languages/mod_lua in modules.conf to use older lua mod 2014-01-10 01:25:51 +05:00
mod_lua_extra.c add legacy subdir for mods with 5.1 edition of mod_lua, change languages/mod_lua to legacy/languages/mod_lua in modules.conf to use older lua mod 2014-01-10 01:25:51 +05:00
mod_lua_extra.h add legacy subdir for mods with 5.1 edition of mod_lua, change languages/mod_lua to legacy/languages/mod_lua in modules.conf to use older lua mod 2014-01-10 01:25:51 +05:00
mod_lua_wrap.cpp swigall 2014-09-06 07:18:38 +08:00
my_swigable_cpp.h add legacy subdir for mods with 5.1 edition of mod_lua, change languages/mod_lua to legacy/languages/mod_lua in modules.conf to use older lua mod 2014-01-10 01:25:51 +05:00