Lines Matching refs:param

71 	ZEND_ARG_INFO(0, param)  in ZEND_END_ARG_INFO()
77 ZEND_ARG_INFO(1, param) in ZEND_END_ARG_INFO()
85 ZEND_ARG_INFO(1, param) in ZEND_END_ARG_INFO()
122 static inline int rewrite_name_to_position(pdo_stmt_t *stmt, struct pdo_bound_param_data *param TSR… in rewrite_name_to_position()
138 if (!param->name) { in rewrite_name_to_position()
140 if (SUCCESS == zend_hash_index_find(stmt->bound_param_map, param->paramno, (void**)&name)) { in rewrite_name_to_position()
141 param->name = estrdup(name); in rewrite_name_to_position()
142 param->namelen = strlen(param->name); in rewrite_name_to_position()
151 if (strcmp(name, param->name)) { in rewrite_name_to_position()
156 if (param->paramno >= 0) { in rewrite_name_to_position()
160 param->paramno = position; in rewrite_name_to_position()
174 struct pdo_bound_param_data *param; in dispatch_param_event() local
186 while (SUCCESS == zend_hash_get_current_data(ht, (void**)&param)) { in dispatch_param_event()
187 if (!stmt->methods->param_hook(stmt, param, event_type TSRMLS_CC)) { in dispatch_param_event()
241 struct pdo_bound_param_data *param; in pdo_stmt_describe_columns()
244 stmt->columns[col].namelen, (void**)&param)) { in pdo_stmt_describe_columns()
245 param->paramno = col; in pdo_stmt_describe_columns()
250 struct pdo_bound_param_data *param; in pdo_stmt_describe_columns() local
253 stmt->columns[col].namelen, (void**)&param)) { in pdo_stmt_describe_columns()
254 param->paramno = col; in pdo_stmt_describe_columns()
280 struct pdo_bound_param_data *param = (struct pdo_bound_param_data *)data; in param_dtor() local
284 if (param->stmt->methods->param_hook) { in param_dtor()
285 param->stmt->methods->param_hook(param->stmt, param, PDO_PARAM_EVT_FREE TSRMLS_CC); in param_dtor()
288 if (param->name) { in param_dtor()
289 efree(param->name); in param_dtor()
292 if (param->parameter) { in param_dtor()
293 zval_ptr_dtor(&(param->parameter)); in param_dtor()
294 param->parameter = NULL; in param_dtor()
296 if (param->driver_params) { in param_dtor()
297 zval_ptr_dtor(&(param->driver_params)); in param_dtor()
302 static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_stmt_t *stmt, int is… in really_register_bound_param() argument
320 …if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_STR && param->max_value_len <= 0 && ! ZVAL_IS_N… in really_register_bound_param()
321 if (Z_TYPE_P(param->parameter) == IS_DOUBLE) { in really_register_bound_param()
323 int len = spprintf(&p, 0, "%.*H", (int) EG(precision), Z_DVAL_P(param->parameter)); in really_register_bound_param()
324 ZVAL_STRINGL(param->parameter, p, len, 0); in really_register_bound_param()
326 convert_to_string(param->parameter); in really_register_bound_param()
328 …} else if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_INT && Z_TYPE_P(param->parameter) == IS_… in really_register_bound_param()
329 convert_to_long(param->parameter); in really_register_bound_param()
330 …} else if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL && Z_TYPE_P(param->parameter) == IS… in really_register_bound_param()
331 convert_to_boolean(param->parameter); in really_register_bound_param()
334 param->stmt = stmt; in really_register_bound_param()
335 param->is_param = is_param; in really_register_bound_param()
337 if (param->driver_params) { in really_register_bound_param()
338 Z_ADDREF_P(param->driver_params); in really_register_bound_param()
341 if (!is_param && param->name && stmt->columns) { in really_register_bound_param()
346 if (strcmp(stmt->columns[i].name, param->name) == 0) { in really_register_bound_param()
347 param->paramno = i; in really_register_bound_param()
354 if (param->paramno == -1) { in really_register_bound_param()
356 …tmp, 0, "Did not find column name '%s' in the defined columns; it will not be bound", param->name); in really_register_bound_param()
362 if (param->name) { in really_register_bound_param()
363 if (is_param && param->name[0] != ':') { in really_register_bound_param()
364 char *temp = emalloc(++param->namelen + 1); in really_register_bound_param()
366 memmove(temp+1, param->name, param->namelen); in really_register_bound_param()
367 param->name = temp; in really_register_bound_param()
369 param->name = estrndup(param->name, param->namelen); in really_register_bound_param()
373 if (is_param && !rewrite_name_to_position(stmt, param TSRMLS_CC)) { in really_register_bound_param()
374 if (param->name) { in really_register_bound_param()
375 efree(param->name); in really_register_bound_param()
376 param->name = NULL; in really_register_bound_param()
386 if (!stmt->methods->param_hook(stmt, param, PDO_PARAM_EVT_NORMALIZE in really_register_bound_param()
388 if (param->name) { in really_register_bound_param()
389 efree(param->name); in really_register_bound_param()
390 param->name = NULL; in really_register_bound_param()
399 if (param->paramno >= 0) { in really_register_bound_param()
400 zend_hash_index_del(hash, param->paramno); in really_register_bound_param()
404 if (param->name) { in really_register_bound_param()
405 zend_hash_update(hash, param->name, param->namelen, param, in really_register_bound_param()
406 sizeof(*param), (void**)&pparam); in really_register_bound_param()
408 zend_hash_index_update(hash, param->paramno, param, sizeof(*param), in really_register_bound_param()
424 param->parameter = NULL; in really_register_bound_param()
447 struct pdo_bound_param_data param; in PHP_METHOD() local
460 memset(&param, 0, sizeof(param)); in PHP_METHOD()
463 &param.name, &str_length, &num_index, 0, NULL)) { in PHP_METHOD()
465 param.namelen = str_length - 1; in PHP_METHOD()
466 param.paramno = -1; in PHP_METHOD()
473 param.paramno = num_index; in PHP_METHOD()
476 param.param_type = PDO_PARAM_STR; in PHP_METHOD()
477 MAKE_STD_ZVAL(param.parameter); in PHP_METHOD()
478 MAKE_COPY_ZVAL(tmp, param.parameter); in PHP_METHOD()
480 if (!really_register_bound_param(&param, stmt, 1 TSRMLS_CC)) { in PHP_METHOD()
481 if (param.parameter) { in PHP_METHOD()
482 zval_ptr_dtor(&param.parameter); in PHP_METHOD()
715 struct pdo_bound_param_data *param; in do_fetch_common() local
718 while (SUCCESS == zend_hash_get_current_data(stmt->bound_columns, (void**)&param)) { in do_fetch_common()
719 if (param->paramno >= 0) { in do_fetch_common()
720 convert_to_string(param->parameter); in do_fetch_common()
723 zval_dtor(param->parameter); in do_fetch_common()
726 fetch_value(stmt, param->parameter, param->paramno, (int *)&param->param_type TSRMLS_CC); in do_fetch_common()
1584 struct pdo_bound_param_data param = {0}; in register_bound_param() local
1587 param.paramno = -1; in register_bound_param()
1590 "lz|llz!", &param.paramno, &param.parameter, &param_type, &param.max_value_len, in register_bound_param()
1591 &param.driver_params)) { in register_bound_param()
1592 if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|llz!", &param.name, in register_bound_param()
1593 &param.namelen, &param.parameter, &param_type, &param.max_value_len, in register_bound_param()
1594 &param.driver_params)) { in register_bound_param()
1599 param.param_type = (int) param_type; in register_bound_param()
1601 if (param.paramno > 0) { in register_bound_param()
1602 --param.paramno; /* make it zero-based internally */ in register_bound_param()
1603 } else if (!param.name) { in register_bound_param()
1608 Z_ADDREF_P(param.parameter); in register_bound_param()
1609 if (!really_register_bound_param(&param, stmt, is_param TSRMLS_CC)) { in register_bound_param()
1610 if (param.parameter) { in register_bound_param()
1611 zval_ptr_dtor(&(param.parameter)); in register_bound_param()
1612 param.parameter = NULL; in register_bound_param()
1623 struct pdo_bound_param_data param = {0}; in PHP_METHOD() local
1627 param.paramno = -1; in PHP_METHOD()
1630 "lz/|l", &param.paramno, &param.parameter, &param_type)) { in PHP_METHOD()
1631 if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/|l", &param.name, in PHP_METHOD()
1632 &param.namelen, &param.parameter, &param_type)) { in PHP_METHOD()
1637 param.param_type = (int) param_type; in PHP_METHOD()
1639 if (param.paramno > 0) { in PHP_METHOD()
1640 --param.paramno; /* make it zero-based internally */ in PHP_METHOD()
1641 } else if (!param.name) { in PHP_METHOD()
1646 Z_ADDREF_P(param.parameter); in PHP_METHOD()
1647 if (!really_register_bound_param(&param, stmt, TRUE TSRMLS_CC)) { in PHP_METHOD()
1648 if (param.parameter) { in PHP_METHOD()
1649 zval_ptr_dtor(&(param.parameter)); in PHP_METHOD()
1650 param.parameter = NULL; in PHP_METHOD()
2153 struct pdo_bound_param_data *param; in PHP_METHOD() local
2170 (void**)&param, &pos)) { in PHP_METHOD()
2184 param->paramno, param->namelen, param->namelen, param->name ? param->name : "", in PHP_METHOD()
2185 param->is_param, in PHP_METHOD()
2186 param->param_type); in PHP_METHOD()