OCI8: fix prototypes for oci_field_*(). They can take a column index or name.

This commit is contained in:
Christopher Jones 2014-03-19 15:20:40 -07:00
parent 8bdf272758
commit 6c20b07190
5 changed files with 43 additions and 28 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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="/">
@ -461,6 +461,21 @@ Enhancement - Improve performance of multi-row OCI_RETURN_LOB queries (Bug #6687
</extsrcrelease>
<changelog>
<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>

View File

@ -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

View File

@ -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 ]
}
}