summaryrefslogtreecommitdiff
path: root/ext/oci8
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2014-03-19 15:20:40 -0700
committerChristopher Jones <sixd@php.net>2014-03-19 15:20:40 -0700
commit6c20b071909d1053c0fc25354675e46bde57e850 (patch)
treec79e94cae3066efeea3b51b3e12dbeca6f576410 /ext/oci8
parent8bdf272758b0b126885393bd8eed101cd818d004 (diff)
downloadphp-git-6c20b071909d1053c0fc25354675e46bde57e850.tar.gz
OCI8: fix prototypes for oci_field_*(). They can take a column index or name.
Diffstat (limited to 'ext/oci8')
-rw-r--r--ext/oci8/oci8.c10
-rw-r--r--ext/oci8/oci8_interface.c16
-rw-r--r--ext/oci8/package.xml23
-rw-r--r--ext/oci8/php_oci8.h2
-rw-r--r--ext/oci8/tests/reflection1.phpt20
5 files changed, 43 insertions, 28 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 03927e6eed..74e302c766 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -290,7 +290,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_name, 0, 0, 2)
ZEND_ARG_INFO(0, statement_resource)
- ZEND_ARG_INFO(0, column_number)
+ ZEND_ARG_INFO(0, column_number_or_name)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_size, 0, 0, 2)
@@ -300,22 +300,22 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_scale, 0, 0, 2)
ZEND_ARG_INFO(0, statement_resource)
- ZEND_ARG_INFO(0, column_number)
+ ZEND_ARG_INFO(0, column_number_or_name)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_precision, 0, 0, 2)
ZEND_ARG_INFO(0, statement_resource)
- ZEND_ARG_INFO(0, column_number)
+ ZEND_ARG_INFO(0, column_number_or_name)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_type, 0, 0, 2)
ZEND_ARG_INFO(0, statement_resource)
- ZEND_ARG_INFO(0, column_number)
+ ZEND_ARG_INFO(0, column_number_or_name)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_type_raw, 0, 0, 2)
ZEND_ARG_INFO(0, statement_resource)
- ZEND_ARG_INFO(0, column_number)
+ ZEND_ARG_INFO(0, column_number_or_name)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_is_null, 0, 0, 2)
diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c
index d6a62325f3..ca69febb2a 100644
--- a/ext/oci8/oci8_interface.c
+++ b/ext/oci8/oci8_interface.c
@@ -1139,7 +1139,7 @@ PHP_FUNCTION(oci_commit)
}
/* }}} */
-/* {{{ proto string oci_field_name(resource stmt, int col)
+/* {{{ proto string oci_field_name(resource stmt, mixed col)
Tell the name of a column */
PHP_FUNCTION(oci_field_name)
{
@@ -1152,7 +1152,7 @@ PHP_FUNCTION(oci_field_name)
}
/* }}} */
-/* {{{ proto int oci_field_size(resource stmt, int col)
+/* {{{ proto int oci_field_size(resource stmt, mixed col)
Tell the maximum data size of a column */
PHP_FUNCTION(oci_field_size)
{
@@ -1169,7 +1169,7 @@ PHP_FUNCTION(oci_field_size)
}
/* }}} */
-/* {{{ proto int oci_field_scale(resource stmt, int col)
+/* {{{ proto int oci_field_scale(resource stmt, mixed col)
Tell the scale of a column */
PHP_FUNCTION(oci_field_scale)
{
@@ -1182,7 +1182,7 @@ PHP_FUNCTION(oci_field_scale)
}
/* }}} */
-/* {{{ proto int oci_field_precision(resource stmt, int col)
+/* {{{ proto int oci_field_precision(resource stmt, mixed col)
Tell the precision of a column */
PHP_FUNCTION(oci_field_precision)
{
@@ -1195,7 +1195,7 @@ PHP_FUNCTION(oci_field_precision)
}
/* }}} */
-/* {{{ proto mixed oci_field_type(resource stmt, int col)
+/* {{{ proto mixed oci_field_type(resource stmt, mixed col)
Tell the data type of a column */
PHP_FUNCTION(oci_field_type)
{
@@ -1275,7 +1275,7 @@ PHP_FUNCTION(oci_field_type)
}
/* }}} */
-/* {{{ proto int oci_field_type_raw(resource stmt, int col)
+/* {{{ proto int oci_field_type_raw(resource stmt, mixed col)
Tell the raw oracle data type of a column */
PHP_FUNCTION(oci_field_type_raw)
{
@@ -1289,8 +1289,8 @@ PHP_FUNCTION(oci_field_type_raw)
}
/* }}} */
-/* {{{ proto bool oci_field_is_null(resource stmt, int col)
- Tell whether a column is NULL */
+/* {{{ proto bool oci_field_is_null(resource stmt, mixed col)
+ Tell whether a field in the current row is NULL */
PHP_FUNCTION(oci_field_is_null)
{
php_oci_out_column *column;
diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml
index c4530bdef0..e5839f1399 100644
--- a/ext/oci8/package.xml
+++ b/ext/oci8/package.xml
@@ -45,12 +45,12 @@ libraries are available.
<active>no</active>
</lead>
- <date>2014-03-11</date>
+ <date>2014-03-19</date>
<time>12:00:00</time>
<version>
- <release>2.0.8</release>
- <api>2.0.8</api>
+ <release>2.0.9</release>
+ <api>2.0.9</api>
</version>
<stability>
<release>stable</release>
@@ -58,7 +58,7 @@ libraries are available.
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
-Enhancement - Improve performance of multi-row OCI_RETURN_LOB queries (Bug #66875)
+Fixed oci_field_* reflection: $field can be a column name or index
</notes>
<contents>
<dir name="/">
@@ -463,6 +463,21 @@ Enhancement - Improve performance of multi-row OCI_RETURN_LOB queries (Bug #6687
<release>
<version>
+ <release>2.0.8</release>
+ <api>2.0.8</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+Enhancement - Improve performance of multi-row OCI_RETURN_LOB queries (Bug #66875)
+ </notes>
+ </release>
+
+<release>
+ <version>
<release>2.0.7</release>
<api>2.0.7</api>
</version>
diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h
index 5c78faaa64..066812edad 100644
--- a/ext/oci8/php_oci8.h
+++ b/ext/oci8/php_oci8.h
@@ -45,7 +45,7 @@
*/
#undef PHP_OCI8_VERSION
#endif
-#define PHP_OCI8_VERSION "2.0.8"
+#define PHP_OCI8_VERSION "2.0.9"
extern zend_module_entry oci8_module_entry;
#define phpext_oci8_ptr &oci8_module_entry
diff --git a/ext/oci8/tests/reflection1.phpt b/ext/oci8/tests/reflection1.phpt
index f76d7261aa..2cf3e4055b 100644
--- a/ext/oci8/tests/reflection1.phpt
+++ b/ext/oci8/tests/reflection1.phpt
@@ -177,7 +177,7 @@ Function [ <internal%s> function oci_field_name ] {
- Parameters [2] {
Parameter #0 [ <required> $statement_resource ]
- Parameter #1 [ <required> $column_number ]
+ Parameter #1 [ <required> $column_number_or_name ]
}
}
@@ -193,7 +193,7 @@ Function [ <internal%s> function oci_field_scale ] {
- Parameters [2] {
Parameter #0 [ <required> $statement_resource ]
- Parameter #1 [ <required> $column_number ]
+ Parameter #1 [ <required> $column_number_or_name ]
}
}
@@ -201,7 +201,7 @@ Function [ <internal%s> function oci_field_precision ] {
- Parameters [2] {
Parameter #0 [ <required> $statement_resource ]
- Parameter #1 [ <required> $column_number ]
+ Parameter #1 [ <required> $column_number_or_name ]
}
}
@@ -209,7 +209,7 @@ Function [ <internal%s> function oci_field_type ] {
- Parameters [2] {
Parameter #0 [ <required> $statement_resource ]
- Parameter #1 [ <required> $column_number ]
+ Parameter #1 [ <required> $column_number_or_name ]
}
}
@@ -217,7 +217,7 @@ Function [ <internal%s> function oci_field_type_raw ] {
- Parameters [2] {
Parameter #0 [ <required> $statement_resource ]
- Parameter #1 [ <required> $column_number ]
+ Parameter #1 [ <required> $column_number_or_name ]
}
}
@@ -722,7 +722,7 @@ Function [ <internal%s> function ocicolumnname ] {
- Parameters [2] {
Parameter #0 [ <required> $statement_resource ]
- Parameter #1 [ <required> $column_number ]
+ Parameter #1 [ <required> $column_number_or_name ]
}
}
@@ -738,7 +738,7 @@ Function [ <internal%s> function ocicolumnscale ] {
- Parameters [2] {
Parameter #0 [ <required> $statement_resource ]
- Parameter #1 [ <required> $column_number ]
+ Parameter #1 [ <required> $column_number_or_name ]
}
}
@@ -746,7 +746,7 @@ Function [ <internal%s> function ocicolumnprecision ] {
- Parameters [2] {
Parameter #0 [ <required> $statement_resource ]
- Parameter #1 [ <required> $column_number ]
+ Parameter #1 [ <required> $column_number_or_name ]
}
}
@@ -754,7 +754,7 @@ Function [ <internal%s> function ocicolumntype ] {
- Parameters [2] {
Parameter #0 [ <required> $statement_resource ]
- Parameter #1 [ <required> $column_number ]
+ Parameter #1 [ <required> $column_number_or_name ]
}
}
@@ -762,7 +762,7 @@ Function [ <internal%s> function ocicolumntyperaw ] {
- Parameters [2] {
Parameter #0 [ <required> $statement_resource ]
- Parameter #1 [ <required> $column_number ]
+ Parameter #1 [ <required> $column_number_or_name ]
}
}