Lines Matching refs:bind
916 php_oci_bind *bind = (php_oci_bind *) Z_PTR_P(data); in php_oci_bind_pre_exec() local
917 zval *zv = &bind->val; in php_oci_bind_pre_exec()
929 switch (bind->type) { in php_oci_bind_pre_exec()
967 bind->indicator = 0; in php_oci_bind_pre_exec()
977 php_oci_bind *bind = (php_oci_bind *) Z_PTR_P(data); in php_oci_bind_post_exec() local
978 php_oci_connection *connection = bind->parent_statement->connection; in php_oci_bind_post_exec()
980 zval *zv = &bind->val; in php_oci_bind_post_exec()
983 if (bind->indicator == -1) { /* NULL */ in php_oci_bind_post_exec()
1009 switch (bind->array.type) { in php_oci_bind_post_exec()
1013 for (i = 0; i < (int) bind->array.current_length; i++) { in php_oci_bind_post_exec()
1014 if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_post_exec()
1016 ZVAL_LONG(entry, ((oci_phpsized_int *)(bind->array.elements))[i]); in php_oci_bind_post_exec()
1019 add_next_index_long(zv, ((oci_phpsized_int *)(bind->array.elements))[i]); in php_oci_bind_post_exec()
1024 for (i = 0; i < (int) bind->array.current_length; i++) { in php_oci_bind_post_exec()
1025 if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_post_exec()
1027 ZVAL_DOUBLE(entry, ((double *)(bind->array.elements))[i]); in php_oci_bind_post_exec()
1030 add_next_index_double(zv, ((double *)(bind->array.elements))[i]); in php_oci_bind_post_exec()
1035 for (i = 0; i < (int) bind->array.current_length; i++) { in php_oci_bind_post_exec()
1041 if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_post_exec()
1042 …PHP_OCI_CALL_RETURN(errstatus, OCIDateToText, (connection->err, &(((OCIDate *)(bind->array.element… in php_oci_bind_post_exec()
1055 …PHP_OCI_CALL_RETURN(errstatus, OCIDateToText, (connection->err, &(((OCIDate *)(bind->array.element… in php_oci_bind_post_exec()
1074 for (i = 0; i < (int) bind->array.current_length; i++) { in php_oci_bind_post_exec()
1076 int curr_element_length = bind->array.element_lengths[i]; in php_oci_bind_post_exec()
1077 if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_post_exec()
1079 …ZVAL_STRINGL(entry, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_elemen… in php_oci_bind_post_exec()
1082 …add_next_index_stringl(zv, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr… in php_oci_bind_post_exec()
1287 (OCIBind **)&bindp->bind, /* bind hdl (will alloc) */ in php_oci_bind_by_name()
1312 bindp->bind, in php_oci_bind_by_name()
1332 bindp->bind, in php_oci_bind_by_name()
1600 php_oci_bind *bind; in php_oci_bind_array_by_name() local
1619 bind = php_oci_bind_array_helper_number(val, max_table_length); in php_oci_bind_array_by_name()
1623 bind = php_oci_bind_array_helper_double(val, max_table_length); in php_oci_bind_array_by_name()
1636 bind = php_oci_bind_array_helper_string(val, max_table_length, maxlength); in php_oci_bind_array_by_name()
1639 bind = php_oci_bind_array_helper_date(val, max_table_length, statement->connection); in php_oci_bind_array_by_name()
1647 if (bind == NULL) { in php_oci_bind_array_by_name()
1652 bind->descriptor = NULL; in php_oci_bind_array_by_name()
1653 bind->statement = NULL; in php_oci_bind_array_by_name()
1654 bind->parent_statement = statement; in php_oci_bind_array_by_name()
1655 bind->bind = NULL; in php_oci_bind_array_by_name()
1656 ZVAL_COPY(&bind->val, var); in php_oci_bind_array_by_name()
1657 bind->array.type = type; in php_oci_bind_array_by_name()
1658 bind->indicator = 0; /* not used for array binds */ in php_oci_bind_array_by_name()
1659 bind->type = 0; /* not used for array binds */ in php_oci_bind_array_by_name()
1665 (OCIBind **)&bind->bind, in php_oci_bind_array_by_name()
1669 (dvoid *) bind->array.elements, in php_oci_bind_array_by_name()
1670 (sb4) bind->array.max_length, in php_oci_bind_array_by_name()
1672 (dvoid *)bind->array.indicators, in php_oci_bind_array_by_name()
1673 (ub2 *)bind->array.element_lengths, in php_oci_bind_array_by_name()
1676 (ub4 *) &(bind->array.current_length), in php_oci_bind_array_by_name()
1683 if (bind->array.elements) { in php_oci_bind_array_by_name()
1684 efree(bind->array.elements); in php_oci_bind_array_by_name()
1687 if (bind->array.element_lengths) { in php_oci_bind_array_by_name()
1688 efree(bind->array.element_lengths); in php_oci_bind_array_by_name()
1691 if (bind->array.indicators) { in php_oci_bind_array_by_name()
1692 efree(bind->array.indicators); in php_oci_bind_array_by_name()
1695 zval_ptr_dtor(&bind->val); in php_oci_bind_array_by_name()
1697 efree(bind); in php_oci_bind_array_by_name()
1710 zend_hash_update_ptr(statement->binds, zvtmp, bind); in php_oci_bind_array_by_name()
1722 php_oci_bind *bind; in php_oci_bind_array_helper_string() local
1745 bind = emalloc(sizeof(php_oci_bind)); in php_oci_bind_array_helper_string()
1746 ZVAL_UNDEF(&bind->val); in php_oci_bind_array_helper_string()
1747 bind->array.elements = (text *)safe_emalloc(max_table_length * (maxlength + 1), sizeof(text), 0); in php_oci_bind_array_helper_string()
1748 memset(bind->array.elements, 0, max_table_length * (maxlength + 1) * sizeof(text)); in php_oci_bind_array_helper_string()
1749 bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var)); in php_oci_bind_array_helper_string()
1750 bind->array.old_length = bind->array.current_length; in php_oci_bind_array_helper_string()
1751 bind->array.max_length = (ub4) maxlength; in php_oci_bind_array_helper_string()
1752 bind->array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); in php_oci_bind_array_helper_string()
1753 memset(bind->array.element_lengths, 0, max_table_length*sizeof(ub2)); in php_oci_bind_array_helper_string()
1754 bind->array.indicators = safe_emalloc(max_table_length, sizeof(sb2), 0); in php_oci_bind_array_helper_string()
1755 memset(bind->array.indicators, 0, max_table_length*sizeof(sb2)); in php_oci_bind_array_helper_string()
1759 for (i = 0; i < bind->array.current_length; i++) { in php_oci_bind_array_helper_string()
1762 efree(bind->array.elements); in php_oci_bind_array_helper_string()
1763 efree(bind->array.element_lengths); in php_oci_bind_array_helper_string()
1764 efree(bind->array.indicators); in php_oci_bind_array_helper_string()
1765 efree(bind); in php_oci_bind_array_helper_string()
1769 bind->array.element_lengths[i] = (ub2) Z_STRLEN_P(entry); in php_oci_bind_array_helper_string()
1771 bind->array.indicators[i] = -1; in php_oci_bind_array_helper_string()
1781 if ((i < bind->array.current_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_array_helper_string()
1784 efree(bind->array.elements); in php_oci_bind_array_helper_string()
1785 efree(bind->array.element_lengths); in php_oci_bind_array_helper_string()
1786 efree(bind->array.indicators); in php_oci_bind_array_helper_string()
1787 efree(bind); in php_oci_bind_array_helper_string()
1793 memcpy((text *)bind->array.elements + i*maxlength, Z_STRVAL_P(entry), element_length); in php_oci_bind_array_helper_string()
1794 ((text *)bind->array.elements)[i*maxlength + element_length] = '\0'; in php_oci_bind_array_helper_string()
1798 ((text *)bind->array.elements)[i*maxlength] = '\0'; in php_oci_bind_array_helper_string()
1803 return bind; in php_oci_bind_array_helper_string()
1811 php_oci_bind *bind; in php_oci_bind_array_helper_number() local
1819 bind = emalloc(sizeof(php_oci_bind)); in php_oci_bind_array_helper_number()
1820 ZVAL_UNDEF(&bind->val); in php_oci_bind_array_helper_number()
1821 …bind->array.elements = (oci_phpsized_int *)safe_emalloc(max_table_length, sizeof(oci_phpsized_int… in php_oci_bind_array_helper_number()
1822 bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var)); in php_oci_bind_array_helper_number()
1823 bind->array.old_length = bind->array.current_length; in php_oci_bind_array_helper_number()
1824 bind->array.max_length = sizeof(oci_phpsized_int); in php_oci_bind_array_helper_number()
1825 bind->array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); in php_oci_bind_array_helper_number()
1826 memset(bind->array.element_lengths, 0, max_table_length * sizeof(ub2)); in php_oci_bind_array_helper_number()
1827 bind->array.indicators = NULL; in php_oci_bind_array_helper_number()
1831 if (i < bind->array.current_length) { in php_oci_bind_array_helper_number()
1832 bind->array.element_lengths[i] = sizeof(oci_phpsized_int); in php_oci_bind_array_helper_number()
1834 if ((i < bind->array.current_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_array_helper_number()
1836 ((oci_phpsized_int *)bind->array.elements)[i] = (oci_phpsized_int) Z_LVAL_P(entry); in php_oci_bind_array_helper_number()
1839 ((oci_phpsized_int *)bind->array.elements)[i] = 0; in php_oci_bind_array_helper_number()
1844 return bind; in php_oci_bind_array_helper_number()
1852 php_oci_bind *bind; in php_oci_bind_array_helper_double() local
1860 bind = emalloc(sizeof(php_oci_bind)); in php_oci_bind_array_helper_double()
1861 ZVAL_UNDEF(&bind->val); in php_oci_bind_array_helper_double()
1862 bind->array.elements = (double *)safe_emalloc(max_table_length, sizeof(double), 0); in php_oci_bind_array_helper_double()
1863 bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var)); in php_oci_bind_array_helper_double()
1864 bind->array.old_length = bind->array.current_length; in php_oci_bind_array_helper_double()
1865 bind->array.max_length = sizeof(double); in php_oci_bind_array_helper_double()
1866 bind->array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); in php_oci_bind_array_helper_double()
1867 memset(bind->array.element_lengths, 0, max_table_length * sizeof(ub2)); in php_oci_bind_array_helper_double()
1868 bind->array.indicators = NULL; in php_oci_bind_array_helper_double()
1872 if (i < bind->array.current_length) { in php_oci_bind_array_helper_double()
1873 bind->array.element_lengths[i] = sizeof(double); in php_oci_bind_array_helper_double()
1875 if ((i < bind->array.current_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_array_helper_double()
1877 ((double *)bind->array.elements)[i] = (double) Z_DVAL_P(entry); in php_oci_bind_array_helper_double()
1880 ((double *)bind->array.elements)[i] = 0; in php_oci_bind_array_helper_double()
1885 return bind; in php_oci_bind_array_helper_double()
1893 php_oci_bind *bind; in php_oci_bind_array_helper_date() local
1902 bind = emalloc(sizeof(php_oci_bind)); in php_oci_bind_array_helper_date()
1903 ZVAL_UNDEF(&bind->val); in php_oci_bind_array_helper_date()
1904 bind->array.elements = (OCIDate *)safe_emalloc(max_table_length, sizeof(OCIDate), 0); in php_oci_bind_array_helper_date()
1905 bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var)); in php_oci_bind_array_helper_date()
1906 bind->array.old_length = bind->array.current_length; in php_oci_bind_array_helper_date()
1907 bind->array.max_length = sizeof(OCIDate); in php_oci_bind_array_helper_date()
1908 bind->array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); in php_oci_bind_array_helper_date()
1909 memset(bind->array.element_lengths, 0, max_table_length * sizeof(ub2)); in php_oci_bind_array_helper_date()
1910 bind->array.indicators = NULL; in php_oci_bind_array_helper_date()
1915 if (i < bind->array.current_length) { in php_oci_bind_array_helper_date()
1916 bind->array.element_lengths[i] = sizeof(OCIDate); in php_oci_bind_array_helper_date()
1918 if ((i < bind->array.current_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_array_helper_date()
1921 efree(bind->array.element_lengths); in php_oci_bind_array_helper_date()
1922 efree(bind->array.elements); in php_oci_bind_array_helper_date()
1923 efree(bind); in php_oci_bind_array_helper_date()
1932 efree(bind->array.element_lengths); in php_oci_bind_array_helper_date()
1933 efree(bind->array.elements); in php_oci_bind_array_helper_date()
1934 efree(bind); in php_oci_bind_array_helper_date()
1940 ((OCIDate *)bind->array.elements)[i] = oci_date; in php_oci_bind_array_helper_date()
1947 efree(bind->array.element_lengths); in php_oci_bind_array_helper_date()
1948 efree(bind->array.elements); in php_oci_bind_array_helper_date()
1949 efree(bind); in php_oci_bind_array_helper_date()
1955 ((OCIDate *)bind->array.elements)[i] = oci_date; in php_oci_bind_array_helper_date()
1961 return bind; in php_oci_bind_array_helper_date()