diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-11-25 17:50:07 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-11-25 17:50:07 +0000 |
commit | f1de129e5f0e5cbf92b9d4e06a4d7eec19ebbcdc (patch) | |
tree | 143073ebaa786fc4f8e870a08f16f88f3f000ded /include/asterisk/res_odbc.h | |
parent | c8edf66bb453b75f541a3ff4caea1ba3b804a9fe (diff) |
Merged revisions 89559 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r89559 | tilghman | 2007-11-25 11:17:10 -0600 (Sun, 25 Nov 2007) | 14 lines
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: https://origsvn.digium.com/svn/asterisk/trunk@89561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/res_odbc.h')
-rw-r--r-- | include/asterisk/res_odbc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asterisk/res_odbc.h b/include/asterisk/res_odbc.h index 821b64f28..fcb1581e4 100644 --- a/include/asterisk/res_odbc.h +++ b/include/asterisk/res_odbc.h @@ -93,6 +93,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 Executes an non prepared statement and returns the resulting * statement handle. * \param obj The ODBC object |