Lines Matching refs:result
51 MYSQL_RES *result;
341 struct sql_result *result;
343 result = sql_query_s(db, query);
344 result->callback = TRUE;
345 callback(result, context);
346 result->callback = FALSE;
347 sql_result_unref(result);
354 struct mysql_result *result;
357 result = i_new(struct mysql_result, 1);
358 result->api = driver_mysql_result;
361 result->api = driver_mysql_error_result;
364 result->affected_rows = mysql_affected_rows(db->mysql);
365 result->result = mysql_store_result(db->mysql);
376 (result->result != NULL || mysql_errno(db->mysql) == 0)) {
380 if (result->result != NULL)
381 mysql_free_result(result->result);
382 result->api = driver_mysql_error_result;
386 result->api.db = _db;
387 result->api.refcount = 1;
388 return &result->api;
393 struct mysql_result *result = (struct mysql_result *)_result;
399 if (result->result != NULL)
400 mysql_free_result(result->result);
401 i_free(result);
406 struct mysql_result *result = (struct mysql_result *)_result;
410 if (result->result == NULL) {
415 result->row = mysql_fetch_row(result->result);
416 if (result->row != NULL)
427 static void driver_mysql_result_fetch_fields(struct mysql_result *result)
429 if (result->fields != NULL)
432 result->fields_count = mysql_num_fields(result->result);
433 result->fields = mysql_fetch_fields(result->result);
439 struct mysql_result *result = (struct mysql_result *)_result;
441 driver_mysql_result_fetch_fields(result);
442 return result->fields_count;
448 struct mysql_result *result = (struct mysql_result *)_result;
450 driver_mysql_result_fetch_fields(result);
451 i_assert(idx < result->fields_count);
452 return result->fields[idx].name;
458 struct mysql_result *result = (struct mysql_result *)_result;
461 driver_mysql_result_fetch_fields(result);
462 for (i = 0; i < result->fields_count; i++) {
463 if (strcmp(result->fields[i].name, field_name) == 0)
473 struct mysql_result *result = (struct mysql_result *)_result;
475 return (const char *)result->row[idx];
482 struct mysql_result *result = (struct mysql_result *)_result;
485 lengths = mysql_fetch_lengths(result->result);
488 return (const void *)result->row[idx];
492 driver_mysql_result_find_field_value(struct sql_result *result,
497 idx = driver_mysql_result_find_field(result, field_name);
500 return driver_mysql_result_get_field_value(result, idx);
506 struct mysql_result *result = (struct mysql_result *)_result;
508 return (const char *const *)result->row;
544 struct sql_commit_result result;
547 i_zero(&result);
549 result.error = error;
550 callback(&result, context);
569 struct mysql_result *result = (struct mysql_result *)_result;
571 i_assert(result->affected_rows != (my_ulonglong)-1);
572 *affected_rows_r = result->affected_rows;
702 driver_mysql_result_error_next_row(struct sql_result *result ATTR_UNUSED)