Lines Matching refs:bind
934 php_oci_bind *bind = (php_oci_bind *) Z_PTR_P(data); in php_oci_bind_pre_exec() local
935 zval *zv = &bind->val; in php_oci_bind_pre_exec()
947 switch (bind->type) { in php_oci_bind_pre_exec()
985 bind->indicator = 0; in php_oci_bind_pre_exec()
995 php_oci_bind *bind = (php_oci_bind *) Z_PTR_P(data); in php_oci_bind_post_exec() local
996 php_oci_connection *connection = bind->parent_statement->connection; in php_oci_bind_post_exec()
998 zval *zv = &bind->val; in php_oci_bind_post_exec()
1001 if (bind->indicator == -1) { /* NULL */ in php_oci_bind_post_exec()
1027 switch (bind->array.type) { in php_oci_bind_post_exec()
1031 for (i = 0; i < (int) bind->array.current_length; i++) { in php_oci_bind_post_exec()
1032 if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_post_exec()
1034 ZVAL_LONG(entry, ((oci_phpsized_int *)(bind->array.elements))[i]); in php_oci_bind_post_exec()
1037 add_next_index_long(zv, ((oci_phpsized_int *)(bind->array.elements))[i]); in php_oci_bind_post_exec()
1042 for (i = 0; i < (int) bind->array.current_length; i++) { in php_oci_bind_post_exec()
1043 if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_post_exec()
1045 ZVAL_DOUBLE(entry, ((double *)(bind->array.elements))[i]); in php_oci_bind_post_exec()
1048 add_next_index_double(zv, ((double *)(bind->array.elements))[i]); in php_oci_bind_post_exec()
1053 for (i = 0; i < (int) bind->array.current_length; i++) { in php_oci_bind_post_exec()
1059 if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_post_exec()
1060 …PHP_OCI_CALL_RETURN(errstatus, OCIDateToText, (connection->err, &(((OCIDate *)(bind->array.element… in php_oci_bind_post_exec()
1073 …PHP_OCI_CALL_RETURN(errstatus, OCIDateToText, (connection->err, &(((OCIDate *)(bind->array.element… in php_oci_bind_post_exec()
1092 for (i = 0; i < (int) bind->array.current_length; i++) { in php_oci_bind_post_exec()
1094 int curr_element_length = bind->array.element_lengths[i]; in php_oci_bind_post_exec()
1095 if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_post_exec()
1097 …ZVAL_STRINGL(entry, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_elemen… in php_oci_bind_post_exec()
1100 …add_next_index_stringl(zv, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr… in php_oci_bind_post_exec()
1305 (OCIBind **)&bindp->bind, /* bind hdl (will alloc) */ in php_oci_bind_by_name()
1330 bindp->bind, in php_oci_bind_by_name()
1350 bindp->bind, in php_oci_bind_by_name()
1612 php_oci_bind *bind; in php_oci_bind_array_by_name() local
1631 bind = php_oci_bind_array_helper_number(val, max_table_length); in php_oci_bind_array_by_name()
1635 bind = php_oci_bind_array_helper_double(val, max_table_length); in php_oci_bind_array_by_name()
1648 bind = php_oci_bind_array_helper_string(val, max_table_length, maxlength); in php_oci_bind_array_by_name()
1651 bind = php_oci_bind_array_helper_date(val, max_table_length, statement->connection); in php_oci_bind_array_by_name()
1659 if (bind == NULL) { in php_oci_bind_array_by_name()
1664 bind->descriptor = NULL; in php_oci_bind_array_by_name()
1665 bind->statement = NULL; in php_oci_bind_array_by_name()
1666 bind->parent_statement = statement; in php_oci_bind_array_by_name()
1667 bind->bind = NULL; in php_oci_bind_array_by_name()
1668 ZVAL_COPY(&bind->val, var); in php_oci_bind_array_by_name()
1669 bind->array.type = type; in php_oci_bind_array_by_name()
1670 bind->indicator = 0; /* not used for array binds */ in php_oci_bind_array_by_name()
1671 bind->type = 0; /* not used for array binds */ in php_oci_bind_array_by_name()
1677 (OCIBind **)&bind->bind, in php_oci_bind_array_by_name()
1681 (dvoid *) bind->array.elements, in php_oci_bind_array_by_name()
1682 (sb4) bind->array.max_length, in php_oci_bind_array_by_name()
1684 (dvoid *)bind->array.indicators, in php_oci_bind_array_by_name()
1685 (ub2 *)bind->array.element_lengths, in php_oci_bind_array_by_name()
1688 (ub4 *) &(bind->array.current_length), in php_oci_bind_array_by_name()
1695 if (bind->array.elements) { in php_oci_bind_array_by_name()
1696 efree(bind->array.elements); in php_oci_bind_array_by_name()
1699 if (bind->array.element_lengths) { in php_oci_bind_array_by_name()
1700 efree(bind->array.element_lengths); in php_oci_bind_array_by_name()
1703 if (bind->array.indicators) { in php_oci_bind_array_by_name()
1704 efree(bind->array.indicators); in php_oci_bind_array_by_name()
1707 zval_ptr_dtor(&bind->val); in php_oci_bind_array_by_name()
1709 efree(bind); in php_oci_bind_array_by_name()
1722 zend_hash_update_ptr(statement->binds, zvtmp, bind); in php_oci_bind_array_by_name()
1734 php_oci_bind *bind; in php_oci_bind_array_helper_string() local
1757 bind = emalloc(sizeof(php_oci_bind)); in php_oci_bind_array_helper_string()
1758 ZVAL_UNDEF(&bind->val); in php_oci_bind_array_helper_string()
1759 bind->array.elements = (text *)safe_emalloc(max_table_length * (maxlength + 1), sizeof(text), 0); in php_oci_bind_array_helper_string()
1760 memset(bind->array.elements, 0, max_table_length * (maxlength + 1) * sizeof(text)); in php_oci_bind_array_helper_string()
1761 bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var)); in php_oci_bind_array_helper_string()
1762 bind->array.old_length = bind->array.current_length; in php_oci_bind_array_helper_string()
1763 bind->array.max_length = (ub4) maxlength; in php_oci_bind_array_helper_string()
1764 bind->array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); in php_oci_bind_array_helper_string()
1765 memset(bind->array.element_lengths, 0, max_table_length*sizeof(ub2)); in php_oci_bind_array_helper_string()
1766 bind->array.indicators = safe_emalloc(max_table_length, sizeof(sb2), 0); in php_oci_bind_array_helper_string()
1767 memset(bind->array.indicators, 0, max_table_length*sizeof(sb2)); in php_oci_bind_array_helper_string()
1771 for (i = 0; i < bind->array.current_length; i++) { in php_oci_bind_array_helper_string()
1774 efree(bind->array.elements); in php_oci_bind_array_helper_string()
1775 efree(bind->array.element_lengths); in php_oci_bind_array_helper_string()
1776 efree(bind->array.indicators); in php_oci_bind_array_helper_string()
1777 efree(bind); in php_oci_bind_array_helper_string()
1781 bind->array.element_lengths[i] = (ub2) Z_STRLEN_P(entry); in php_oci_bind_array_helper_string()
1783 bind->array.indicators[i] = -1; in php_oci_bind_array_helper_string()
1793 if ((i < bind->array.current_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_array_helper_string()
1796 efree(bind->array.elements); in php_oci_bind_array_helper_string()
1797 efree(bind->array.element_lengths); in php_oci_bind_array_helper_string()
1798 efree(bind->array.indicators); in php_oci_bind_array_helper_string()
1799 efree(bind); in php_oci_bind_array_helper_string()
1805 memcpy((text *)bind->array.elements + i*maxlength, Z_STRVAL_P(entry), element_length); in php_oci_bind_array_helper_string()
1806 ((text *)bind->array.elements)[i*maxlength + element_length] = '\0'; in php_oci_bind_array_helper_string()
1810 ((text *)bind->array.elements)[i*maxlength] = '\0'; in php_oci_bind_array_helper_string()
1815 return bind; in php_oci_bind_array_helper_string()
1823 php_oci_bind *bind; in php_oci_bind_array_helper_number() local
1831 bind = emalloc(sizeof(php_oci_bind)); in php_oci_bind_array_helper_number()
1832 ZVAL_UNDEF(&bind->val); in php_oci_bind_array_helper_number()
1833 …bind->array.elements = (oci_phpsized_int *)safe_emalloc(max_table_length, sizeof(oci_phpsized_int… in php_oci_bind_array_helper_number()
1834 bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var)); in php_oci_bind_array_helper_number()
1835 bind->array.old_length = bind->array.current_length; in php_oci_bind_array_helper_number()
1836 bind->array.max_length = sizeof(oci_phpsized_int); in php_oci_bind_array_helper_number()
1837 bind->array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); in php_oci_bind_array_helper_number()
1838 memset(bind->array.element_lengths, 0, max_table_length * sizeof(ub2)); in php_oci_bind_array_helper_number()
1839 bind->array.indicators = NULL; in php_oci_bind_array_helper_number()
1843 if (i < bind->array.current_length) { in php_oci_bind_array_helper_number()
1844 bind->array.element_lengths[i] = sizeof(oci_phpsized_int); in php_oci_bind_array_helper_number()
1846 if ((i < bind->array.current_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_array_helper_number()
1848 ((oci_phpsized_int *)bind->array.elements)[i] = (oci_phpsized_int) Z_LVAL_P(entry); in php_oci_bind_array_helper_number()
1851 ((oci_phpsized_int *)bind->array.elements)[i] = 0; in php_oci_bind_array_helper_number()
1856 return bind; in php_oci_bind_array_helper_number()
1864 php_oci_bind *bind; in php_oci_bind_array_helper_double() local
1872 bind = emalloc(sizeof(php_oci_bind)); in php_oci_bind_array_helper_double()
1873 ZVAL_UNDEF(&bind->val); in php_oci_bind_array_helper_double()
1874 bind->array.elements = (double *)safe_emalloc(max_table_length, sizeof(double), 0); in php_oci_bind_array_helper_double()
1875 bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var)); in php_oci_bind_array_helper_double()
1876 bind->array.old_length = bind->array.current_length; in php_oci_bind_array_helper_double()
1877 bind->array.max_length = sizeof(double); in php_oci_bind_array_helper_double()
1878 bind->array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); in php_oci_bind_array_helper_double()
1879 memset(bind->array.element_lengths, 0, max_table_length * sizeof(ub2)); in php_oci_bind_array_helper_double()
1880 bind->array.indicators = NULL; in php_oci_bind_array_helper_double()
1884 if (i < bind->array.current_length) { in php_oci_bind_array_helper_double()
1885 bind->array.element_lengths[i] = sizeof(double); in php_oci_bind_array_helper_double()
1887 if ((i < bind->array.current_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_array_helper_double()
1889 ((double *)bind->array.elements)[i] = (double) Z_DVAL_P(entry); in php_oci_bind_array_helper_double()
1892 ((double *)bind->array.elements)[i] = 0; in php_oci_bind_array_helper_double()
1897 return bind; in php_oci_bind_array_helper_double()
1905 php_oci_bind *bind; in php_oci_bind_array_helper_date() local
1914 bind = emalloc(sizeof(php_oci_bind)); in php_oci_bind_array_helper_date()
1915 ZVAL_UNDEF(&bind->val); in php_oci_bind_array_helper_date()
1916 bind->array.elements = (OCIDate *)safe_emalloc(max_table_length, sizeof(OCIDate), 0); in php_oci_bind_array_helper_date()
1917 bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var)); in php_oci_bind_array_helper_date()
1918 bind->array.old_length = bind->array.current_length; in php_oci_bind_array_helper_date()
1919 bind->array.max_length = sizeof(OCIDate); in php_oci_bind_array_helper_date()
1920 bind->array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); in php_oci_bind_array_helper_date()
1921 memset(bind->array.element_lengths, 0, max_table_length * sizeof(ub2)); in php_oci_bind_array_helper_date()
1922 bind->array.indicators = NULL; in php_oci_bind_array_helper_date()
1927 if (i < bind->array.current_length) { in php_oci_bind_array_helper_date()
1928 bind->array.element_lengths[i] = sizeof(OCIDate); in php_oci_bind_array_helper_date()
1930 if ((i < bind->array.current_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { in php_oci_bind_array_helper_date()
1933 efree(bind->array.element_lengths); in php_oci_bind_array_helper_date()
1934 efree(bind->array.elements); in php_oci_bind_array_helper_date()
1935 efree(bind); in php_oci_bind_array_helper_date()
1944 efree(bind->array.element_lengths); in php_oci_bind_array_helper_date()
1945 efree(bind->array.elements); in php_oci_bind_array_helper_date()
1946 efree(bind); in php_oci_bind_array_helper_date()
1952 ((OCIDate *)bind->array.elements)[i] = oci_date; in php_oci_bind_array_helper_date()
1959 efree(bind->array.element_lengths); in php_oci_bind_array_helper_date()
1960 efree(bind->array.elements); in php_oci_bind_array_helper_date()
1961 efree(bind); in php_oci_bind_array_helper_date()
1967 ((OCIDate *)bind->array.elements)[i] = oci_date; in php_oci_bind_array_helper_date()
1973 return bind; in php_oci_bind_array_helper_date()