diff options
| author | Wez Furlong <wez@php.net> | 2005-07-08 04:13:00 +0000 |
|---|---|---|
| committer | Wez Furlong <wez@php.net> | 2005-07-08 04:13:00 +0000 |
| commit | 49c18828374846d369e1b14a77baa320da2126ee (patch) | |
| tree | 55cde9ff8c29465673a7c2b866439455e5790c8b /ext/pdo/php_pdo_driver.h | |
| parent | ef7bd06657b0850d4b1c507c2ef6af88fb79cd03 (diff) | |
| download | php-git-49c18828374846d369e1b14a77baa320da2126ee.tar.gz | |
Add a PDO_ATTR_STRINGIFY_FETCHES attribute, which is used to convert integer or
floating point values into strings during fetch. This is a compatibility hack
for drivers that return native types rather than string representations.
We use this flag in the test suite to persuade postgres tests to pass.
Diffstat (limited to 'ext/pdo/php_pdo_driver.h')
| -rwxr-xr-x | ext/pdo/php_pdo_driver.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h index 4857953bde..24f885b1be 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 20050707 +#define PDO_DRIVER_API 20050708 enum pdo_param_type { PDO_PARAM_NULL, @@ -127,6 +127,7 @@ enum pdo_attribute_type { PDO_ATTR_FETCH_TABLE_NAMES, /* include table names in the column names, where available */ PDO_ATTR_FETCH_CATALOG_NAMES, /* include the catalog/db name names in the column names, where available */ PDO_ATTR_DRIVER_NAME, /* name of the driver (as used in the constructor) */ + PDO_ATTR_STRINGIFY_FETCHES, /* converts integer/float types to strings during fetch */ /* this defines the start of the range for driver specific options. * Drivers should define their own attribute constants beginning with this @@ -432,9 +433,12 @@ struct _pdo_dbh_t { /* when set, convert empty strings to NULL */ unsigned oracle_nulls:1; + /* 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:23; + unsigned _reserved_flags:22; /* data source string used to open this handle */ const char *data_source; |
