Lines Matching refs:param
262 static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, in pgsql_stmt_param_hook() argument
267 if (stmt->supports_placeholders == PDO_PLACEHOLDER_NAMED && param->is_param) { in pgsql_stmt_param_hook()
270 if (param->driver_data) { in pgsql_stmt_param_hook()
271 efree(param->driver_data); in pgsql_stmt_param_hook()
277 if (param->name) { in pgsql_stmt_param_hook()
278 if (ZSTR_VAL(param->name)[0] == '$') { in pgsql_stmt_param_hook() local
279 ZEND_ATOL(param->paramno, ZSTR_VAL(param->name) + 1); in pgsql_stmt_param_hook()
285 param->name)) != NULL) { in pgsql_stmt_param_hook()
286 ZEND_ATOL(param->paramno, namevar + 1); in pgsql_stmt_param_hook()
287 param->paramno--; in pgsql_stmt_param_hook()
289 pdo_raise_impl_error(stmt->dbh, stmt, "HY093", ZSTR_VAL(param->name)); in pgsql_stmt_param_hook()
300 if (!zend_hash_index_exists(stmt->bound_param_map, param->paramno)) { in pgsql_stmt_param_hook()
328 if (param->paramno >= 0) { in pgsql_stmt_param_hook()
338 if (Z_ISREF(param->parameter)) { in pgsql_stmt_param_hook()
339 parameter = Z_REFVAL(param->parameter); in pgsql_stmt_param_hook()
341 parameter = ¶m->parameter; in pgsql_stmt_param_hook()
344 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB && in pgsql_stmt_param_hook()
351 pdo_pgsql_bound_param *P = param->driver_data; in pgsql_stmt_param_hook()
355 param->driver_data = P; in pgsql_stmt_param_hook()
358 S->param_values[param->paramno] = (char*)&P->oid; in pgsql_stmt_param_hook()
359 S->param_lengths[param->paramno] = sizeof(P->oid); in pgsql_stmt_param_hook()
360 S->param_formats[param->paramno] = 1; in pgsql_stmt_param_hook()
361 S->param_types[param->paramno] = OIDOID; in pgsql_stmt_param_hook()
379 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_NULL || in pgsql_stmt_param_hook()
381 S->param_values[param->paramno] = NULL; in pgsql_stmt_param_hook()
382 S->param_lengths[param->paramno] = 0; in pgsql_stmt_param_hook()
384 S->param_values[param->paramno] = Z_TYPE_P(parameter) == IS_TRUE ? "t" : "f"; in pgsql_stmt_param_hook()
385 S->param_lengths[param->paramno] = 1; in pgsql_stmt_param_hook()
386 S->param_formats[param->paramno] = 0; in pgsql_stmt_param_hook()
390 S->param_values[param->paramno] = Z_STRVAL_P(parameter); in pgsql_stmt_param_hook()
391 S->param_lengths[param->paramno] = Z_STRLEN_P(parameter); in pgsql_stmt_param_hook()
392 S->param_formats[param->paramno] = 0; in pgsql_stmt_param_hook()
395 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB) { in pgsql_stmt_param_hook()
396 S->param_types[param->paramno] = 0; in pgsql_stmt_param_hook()
397 S->param_formats[param->paramno] = 1; in pgsql_stmt_param_hook()
399 S->param_types[param->paramno] = 0; in pgsql_stmt_param_hook()
404 } else if (param->is_param) { in pgsql_stmt_param_hook()
406 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL && in pgsql_stmt_param_hook()
407 ((param->param_type & PDO_PARAM_INPUT_OUTPUT) != PDO_PARAM_INPUT_OUTPUT)) { in pgsql_stmt_param_hook()
408 const char *s = zend_is_true(¶m->parameter) ? "t" : "f"; in pgsql_stmt_param_hook()
409 param->param_type = PDO_PARAM_STR; in pgsql_stmt_param_hook()
410 zval_ptr_dtor(¶m->parameter); in pgsql_stmt_param_hook()
411 ZVAL_STRINGL(¶m->parameter, s, 1); in pgsql_stmt_param_hook()
474 struct pdo_bound_param_data *param; in pgsql_stmt_describe() local
496 (param = zend_hash_index_find_ptr(stmt->bound_columns, colno)) != NULL || in pgsql_stmt_describe()
497 (param = zend_hash_find_ptr(stmt->bound_columns, cols[colno].name)) != NULL)) { in pgsql_stmt_describe()
499 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB) { in pgsql_stmt_describe()