383.1.46
by Monty Taylor
Finished splitting libdrizzle header files. |
1 |
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
|
3 |
*
|
|
4 |
* Copyright (C) 2008 Sun Microsystems, Inc.
|
|
5 |
*
|
|
6 |
* This program is free software; you can redistribute it and/or modify
|
|
7 |
* it under the terms of the GNU General Public License as published by
|
|
390.1.3
by Monty Taylor
Copyright header fixes. |
8 |
* the Free Software Foundation; version 2 of the License.
|
383.1.46
by Monty Taylor
Finished splitting libdrizzle header files. |
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 |
* GNU General Public License for more details.
|
|
14 |
*
|
|
15 |
* You should have received a copy of the GNU General Public License
|
|
16 |
* along with this program; if not, write to the Free Software
|
|
17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
18 |
*/
|
|
19 |
||
779.3.37
by Monty Taylor
Renmaed libdrizzle in the tree to libdrizzleclient to avoid namespace clashes |
20 |
#ifndef LIBDRIZZLECLIENT_DRIZZLE_RES_H
|
21 |
#define LIBDRIZZLECLIENT_DRIZZLE_RES_H
|
|
383.1.46
by Monty Taylor
Finished splitting libdrizzle header files. |
22 |
|
779.3.37
by Monty Taylor
Renmaed libdrizzle in the tree to libdrizzleclient to avoid namespace clashes |
23 |
#include "drizzle_field.h" |
24 |
#include "drizzle_data.h" |
|
25 |
#include "drizzle_rows.h" |
|
26 |
#include "drizzle.h" |
|
383.1.46
by Monty Taylor
Finished splitting libdrizzle header files. |
27 |
|
28 |
#include <stdint.h> |
|
629.1.1
by Monty Taylor
More solaris fixes. |
29 |
#if !defined(__cplusplus)
|
30 |
# include <stdbool.h>
|
|
31 |
#endif
|
|
779.3.37
by Monty Taylor
Renmaed libdrizzle in the tree to libdrizzleclient to avoid namespace clashes |
32 |
|
33 |
#ifdef __cplusplus
|
|
34 |
extern "C" { |
|
35 |
#endif
|
|
383.1.46
by Monty Taylor
Finished splitting libdrizzle header files. |
36 |
|
37 |
struct st_drizzle; |
|
38 |
||
39 |
typedef struct st_drizzle_res { |
|
40 |
uint64_t row_count; |
|
41 |
DRIZZLE_FIELD *fields; |
|
42 |
DRIZZLE_DATA *data; |
|
43 |
DRIZZLE_ROWS *data_cursor; |
|
44 |
uint32_t *lengths; /* column lengths of current row */ |
|
45 |
struct st_drizzle *handle; /* for unbuffered reads */ |
|
46 |
const struct st_drizzle_methods *methods; |
|
47 |
DRIZZLE_ROW row; /* If unbuffered read */ |
|
48 |
DRIZZLE_ROW current_row; /* buffer to current row */ |
|
49 |
uint32_t field_count, current_field; |
|
840.1.21
by Monty Taylor
ZOMG. Renamed all the rest of the stuff in libdrizzleclient to be drizzleclient_*. I love commandline perl. |
50 |
bool eof; /* Used by drizzleclient_fetch_row */ |
383.1.46
by Monty Taylor
Finished splitting libdrizzle header files. |
51 |
/* drizzle_stmt_close() had to cancel this result */
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
52 |
bool unbuffered_fetch_cancelled; |
383.1.46
by Monty Taylor
Finished splitting libdrizzle header files. |
53 |
void *extension; |
54 |
} DRIZZLE_RES; |
|
55 |
||
56 |
||
57 |
/*
|
|
58 |
Functions to get information from the DRIZZLE and DRIZZLE_RES structures
|
|
59 |
Should definitely be used if one uses shared libraries.
|
|
60 |
*/
|
|
61 |
||
840.1.21
by Monty Taylor
ZOMG. Renamed all the rest of the stuff in libdrizzleclient to be drizzleclient_*. I love commandline perl. |
62 |
uint64_t drizzleclient_num_rows(const DRIZZLE_RES *res); |
63 |
unsigned int drizzleclient_num_fields(const DRIZZLE_RES *res); |
|
64 |
bool drizzleclient_eof(const DRIZZLE_RES *res); |
|
65 |
const DRIZZLE_FIELD * drizzleclient_fetch_field_direct(const DRIZZLE_RES *res, |
|
383.1.46
by Monty Taylor
Finished splitting libdrizzle header files. |
66 |
unsigned int fieldnr); |
840.1.21
by Monty Taylor
ZOMG. Renamed all the rest of the stuff in libdrizzleclient to be drizzleclient_*. I love commandline perl. |
67 |
const DRIZZLE_FIELD * drizzleclient_fetch_fields(const DRIZZLE_RES *res); |
68 |
DRIZZLE_ROW_OFFSET drizzleclient_row_tell(const DRIZZLE_RES *res); |
|
69 |
DRIZZLE_FIELD_OFFSET drizzleclient_field_tell(const DRIZZLE_RES *res); |
|
383.1.46
by Monty Taylor
Finished splitting libdrizzle header files. |
70 |
|
840.1.21
by Monty Taylor
ZOMG. Renamed all the rest of the stuff in libdrizzleclient to be drizzleclient_*. I love commandline perl. |
71 |
void drizzleclient_free_result(DRIZZLE_RES *result); |
72 |
void drizzleclient_data_seek(DRIZZLE_RES *result, uint64_t offset); |
|
73 |
DRIZZLE_ROW_OFFSET drizzleclient_row_seek(DRIZZLE_RES *result, DRIZZLE_ROW_OFFSET offset); |
|
74 |
DRIZZLE_FIELD_OFFSET drizzleclient_field_seek(DRIZZLE_RES *result, DRIZZLE_FIELD_OFFSET offset); |
|
75 |
DRIZZLE_ROW drizzleclient_fetch_row(DRIZZLE_RES *result); |
|
76 |
uint32_t * drizzleclient_fetch_lengths(DRIZZLE_RES *result); |
|
77 |
DRIZZLE_FIELD * drizzleclient_fetch_field(DRIZZLE_RES *result); |
|
383.1.46
by Monty Taylor
Finished splitting libdrizzle header files. |
78 |
|
79 |
#ifdef __cplusplus
|
|
80 |
}
|
|
81 |
#endif
|
|
82 |
||
779.3.37
by Monty Taylor
Renmaed libdrizzle in the tree to libdrizzleclient to avoid namespace clashes |
83 |
#endif /* LIBDRIZZLECLIENT_DRIZZLE_RES_H */ |