~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/drizzle.h

  • Committer: Monty Taylor
  • Date: 2008-09-16 00:00:48 UTC
  • mto: This revision was merged to the branch mainline in revision 391.
  • Revision ID: monty@inaugust.com-20080916000048-3rvrv3gv9l0ad3gs
Fixed copyright headers in drizzled/

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
8
 
 *  the Free Software Foundation; version 2 of the License.
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
9
10
 *
10
11
 *  This program is distributed in the hope that it will be useful,
11
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
20
21
#ifndef _libdrizzle_drizzle_h
21
22
#define _libdrizzle_drizzle_h
22
23
 
 
24
#ifdef  __cplusplus
 
25
extern "C" {
 
26
#endif
23
27
 
24
28
#include <stdint.h>
25
 
#include <stdbool.h>
26
 
#include <drizzled/common.h>
 
29
#include <libdrizzle/drizzle_com.h>
27
30
#include <libdrizzle/drizzle_field.h>
28
31
#include <libdrizzle/drizzle_options.h>
29
32
#include <libdrizzle/drizzle_res.h>
30
 
#include <libdrizzle/net_serv.h>
31
33
 
32
 
#ifdef  __cplusplus
33
 
extern "C" {
34
 
#endif
35
34
 
36
35
struct st_drizzle_methods;
37
36
 
81
80
  void *extension;
82
81
} DRIZZLE;
83
82
 
 
83
uint32_t drizzle_field_count(const DRIZZLE *drizzle);
 
84
uint64_t drizzle_affected_rows(const DRIZZLE *drizzle);
 
85
uint64_t drizzle_insert_id(const DRIZZLE *drizzle);
 
86
uint32_t drizzle_errno(const DRIZZLE *drizzle);
 
87
const char * drizzle_error(const DRIZZLE *drizzle);
 
88
const char * drizzle_sqlstate(const DRIZZLE *drizzle);
 
89
uint32_t drizzle_warning_count(const DRIZZLE *drizzle);
 
90
const char * drizzle_info(const DRIZZLE *drizzle);
 
91
uint32_t drizzle_thread_id(const DRIZZLE *drizzle);
 
92
const char * drizzle_character_set_name(const DRIZZLE *drizzle);
 
93
int32_t          drizzle_set_character_set(DRIZZLE *drizzle, const char *csname);
 
94
 
84
95
DRIZZLE * drizzle_create(DRIZZLE *drizzle);
 
96
bool   drizzle_change_user(DRIZZLE *drizzle, const char *user,
 
97
            const char *passwd, const char *db);
85
98
DRIZZLE * drizzle_connect(DRIZZLE *drizzle, const char *host,
86
99
             const char *user,
87
100
             const char *passwd,
89
102
             uint32_t port,
90
103
             const char *unix_socket,
91
104
             uint32_t clientflag);
92
 
 
93
105
int32_t    drizzle_select_db(DRIZZLE *drizzle, const char *db);
94
106
int32_t    drizzle_query(DRIZZLE *drizzle, const char *q);
95
107
int32_t    drizzle_send_query(DRIZZLE *drizzle, const char *q, uint32_t length);
96
108
int32_t    drizzle_real_query(DRIZZLE *drizzle, const char *q, uint32_t length);
97
 
 
98
109
DRIZZLE_RES * drizzle_store_result(DRIZZLE *drizzle);
99
110
DRIZZLE_RES * drizzle_use_result(DRIZZLE *drizzle);
100
111
 
101
 
uint32_t drizzle_field_count(const DRIZZLE *drizzle);
102
 
uint64_t drizzle_affected_rows(const DRIZZLE *drizzle);
103
 
uint64_t drizzle_insert_id(const DRIZZLE *drizzle);
104
 
uint32_t drizzle_errno(const DRIZZLE *drizzle);
105
 
const char * drizzle_error(const DRIZZLE *drizzle);
106
 
const char * drizzle_sqlstate(const DRIZZLE *drizzle);
107
 
uint32_t drizzle_warning_count(const DRIZZLE *drizzle);
108
 
const char * drizzle_info(const DRIZZLE *drizzle);
109
 
uint32_t drizzle_thread_id(const DRIZZLE *drizzle);
110
 
const char * drizzle_character_set_name(const DRIZZLE *drizzle);
111
 
 
112
 
bool   drizzle_change_user(DRIZZLE *drizzle, const char *user,
113
 
                           const char *passwd, const char *db);
114
 
 
115
112
/* local infile support */
116
113
 
117
114
#define LOCAL_INFILE_ERROR_LEN 512
126
123
void
127
124
drizzle_set_local_infile_default(DRIZZLE *drizzle);
128
125
 
129
 
int32_t    drizzle_shutdown(DRIZZLE *drizzle);
 
126
int32_t    drizzle_shutdown(DRIZZLE *drizzle, enum drizzle_enum_shutdown_level shutdown_level);
130
127
int32_t    drizzle_dump_debug_info(DRIZZLE *drizzle);
131
128
int32_t    drizzle_refresh(DRIZZLE *drizzle, uint32_t refresh_options);
132
129
int32_t    drizzle_kill(DRIZZLE *drizzle, uint32_t pid);
133
 
int32_t    drizzle_set_server_option(DRIZZLE *drizzle,
134
 
                                     enum enum_drizzle_set_option option);
 
130
int32_t    drizzle_set_server_option(DRIZZLE *drizzle, enum enum_drizzle_set_option option);
135
131
int32_t    drizzle_ping(DRIZZLE *drizzle);
136
132
const char *  drizzle_stat(DRIZZLE *drizzle);
137
133
const char *  drizzle_get_server_info(const DRIZZLE *drizzle);
141
137
uint32_t  drizzle_get_proto_info(const DRIZZLE *drizzle);
142
138
DRIZZLE_RES *  drizzle_list_tables(DRIZZLE *drizzle,const char *wild);
143
139
DRIZZLE_RES *  drizzle_list_processes(DRIZZLE *drizzle);
144
 
int32_t    drizzle_options(DRIZZLE *drizzle, enum drizzle_option option,
145
 
                           const void *arg);
146
 
DRIZZLE_RES *     drizzle_list_fields(DRIZZLE *drizzle, const char *table,
147
 
                                      const char *wild);
 
140
int32_t    drizzle_options(DRIZZLE *drizzle,enum drizzle_option option, const void *arg);
 
141
DRIZZLE_RES *     drizzle_list_fields(DRIZZLE *drizzle, const char *table, const char *wild);
148
142
bool         drizzle_read_query_result(DRIZZLE *drizzle);
149
143
 
150
144
bool drizzle_commit(DRIZZLE *drizzle);
152
146
bool drizzle_autocommit(DRIZZLE *drizzle, bool auto_mode);
153
147
bool drizzle_more_results(const DRIZZLE *drizzle);
154
148
int drizzle_next_result(DRIZZLE *drizzle);
155
 
void drizzle_close(DRIZZLE *drizzle);
156
 
bool drizzle_reconnect(DRIZZLE *drizzle);
157
 
void drizzle_disconnect(DRIZZLE *drizzle);
 
149
void drizzle_close(DRIZZLE *sock);
 
150
 
158
151
 
159
152
bool
160
153
cli_advanced_command(DRIZZLE *drizzle, enum enum_server_command command,
161
 
                     const unsigned char *header, uint32_t header_length,
162
 
                     const unsigned char *arg, uint32_t arg_length,
163
 
                     bool skip_check);
 
154
                     const unsigned char *header, uint32_t header_length,
 
155
                     const unsigned char *arg, uint32_t arg_length, bool skip_check);
164
156
uint32_t cli_safe_read(DRIZZLE *drizzle);
165
157
DRIZZLE_FIELD * cli_list_fields(DRIZZLE *drizzle);
166
158
DRIZZLE_DATA * cli_read_rows(DRIZZLE *drizzle,DRIZZLE_FIELD *drizzle_fields,
167
 
                             unsigned int fields);
 
159
                                   uint fields);
168
160
int cli_unbuffered_fetch(DRIZZLE *drizzle, char **row);
169
161
const char * cli_read_statistics(DRIZZLE *drizzle);
170
162
int cli_read_change_user_result(DRIZZLE *drizzle);