Lines Matching refs:param
277 static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, in pgsql_stmt_param_hook() argument
282 if (stmt->supports_placeholders == PDO_PLACEHOLDER_NAMED && param->is_param) { in pgsql_stmt_param_hook()
285 if (param->driver_data) { in pgsql_stmt_param_hook()
286 efree(param->driver_data); in pgsql_stmt_param_hook()
292 if (param->name) { in pgsql_stmt_param_hook()
293 if (ZSTR_VAL(param->name)[0] == '$') { in pgsql_stmt_param_hook() local
294 param->paramno = ZEND_ATOL(ZSTR_VAL(param->name) + 1); in pgsql_stmt_param_hook()
300 param->name)) != NULL) { in pgsql_stmt_param_hook()
301 param->paramno = ZEND_ATOL(ZSTR_VAL(namevar) + 1); in pgsql_stmt_param_hook()
302 param->paramno--; in pgsql_stmt_param_hook()
304 pdo_pgsql_error_stmt_msg(stmt, 0, "HY093", ZSTR_VAL(param->name)); in pgsql_stmt_param_hook()
315 if (!zend_hash_index_exists(stmt->bound_param_map, param->paramno)) { in pgsql_stmt_param_hook()
344 if (param->paramno >= 0) { in pgsql_stmt_param_hook()
354 if (Z_ISREF(param->parameter)) { in pgsql_stmt_param_hook()
355 parameter = Z_REFVAL(param->parameter); in pgsql_stmt_param_hook()
357 parameter = ¶m->parameter; in pgsql_stmt_param_hook()
360 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB && in pgsql_stmt_param_hook()
367 pdo_pgsql_bound_param *P = param->driver_data; in pgsql_stmt_param_hook()
371 param->driver_data = P; in pgsql_stmt_param_hook()
374 S->param_values[param->paramno] = (char*)&P->oid; in pgsql_stmt_param_hook()
375 S->param_lengths[param->paramno] = sizeof(P->oid); in pgsql_stmt_param_hook()
376 S->param_formats[param->paramno] = 1; in pgsql_stmt_param_hook()
377 S->param_types[param->paramno] = OIDOID; in pgsql_stmt_param_hook()
394 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_NULL || in pgsql_stmt_param_hook()
396 S->param_values[param->paramno] = NULL; in pgsql_stmt_param_hook()
397 S->param_lengths[param->paramno] = 0; in pgsql_stmt_param_hook()
399 S->param_values[param->paramno] = Z_TYPE_P(parameter) == IS_TRUE ? "t" : "f"; in pgsql_stmt_param_hook()
400 S->param_lengths[param->paramno] = 1; in pgsql_stmt_param_hook()
401 S->param_formats[param->paramno] = 0; in pgsql_stmt_param_hook()
404 S->param_values[param->paramno] = Z_STRVAL_P(parameter); in pgsql_stmt_param_hook()
405 S->param_lengths[param->paramno] = Z_STRLEN_P(parameter); in pgsql_stmt_param_hook()
406 S->param_formats[param->paramno] = 0; in pgsql_stmt_param_hook()
409 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB) { in pgsql_stmt_param_hook()
410 S->param_types[param->paramno] = 0; in pgsql_stmt_param_hook()
411 S->param_formats[param->paramno] = 1; in pgsql_stmt_param_hook()
413 S->param_types[param->paramno] = 0; in pgsql_stmt_param_hook()
418 } else if (param->is_param && event_type == PDO_PARAM_EVT_NORMALIZE) { in pgsql_stmt_param_hook()
420 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL && in pgsql_stmt_param_hook()
421 ((param->param_type & PDO_PARAM_INPUT_OUTPUT) != PDO_PARAM_INPUT_OUTPUT)) { in pgsql_stmt_param_hook()
422 const char *s = zend_is_true(¶m->parameter) ? "t" : "f"; in pgsql_stmt_param_hook()
423 param->param_type = PDO_PARAM_STR; in pgsql_stmt_param_hook()
424 zval_ptr_dtor(¶m->parameter); in pgsql_stmt_param_hook()
425 ZVAL_STRINGL(¶m->parameter, s, 1); in pgsql_stmt_param_hook()