Lines Matching refs:param
242 static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, in pgsql_stmt_param_hook() argument
247 if (stmt->supports_placeholders == PDO_PLACEHOLDER_NAMED && param->is_param) { in pgsql_stmt_param_hook()
250 if (param->driver_data) { in pgsql_stmt_param_hook()
251 efree(param->driver_data); in pgsql_stmt_param_hook()
257 if (param->name) { in pgsql_stmt_param_hook()
258 if (param->name[0] == '$') { in pgsql_stmt_param_hook()
259 param->paramno = atoi(param->name + 1); in pgsql_stmt_param_hook()
264 param->name, param->namelen + 1, (void**)&nameptr)) { in pgsql_stmt_param_hook()
265 param->paramno = atoi(nameptr + 1) - 1; in pgsql_stmt_param_hook()
267 pdo_raise_impl_error(stmt->dbh, stmt, "HY093", param->name TSRMLS_CC); in pgsql_stmt_param_hook()
299 if (param->paramno >= 0) { in pgsql_stmt_param_hook()
300 if (param->paramno >= zend_hash_num_elements(stmt->bound_params)) { in pgsql_stmt_param_hook()
305 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB && in pgsql_stmt_param_hook()
306 Z_TYPE_P(param->parameter) == IS_RESOURCE) { in pgsql_stmt_param_hook()
308 php_stream_from_zval_no_verify(stm, ¶m->parameter); in pgsql_stmt_param_hook()
312 pdo_pgsql_bound_param *P = param->driver_data; in pgsql_stmt_param_hook()
316 param->driver_data = P; in pgsql_stmt_param_hook()
319 S->param_values[param->paramno] = (char*)&P->oid; in pgsql_stmt_param_hook()
320 S->param_lengths[param->paramno] = sizeof(P->oid); in pgsql_stmt_param_hook()
321 S->param_formats[param->paramno] = 1; in pgsql_stmt_param_hook()
322 S->param_types[param->paramno] = OIDOID; in pgsql_stmt_param_hook()
327 SEPARATE_ZVAL_IF_NOT_REF(¶m->parameter); in pgsql_stmt_param_hook()
328 Z_TYPE_P(param->parameter) = IS_STRING; in pgsql_stmt_param_hook()
330 …if ((len = php_stream_copy_to_mem(stm, &Z_STRVAL_P(param->parameter), PHP_STREAM_COPY_ALL, 0)) > 0… in pgsql_stmt_param_hook()
331 Z_STRLEN_P(param->parameter) = len; in pgsql_stmt_param_hook()
333 ZVAL_EMPTY_STRING(param->parameter); in pgsql_stmt_param_hook()
343 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_NULL || in pgsql_stmt_param_hook()
344 Z_TYPE_P(param->parameter) == IS_NULL) { in pgsql_stmt_param_hook()
345 S->param_values[param->paramno] = NULL; in pgsql_stmt_param_hook()
346 S->param_lengths[param->paramno] = 0; in pgsql_stmt_param_hook()
347 } else if (Z_TYPE_P(param->parameter) == IS_BOOL) { in pgsql_stmt_param_hook()
348 S->param_values[param->paramno] = Z_BVAL_P(param->parameter) ? "t" : "f"; in pgsql_stmt_param_hook()
349 S->param_lengths[param->paramno] = 1; in pgsql_stmt_param_hook()
350 S->param_formats[param->paramno] = 0; in pgsql_stmt_param_hook()
352 SEPARATE_ZVAL_IF_NOT_REF(¶m->parameter); in pgsql_stmt_param_hook()
353 convert_to_string(param->parameter); in pgsql_stmt_param_hook()
354 S->param_values[param->paramno] = Z_STRVAL_P(param->parameter); in pgsql_stmt_param_hook()
355 S->param_lengths[param->paramno] = Z_STRLEN_P(param->parameter); in pgsql_stmt_param_hook()
356 S->param_formats[param->paramno] = 0; in pgsql_stmt_param_hook()
359 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB) { in pgsql_stmt_param_hook()
360 S->param_types[param->paramno] = 0; in pgsql_stmt_param_hook()
361 S->param_formats[param->paramno] = 1; in pgsql_stmt_param_hook()
363 S->param_types[param->paramno] = 0; in pgsql_stmt_param_hook()
368 } else if (param->is_param) { in pgsql_stmt_param_hook()
370 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL && in pgsql_stmt_param_hook()
371 ((param->param_type & PDO_PARAM_INPUT_OUTPUT) != PDO_PARAM_INPUT_OUTPUT)) { in pgsql_stmt_param_hook()
372 SEPARATE_ZVAL(¶m->parameter); in pgsql_stmt_param_hook()
373 param->param_type = PDO_PARAM_STR; in pgsql_stmt_param_hook()
374 convert_to_boolean(param->parameter); in pgsql_stmt_param_hook()
375 ZVAL_STRINGL(param->parameter, Z_BVAL_P(param->parameter) ? "t" : "f", 1, 1); in pgsql_stmt_param_hook()
433 struct pdo_bound_param_data *param; in pgsql_stmt_describe() local
455 colno, (void**)¶m) || in pgsql_stmt_describe()
458 (void**)¶m))) { in pgsql_stmt_describe()
459 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB) { in pgsql_stmt_describe()