2
* Drizzle Client & Protocol Library
4
* Copyright (C) 2008 Eric Day (eday@oddments.org)
7
* Use and distribution licensed under the BSD license. See
8
* the COPYING file in this directory for full text.
13
* @brief Result Declarations
16
#ifndef __DRIZZLE_RESULT_H
17
#define __DRIZZLE_RESULT_H
24
* @addtogroup drizzle_result Result Declarations
25
* @ingroup drizzle_client_interface
26
* @ingroup drizzle_server_interface
28
* These are core result functions used by both clients and servers.
33
* Initialize a result structure.
36
drizzle_result_st *drizzle_result_create(drizzle_con_st *con,
37
drizzle_result_st *result);
40
* Clone a connection structure.
43
drizzle_result_st *drizzle_result_clone(drizzle_con_st *con,
44
drizzle_result_st *result,
45
drizzle_result_st *from);
48
* Free a result structure.
51
void drizzle_result_free(drizzle_result_st *result);
54
* Free all result structures.
57
void drizzle_result_free_all(drizzle_con_st *con);
60
* Get the drizzle_con_st struct that the result belongs to.
63
drizzle_con_st *drizzle_result_drizzle_con(drizzle_result_st *result);
66
* Get EOF flag for a result.
69
bool drizzle_result_eof(drizzle_result_st *result);
72
* Get information string for a result.
75
const char *drizzle_result_info(drizzle_result_st *result);
78
* Get error string for a result.
81
const char *drizzle_result_error(drizzle_result_st *result);
84
* Get server defined error code for a result.
87
uint16_t drizzle_result_error_code(drizzle_result_st *result);
90
* Get SQL state code for a result.
93
const char *drizzle_result_sqlstate(drizzle_result_st *result);
96
* Get the number of warnings encounted during a command.
99
uint16_t drizzle_result_warning_count(drizzle_result_st *result);
102
* Get inet ID of the last command, if any.
105
uint64_t drizzle_result_insert_id(drizzle_result_st *result);
108
* Get the number of affected rows during the command.
111
uint64_t drizzle_result_affected_rows(drizzle_result_st *result);
114
* Get the number of columns in a result set.
117
uint16_t drizzle_result_column_count(drizzle_result_st *result);
120
* Get the number of rows returned for the command.
123
uint64_t drizzle_result_row_count(drizzle_result_st *result);
131
#endif /* __DRIZZLE_RESULT_H */