Lines Matching refs:param
264 static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, in pgsql_stmt_param_hook() argument
269 if (stmt->supports_placeholders == PDO_PLACEHOLDER_NAMED && param->is_param) { in pgsql_stmt_param_hook()
272 if (param->driver_data) { in pgsql_stmt_param_hook()
273 efree(param->driver_data); in pgsql_stmt_param_hook()
279 if (param->name) { in pgsql_stmt_param_hook()
280 if (ZSTR_VAL(param->name)[0] == '$') { in pgsql_stmt_param_hook() local
281 param->paramno = ZEND_ATOL(ZSTR_VAL(param->name) + 1); in pgsql_stmt_param_hook()
287 param->name)) != NULL) { in pgsql_stmt_param_hook()
288 param->paramno = ZEND_ATOL(ZSTR_VAL(namevar) + 1); in pgsql_stmt_param_hook()
289 param->paramno--; in pgsql_stmt_param_hook()
291 pdo_pgsql_error_stmt_msg(stmt, 0, "HY093", ZSTR_VAL(param->name)); in pgsql_stmt_param_hook()
302 if (!zend_hash_index_exists(stmt->bound_param_map, param->paramno)) { in pgsql_stmt_param_hook()
331 if (param->paramno >= 0) { in pgsql_stmt_param_hook()
341 if (Z_ISREF(param->parameter)) { in pgsql_stmt_param_hook()
342 parameter = Z_REFVAL(param->parameter); in pgsql_stmt_param_hook()
344 parameter = ¶m->parameter; in pgsql_stmt_param_hook()
347 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB && in pgsql_stmt_param_hook()
354 pdo_pgsql_bound_param *P = param->driver_data; in pgsql_stmt_param_hook()
358 param->driver_data = P; in pgsql_stmt_param_hook()
361 S->param_values[param->paramno] = (char*)&P->oid; in pgsql_stmt_param_hook()
362 S->param_lengths[param->paramno] = sizeof(P->oid); in pgsql_stmt_param_hook()
363 S->param_formats[param->paramno] = 1; in pgsql_stmt_param_hook()
364 S->param_types[param->paramno] = OIDOID; in pgsql_stmt_param_hook()
381 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_NULL || in pgsql_stmt_param_hook()
383 S->param_values[param->paramno] = NULL; in pgsql_stmt_param_hook()
384 S->param_lengths[param->paramno] = 0; in pgsql_stmt_param_hook()
386 S->param_values[param->paramno] = Z_TYPE_P(parameter) == IS_TRUE ? "t" : "f"; in pgsql_stmt_param_hook()
387 S->param_lengths[param->paramno] = 1; in pgsql_stmt_param_hook()
388 S->param_formats[param->paramno] = 0; in pgsql_stmt_param_hook()
391 S->param_values[param->paramno] = Z_STRVAL_P(parameter); in pgsql_stmt_param_hook()
392 S->param_lengths[param->paramno] = Z_STRLEN_P(parameter); in pgsql_stmt_param_hook()
393 S->param_formats[param->paramno] = 0; in pgsql_stmt_param_hook()
396 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB) { in pgsql_stmt_param_hook()
397 S->param_types[param->paramno] = 0; in pgsql_stmt_param_hook()
398 S->param_formats[param->paramno] = 1; in pgsql_stmt_param_hook()
400 S->param_types[param->paramno] = 0; in pgsql_stmt_param_hook()
405 } else if (param->is_param && event_type == PDO_PARAM_EVT_NORMALIZE) { in pgsql_stmt_param_hook()
407 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL && in pgsql_stmt_param_hook()
408 ((param->param_type & PDO_PARAM_INPUT_OUTPUT) != PDO_PARAM_INPUT_OUTPUT)) { in pgsql_stmt_param_hook()
409 const char *s = zend_is_true(¶m->parameter) ? "t" : "f"; in pgsql_stmt_param_hook()
410 param->param_type = PDO_PARAM_STR; in pgsql_stmt_param_hook()
411 zval_ptr_dtor(¶m->parameter); in pgsql_stmt_param_hook()
412 ZVAL_STRINGL(¶m->parameter, s, 1); in pgsql_stmt_param_hook()