summaryrefslogtreecommitdiff
path: root/ext/pdo/php_pdo_driver.h
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2005-07-12 02:40:59 +0000
committerWez Furlong <wez@php.net>2005-07-12 02:40:59 +0000
commit664ebfa4990171891f84b18ee1a50f734948d80f (patch)
tree889add057b959e9cca26fa16ce4037dd716cff59 /ext/pdo/php_pdo_driver.h
parentf5a09e87eed25de29f07339a5e437be1a0cf6dce (diff)
downloadphp-git-664ebfa4990171891f84b18ee1a50f734948d80f.tar.gz
expand oracle null handling compatability by offering the ability to convert
NULLs into empty strings as well as the other way around. It still doesn't help a great deal in the long run, but at least the option is there. Make sure hash tables are nulled out to avoid double freeing them.
Diffstat (limited to 'ext/pdo/php_pdo_driver.h')
-rwxr-xr-xext/pdo/php_pdo_driver.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h
index 0f0b115ac1..3f72f1dd0d 100755
--- a/ext/pdo/php_pdo_driver.h
+++ b/ext/pdo/php_pdo_driver.h
@@ -44,7 +44,7 @@ PDO_API char *php_pdo_int64_to_str(pdo_int64_t i64 TSRMLS_DC);
# define FALSE 0
#endif
-#define PDO_DRIVER_API 20050709
+#define PDO_DRIVER_API 20050711
enum pdo_param_type {
PDO_PARAM_NULL,
@@ -174,6 +174,13 @@ enum pdo_case_conversion {
PDO_CASE_LOWER
};
+/* oracle interop settings */
+enum pdo_null_handling {
+ PDO_NULL_NATURAL = 0,
+ PDO_NULL_EMPTY_STRING = 1,
+ PDO_NULL_TO_STRING = 2,
+};
+
/* {{{ utils for reading attributes set as driver_options */
static inline long pdo_attr_lval(zval *options, enum pdo_fetch_type option_name, long defval TSRMLS_DC)
{
@@ -437,15 +444,15 @@ struct _pdo_dbh_t {
/* max length a single character can become after correct quoting */
unsigned max_escaped_char_length:3;
- /* when set, convert empty strings to NULL */
- unsigned oracle_nulls:1;
+ /* oracle compat; see enum pdo_null_handling */
+ unsigned oracle_nulls:2;
/* when set, convert int/floats to strings */
unsigned stringify:1;
/* the sum of the number of bits here and the bit fields preceeding should
* equal 32 */
- unsigned _reserved_flags:22;
+ unsigned _reserved_flags:21;
/* data source string used to open this handle */
const char *data_source;