1712.1.1
by Monty Taylor
Merged libdrizzle directly into tree. |
1 |
/*
|
2 |
* Drizzle Client & Protocol Library
|
|
3 |
*
|
|
4 |
* Copyright (C) 2008 Eric Day (eday@oddments.org)
|
|
5 |
* All rights reserved.
|
|
6 |
*
|
|
7 |
* Use and distribution licensed under the BSD license. See
|
|
1799.2.3
by Monty Taylor
Reference root BSD copying file. |
8 |
* the COPYING.BSD file in the root source directory for full text.
|
1712.1.1
by Monty Taylor
Merged libdrizzle directly into tree. |
9 |
*/
|
10 |
||
11 |
/**
|
|
12 |
* @file
|
|
13 |
* @brief Row Declarations for Clients
|
|
14 |
*/
|
|
15 |
||
16 |
#ifndef __DRIZZLE_ROW_CLIENT_H
|
|
17 |
#define __DRIZZLE_ROW_CLIENT_H
|
|
18 |
||
19 |
#ifdef __cplusplus
|
|
20 |
extern "C" { |
|
21 |
#endif
|
|
22 |
||
23 |
/**
|
|
24 |
* @addtogroup drizzle_row_client Row Declarations for Clients
|
|
25 |
* @ingroup drizzle_client_interface
|
|
26 |
*
|
|
27 |
* These functions allow you to access rows in a result set. If the result is
|
|
28 |
* unbuffered, you can read and buffer rows one at a time. If the rows are
|
|
29 |
* buffered in the result, the drizzle_row_next() and related functions can be
|
|
30 |
* used.
|
|
31 |
* @{
|
|
32 |
*/
|
|
33 |
||
34 |
/**
|
|
35 |
* Get next row number for unbuffered results. Use the drizzle_field* functions
|
|
36 |
* to read individual fields after this function succeeds.
|
|
37 |
*/
|
|
38 |
DRIZZLE_API
|
|
39 |
uint64_t drizzle_row_read(drizzle_result_st *result, drizzle_return_t *ret_ptr); |
|
40 |
||
41 |
/**
|
|
42 |
* Read and buffer one row. The returned row must be freed by the caller with
|
|
43 |
* drizzle_row_free().
|
|
44 |
*
|
|
45 |
* @param[in,out] result pointer to the result structure to read from.
|
|
46 |
* @param[out] ret_pointer Standard drizzle return value.
|
|
47 |
* @return the row that was read, or NULL if there are no more rows.
|
|
48 |
*/
|
|
49 |
DRIZZLE_API
|
|
50 |
drizzle_row_t drizzle_row_buffer(drizzle_result_st *result, |
|
51 |
drizzle_return_t *ret_ptr); |
|
52 |
||
53 |
/**
|
|
54 |
* Free a row that was buffered with drizzle_row_buffer().
|
|
55 |
*/
|
|
56 |
DRIZZLE_API
|
|
57 |
void drizzle_row_free(drizzle_result_st *result, drizzle_row_t row); |
|
58 |
||
59 |
/**
|
|
60 |
* Get an array of all field sizes for buffered rows.
|
|
61 |
*/
|
|
62 |
DRIZZLE_API
|
|
63 |
size_t *drizzle_row_field_sizes(drizzle_result_st *result); |
|
64 |
||
65 |
/**
|
|
66 |
* Get next buffered row from a fully buffered result.
|
|
67 |
*/
|
|
68 |
DRIZZLE_API
|
|
69 |
drizzle_row_t drizzle_row_next(drizzle_result_st *result); |
|
70 |
||
71 |
/**
|
|
72 |
* Get previous buffered row from a fully buffered result.
|
|
73 |
*/
|
|
74 |
DRIZZLE_API
|
|
75 |
drizzle_row_t drizzle_row_prev(drizzle_result_st *result); |
|
76 |
||
77 |
/**
|
|
78 |
* Seek to the given buffered row in a fully buffered result.
|
|
79 |
*/
|
|
80 |
DRIZZLE_API
|
|
81 |
void drizzle_row_seek(drizzle_result_st *result, uint64_t row); |
|
82 |
||
83 |
/**
|
|
84 |
* Get the given buffered row from a fully buffered result.
|
|
85 |
*/
|
|
86 |
DRIZZLE_API
|
|
87 |
drizzle_row_t drizzle_row_index(drizzle_result_st *result, uint64_t row); |
|
88 |
||
89 |
/**
|
|
90 |
* Get current row number.
|
|
91 |
*/
|
|
92 |
DRIZZLE_API
|
|
93 |
uint64_t drizzle_row_current(drizzle_result_st *result); |
|
94 |
||
95 |
/** @} */
|
|
96 |
||
97 |
#ifdef __cplusplus
|
|
98 |
}
|
|
99 |
#endif
|
|
100 |
||
101 |
#endif /* __DRIZZLE_ROW_CLIENT_H */ |