|
@@ -1,6 +1,4 @@
|
|
-/*
|
|
|
|
- * $Id$
|
|
|
|
- *
|
|
|
|
|
|
+/*
|
|
* UNIXODBC module interface
|
|
* UNIXODBC module interface
|
|
*
|
|
*
|
|
* Copyright (C) 2005-2006 Marco Lorrai
|
|
* Copyright (C) 2005-2006 Marco Lorrai
|
|
@@ -18,14 +16,11 @@
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
* GNU General Public License for more details.
|
|
*
|
|
*
|
|
- * You should have received a copy of the GNU General Public License
|
|
|
|
- * along with this program; if not, write to the Free Software
|
|
|
|
|
|
+ * You should have received a copy of the GNU General Public License
|
|
|
|
+ * along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*
|
|
*
|
|
*
|
|
*
|
|
- * History:
|
|
|
|
- * --------
|
|
|
|
- * 2005-12-01 initial commit (chgen)
|
|
|
|
*/
|
|
*/
|
|
|
|
|
|
#include "../../sr_module.h"
|
|
#include "../../sr_module.h"
|
|
@@ -39,6 +34,8 @@ int auto_reconnect = 1; /* Default is enabled */
|
|
int use_escape_common = 0; /* Enable common escaping */
|
|
int use_escape_common = 0; /* Enable common escaping */
|
|
int replace_query = 1; /* Enable ODBC replace query */
|
|
int replace_query = 1; /* Enable ODBC replace query */
|
|
|
|
|
|
|
|
+char *db_unixodbc_tquote = NULL;
|
|
|
|
+
|
|
MODULE_VERSION
|
|
MODULE_VERSION
|
|
|
|
|
|
int db_unixodbc_bind_api(db_func_t *dbb);
|
|
int db_unixodbc_bind_api(db_func_t *dbb);
|
|
@@ -60,12 +57,13 @@ static param_export_t params[] = {
|
|
{"ping_interval", INT_PARAM, &ping_interval},
|
|
{"ping_interval", INT_PARAM, &ping_interval},
|
|
{"auto_reconnect", INT_PARAM, &auto_reconnect},
|
|
{"auto_reconnect", INT_PARAM, &auto_reconnect},
|
|
{"use_escape_common", INT_PARAM, &use_escape_common},
|
|
{"use_escape_common", INT_PARAM, &use_escape_common},
|
|
- {"replace_query", INT_PARAM, &replace_query},
|
|
|
|
|
|
+ {"replace_query", INT_PARAM, &replace_query},
|
|
|
|
+ {"quote_char", PARAM_STRING, &db_unixodbc_tquote},
|
|
{0, 0, 0}
|
|
{0, 0, 0}
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
-struct module_exports exports = {
|
|
|
|
|
|
+struct module_exports exports = {
|
|
"db_unixodbc",
|
|
"db_unixodbc",
|
|
DEFAULT_DLFLAGS, /* dlopen flags */
|
|
DEFAULT_DLFLAGS, /* dlopen flags */
|
|
cmds,
|
|
cmds,
|
|
@@ -95,7 +93,7 @@ int db_unixodbc_bind_api(db_func_t *dbb)
|
|
dbb->raw_query = db_unixodbc_raw_query;
|
|
dbb->raw_query = db_unixodbc_raw_query;
|
|
dbb->free_result = db_unixodbc_free_result;
|
|
dbb->free_result = db_unixodbc_free_result;
|
|
dbb->insert = db_unixodbc_insert;
|
|
dbb->insert = db_unixodbc_insert;
|
|
- dbb->delete = db_unixodbc_delete;
|
|
|
|
|
|
+ dbb->delete = db_unixodbc_delete;
|
|
dbb->update = db_unixodbc_update;
|
|
dbb->update = db_unixodbc_update;
|
|
if (replace_query)
|
|
if (replace_query)
|
|
dbb->replace = db_unixodbc_replace;
|
|
dbb->replace = db_unixodbc_replace;
|