aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/res_odbc.h
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-25 17:17:10 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-25 17:17:10 +0000
commite2576b4a0635ab0499ff83205f8c13540076e11e (patch)
treead8210c1c145247568c15b362c15e07a790acff9 /include/asterisk/res_odbc.h
parentf78841fc40fd954f2ce3a6fdcbe75ba2aa227efe (diff)
We previously attempted to use the ESCAPE clause to set the escape delimiter to
a backslash. Unfortunately, this does not universally work on all databases, since on databases which natively use the backslash as a delimiter, the backslash itself needs to be delimited, but on other databases that have no delimiter, backslashing the backslash causes an error. So the only solution that I can come up with is to create an option in res_odbc that explicitly specifies whether or not backslash is a native delimiter. If it is, we use it natively; if not, we use the ESCAPE clause to make it one. Reported by: elguero Patch by: tilghman (Closes issue #11364) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89559 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/res_odbc.h')
-rw-r--r--include/asterisk/res_odbc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asterisk/res_odbc.h b/include/asterisk/res_odbc.h
index aa0713472..aba2a24e8 100644
--- a/include/asterisk/res_odbc.h
+++ b/include/asterisk/res_odbc.h
@@ -85,6 +85,12 @@ void ast_odbc_release_obj(struct odbc_obj *obj);
*/
int ast_odbc_sanity_check(struct odbc_obj *obj);
+/*! \brief Checks if the database natively supports backslash as an escape character.
+ * \param obj The ODBC object
+ * \return Returns 1 if an ESCAPE clause is needed to support '\', 0 otherwise
+ */
+int ast_odbc_backslash_is_escape(struct odbc_obj *obj);
+
/*! \brief Prepares, executes, and returns the resulting statement handle.
* \param obj The ODBC object
* \param prepare_cb A function callback, which, when called, should return a statement handle prepared, with any necessary parameters or result columns bound.