~linuxjedi/libdrizzle/5.1-fix-null-bitmap

« back to all changes in this revision

Viewing changes to docs/api/connection.rst

  • Committer: Continuous Integration
  • Date: 2013-02-07 17:55:21 UTC
  • mfrom: (106.1.1 5.1-docs2)
  • Revision ID: ci@drizzle.org-20130207175521-sujyw4mioa2of1n4
Tags: 5.1.3
Merge lp:~linuxjedi/libdrizzle/5.1-docs2 Build: jenkins-Libdrizzle-68

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
   The internal drizzle connection object struct
15
15
 
 
16
.. c:type:: drizzle_options_st
 
17
 
 
18
   The internal structure containing connection options
 
19
 
16
20
Functions
17
21
---------
18
22
 
19
 
.. c:function:: drizzle_st* drizzle_create_tcp(const char *host, in_port_t port, const char *user, const char *password, const char *db, drizzle_options_t options)
20
 
 
21
 
   Creates a TCP/IP connection connection object
22
 
 
23
 
   :param host: The hostname or IP of the server
24
 
   :param port: The port number of the server
25
 
   :param user: The username of the server
26
 
   :param password: The password of the server
27
 
   :param db: The default DB to connect to on the server
28
 
   :param options: The connection options to set
29
 
   :returns: A newly allocated and setup connection object
30
 
 
31
 
.. c:function:: drizzle_st* drizzle_create_uds(const char *uds, const char *user, const char *password, const char *db, drizzle_options_t options)
32
 
 
33
 
   Creates a Unix Domain Socket connection object
34
 
 
35
 
   :param uds: The path of the UDS file
36
 
   :param user: The username of the server
37
 
   :param password: The password of the server
38
 
   :param db: The default DB to connect to on the server
39
 
   :param options: The connection options to set
 
23
.. c:function:: drizzle_st* drizzle_create(const char *host, in_port_t port, const char *user, const char *password, const char *db, drizzle_options_st *options)
 
24
 
 
25
   Creates a connection connection object.  If a path beginning with ``/`` is given as the host the library will connect as a UDS socket.  Otherwise a TCP/IP conection is made.
 
26
 
 
27
   .. note::
 
28
      a connection does not happen until the first query or an explicit :c:func:`drizzle_connect` call is made
 
29
 
 
30
   :param host: The socket path, hostname or IP of the server
 
31
   :param port: The port number of the server (if TCP/IP)
 
32
   :param user: The username of the server
 
33
   :param password: The password of the server
 
34
   :param db: The default DB to connect to on the server
 
35
   :param options: A pointer to a :c:type:`drizzle_options_st` created using :c:func:`drizzle_options_create` or :c:type:`NULL`
40
36
   :returns: A newly allocated and setup connection object
41
37
 
42
38
.. c:function:: int drizzle_timeout(const drizzle_st *con)
51
47
   Sets the connection timeout for the connection object
52
48
 
53
49
   :param drizzle: A connection object
54
 
   :param int: The new timeout to set
 
50
   :param timeout: The new timeout to set
55
51
 
56
52
.. c:function:: drizzle_verbose_t drizzle_verbose(const drizzle_st *con)
57
53
 
103
99
   :param con: A connection object
104
100
   :returns: A string containing the sqlstate
105
101
 
106
 
.. c:function:: drizzle_options_t drizzle_options(const drizzle_st *con)
107
 
 
108
 
   Gets the connection options
109
 
 
110
 
   :param con: A connection object
111
 
   :returns: The options for the connection
112
 
 
113
 
.. c:function:: void drizzle_set_options(drizzle_st *con, drizzle_options_t options)
114
 
 
115
 
   Sets the connection options
116
 
 
117
 
   :param con: A connection object
118
 
   :param options: A bit field of the :c:type:`drizzle_options_t` options
119
 
 
120
 
.. c:function:: void drizzle_add_options(drizzle_st *con, drizzle_options_t options)
121
 
 
122
 
   Add connection options
123
 
 
124
 
   :param con: A connection object
125
 
   :param options: A bit field of the :c:type:`drizzle_options_t` options
126
 
 
127
 
.. c:function:: void drizzle_remove_options(drizzle_st *con, drizzle_options_t options)
128
 
 
129
 
   Removes connection options
130
 
 
131
 
   :param con: A connection object
132
 
   :param options: A bit field of the :c:type:`drizzle_options_t` options
133
 
 
 
102
.. c:function:: drizzle_options_st *drizzle_options_create(void)
 
103
 
 
104
   Create a new connection options object
 
105
 
 
106
   :returns: The new connection options object
 
107
 
 
108
.. c:function:: void drizzle_options_destroy(drizzle_options_st *options)
 
109
 
 
110
   Destroys a connection options object
 
111
 
 
112
   :param options: The options object to be destroyed
 
113
 
 
114
.. c:function:: void drizzle_options_set_non_blocking(drizzle_options_st *options, bool state)
 
115
 
 
116
   Sets/unsets non-blocking connect option
 
117
 
 
118
   :param options: The options object to modify
 
119
   :param state: Set option to true/false
 
120
 
 
121
.. c:function:: bool drizzle_options_get_non_blocking(drizzle_options_st *options)
 
122
 
 
123
   Gets the non-blocking connect option
 
124
 
 
125
   :param options: The options object to get the value from
 
126
   :returns: The state of the non-blocking option
 
127
 
 
128
.. c:function:: void drizzle_options_set_raw_scramble(drizzle_options_st *options, bool state)
 
129
 
 
130
   Sets/unsets the raw scramble connect option
 
131
 
 
132
   :param options: The options object to modify
 
133
   :param state: Set to true/false
 
134
 
 
135
.. c:function:: bool drizzle_options_get_raw_scramble(drizzle_options_st *options)
 
136
 
 
137
   Gets the raw scramble connect option
 
138
 
 
139
   :param options: The options object to get the value from
 
140
   :returns: The state of the raw scramble option
 
141
 
 
142
.. c:function:: void drizzle_options_set_found_rows(drizzle_options_st *options, bool state)
 
143
 
 
144
   Sets/unsets the found rows connect option
 
145
 
 
146
   :param options: The options object to modify
 
147
   :param state: Set to true/false
 
148
 
 
149
.. c:function:: bool drizzle_options_get_found_rows(drizzle_options_st *options)
 
150
 
 
151
   Gets the found rows connect option
 
152
 
 
153
   :param options: The options object to get the value from
 
154
   :returns: The state of the found rows option
 
155
 
 
156
.. c:function:: void drizzle_options_set_interactive(drizzle_options_st *options, bool state)
 
157
 
 
158
   Sets/unsets the interactive connect option
 
159
 
 
160
   :param options: The options object to modify
 
161
   :param state: Set to true/false
 
162
 
 
163
.. c:function:: bool drizzle_options_get_interactive(drizzle_options_st *option)
 
164
 
 
165
   Gets the interactive connect option
 
166
 
 
167
   :param options: The options object to get the value from
 
168
   :returns: The state of the interactive option
 
169
 
 
170
.. c:function:: void drizzle_options_set_multi_statements(drizzle_options_st *options, bool state)
 
171
 
 
172
   Sets/unsets the multi-statements connect option
 
173
 
 
174
   :param options: The options object to modify
 
175
   :parma state: Set to true/false
 
176
 
 
177
.. c:function:: bool drizzle_options_get_multi_statements(drizzle_options_st *options)
 
178
 
 
179
   Gets the multi-statements connect option
 
180
 
 
181
   :param options: The options object to get the value from
 
182
   :returns: The state of the multi-statements option
 
183
 
 
184
.. c:function:: void drizzle_options_set_auth_plugin(drizzle_options_st *options, bool state)
 
185
 
 
186
   Sets/unsets the auth plugin connect option
 
187
 
 
188
   :param options: The optoins object to modify
 
189
   :param state: Set to true/false
 
190
 
 
191
.. c:function:: bool drizzle_options_get_auth_plugin(drizzle_options_st *options)
 
192
 
 
193
   Gets the auth plugin connect option
 
194
 
 
195
   :param options: The options object to get the value from
 
196
   :returns: The state of the auth plugin option
 
197
   
134
198
.. c:function:: const char* drizzle_host(const drizzle_st *con)
135
199
 
136
200
   Gets the host name from a TCP/IP connection