Lines Matching refs:param
238 static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, in pgsql_stmt_param_hook() argument
244 if (S->stmt_name && param->is_param) { in pgsql_stmt_param_hook()
247 if (param->driver_data) { in pgsql_stmt_param_hook()
248 efree(param->driver_data); in pgsql_stmt_param_hook()
254 if (param->name) { in pgsql_stmt_param_hook()
255 if (param->name[0] == '$') { in pgsql_stmt_param_hook()
256 param->paramno = atoi(param->name + 1); in pgsql_stmt_param_hook()
261 param->name, param->namelen + 1, (void**)&nameptr)) { in pgsql_stmt_param_hook()
262 param->paramno = atoi(nameptr + 1) - 1; in pgsql_stmt_param_hook()
264 pdo_raise_impl_error(stmt->dbh, stmt, "HY093", param->name TSRMLS_CC); in pgsql_stmt_param_hook()
296 if (param->paramno >= 0) { in pgsql_stmt_param_hook()
297 if (param->paramno >= zend_hash_num_elements(stmt->bound_params)) { in pgsql_stmt_param_hook()
302 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB && in pgsql_stmt_param_hook()
303 Z_TYPE_P(param->parameter) == IS_RESOURCE) { in pgsql_stmt_param_hook()
305 php_stream_from_zval_no_verify(stm, ¶m->parameter); in pgsql_stmt_param_hook()
309 pdo_pgsql_bound_param *P = param->driver_data; in pgsql_stmt_param_hook()
313 param->driver_data = P; in pgsql_stmt_param_hook()
316 S->param_values[param->paramno] = (char*)&P->oid; in pgsql_stmt_param_hook()
317 S->param_lengths[param->paramno] = sizeof(P->oid); in pgsql_stmt_param_hook()
318 S->param_formats[param->paramno] = 1; in pgsql_stmt_param_hook()
319 S->param_types[param->paramno] = OIDOID; in pgsql_stmt_param_hook()
324 SEPARATE_ZVAL_IF_NOT_REF(¶m->parameter); in pgsql_stmt_param_hook()
325 Z_TYPE_P(param->parameter) = IS_STRING; in pgsql_stmt_param_hook()
327 …if ((len = php_stream_copy_to_mem(stm, &Z_STRVAL_P(param->parameter), PHP_STREAM_COPY_ALL, 0)) > 0… in pgsql_stmt_param_hook()
328 Z_STRLEN_P(param->parameter) = len; in pgsql_stmt_param_hook()
330 ZVAL_EMPTY_STRING(param->parameter); in pgsql_stmt_param_hook()
340 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_NULL || in pgsql_stmt_param_hook()
341 Z_TYPE_P(param->parameter) == IS_NULL) { in pgsql_stmt_param_hook()
342 S->param_values[param->paramno] = NULL; in pgsql_stmt_param_hook()
343 S->param_lengths[param->paramno] = 0; in pgsql_stmt_param_hook()
344 } else if (Z_TYPE_P(param->parameter) == IS_BOOL) { in pgsql_stmt_param_hook()
345 S->param_values[param->paramno] = Z_BVAL_P(param->parameter) ? "t" : "f"; in pgsql_stmt_param_hook()
346 S->param_lengths[param->paramno] = 1; in pgsql_stmt_param_hook()
347 S->param_formats[param->paramno] = 0; in pgsql_stmt_param_hook()
349 SEPARATE_ZVAL_IF_NOT_REF(¶m->parameter); in pgsql_stmt_param_hook()
350 convert_to_string(param->parameter); in pgsql_stmt_param_hook()
351 S->param_values[param->paramno] = Z_STRVAL_P(param->parameter); in pgsql_stmt_param_hook()
352 S->param_lengths[param->paramno] = Z_STRLEN_P(param->parameter); in pgsql_stmt_param_hook()
353 S->param_formats[param->paramno] = 0; in pgsql_stmt_param_hook()
356 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB) { in pgsql_stmt_param_hook()
357 S->param_types[param->paramno] = 0; in pgsql_stmt_param_hook()
358 S->param_formats[param->paramno] = 1; in pgsql_stmt_param_hook()
360 S->param_types[param->paramno] = 0; in pgsql_stmt_param_hook()
367 if (param->is_param) { in pgsql_stmt_param_hook()
369 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL && in pgsql_stmt_param_hook()
370 ((param->param_type & PDO_PARAM_INPUT_OUTPUT) != PDO_PARAM_INPUT_OUTPUT)) { in pgsql_stmt_param_hook()
371 SEPARATE_ZVAL(¶m->parameter); in pgsql_stmt_param_hook()
372 param->param_type = PDO_PARAM_STR; in pgsql_stmt_param_hook()
373 convert_to_boolean(param->parameter); in pgsql_stmt_param_hook()
374 ZVAL_STRINGL(param->parameter, Z_BVAL_P(param->parameter) ? "t" : "f", 1, 1); in pgsql_stmt_param_hook()
435 struct pdo_bound_param_data *param; in pgsql_stmt_describe() local
457 colno, (void**)¶m) || in pgsql_stmt_describe()
460 (void**)¶m))) { in pgsql_stmt_describe()
461 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB) { in pgsql_stmt_describe()