FreeTDS API

num_limits.h
1 #define LIMIT_INDEXES_ADJUST 4
2
3 static const signed char limit_indexes[79]= {
4 0, /* 0 */
5 -3, /* 1 */
6 -6, /* 2 */
7 -9, /* 3 */
8 -12, /* 4 */
9 -15, /* 5 */
10 -18, /* 6 */
11 -21, /* 7 */
12 -24, /* 8 */
13 -27, /* 9 */
14 -30, /* 10 */
15 -32, /* 11 */
16 -34, /* 12 */
17 -36, /* 13 */
18 -38, /* 14 */
19 -40, /* 15 */
20 -42, /* 16 */
21 -44, /* 17 */
22 -46, /* 18 */
23 -48, /* 19 */
24 -50, /* 20 */
25 -51, /* 21 */
26 -52, /* 22 */
27 -53, /* 23 */
28 -54, /* 24 */
29 -55, /* 25 */
30 -56, /* 26 */
31 -57, /* 27 */
32 -58, /* 28 */
33 -59, /* 29 */
34 -59, /* 30 */
35 -59, /* 31 */
36 -59, /* 32 */
37 -60, /* 33 */
38 -61, /* 34 */
39 -62, /* 35 */
40 -63, /* 36 */
41 -64, /* 37 */
42 -65, /* 38 */
43 -66, /* 39 */
44 -66, /* 40 */
45 -66, /* 41 */
46 -66, /* 42 */
47 -66, /* 43 */
48 -66, /* 44 */
49 -66, /* 45 */
50 -66, /* 46 */
51 -66, /* 47 */
52 -66, /* 48 */
53 -66, /* 49 */
54 -65, /* 50 */
55 -64, /* 51 */
56 -63, /* 52 */
57 -62, /* 53 */
58 -61, /* 54 */
59 -60, /* 55 */
60 -59, /* 56 */
61 -58, /* 57 */
62 -57, /* 58 */
63 -55, /* 59 */
64 -53, /* 60 */
65 -51, /* 61 */
66 -49, /* 62 */
67 -47, /* 63 */
68 -45, /* 64 */
69 -44, /* 65 */
70 -43, /* 66 */
71 -42, /* 67 */
72 -41, /* 68 */
73 -39, /* 69 */
74 -37, /* 70 */
75 -35, /* 71 */
76 -33, /* 72 */
77 -31, /* 73 */
78 -29, /* 74 */
79 -27, /* 75 */
80 -25, /* 76 */
81 -23, /* 77 */
82 -21, /* 78 */
83 };
84
85 static const TDS_WORD limits[]= {
86 0x00000001u, /* 0 */
87 0x0000000au, /* 1 */
88 0x00000064u, /* 2 */
89 0x000003e8u, /* 3 */
90 0x00002710u, /* 4 */
91 0x000186a0u, /* 5 */
92 0x000f4240u, /* 6 */
93 0x00989680u, /* 7 */
94 0x05f5e100u, /* 8 */
95 0x3b9aca00u, /* 9 */
96 0x00000002u, /* 10 */
97 0x540be400u, /* 11 */
98 0x00000017u, /* 12 */
99 0x4876e800u, /* 13 */
100 0x000000e8u, /* 14 */
101 0xd4a51000u, /* 15 */
102 0x00000918u, /* 16 */
103 0x4e72a000u, /* 17 */
104 0x00005af3u, /* 18 */
105 0x107a4000u, /* 19 */
106 0x00038d7eu, /* 20 */
107 0xa4c68000u, /* 21 */
108 0x002386f2u, /* 22 */
109 0x6fc10000u, /* 23 */
110 0x01634578u, /* 24 */
111 0x5d8a0000u, /* 25 */
112 0x0de0b6b3u, /* 26 */
113 0xa7640000u, /* 27 */
114 0x8ac72304u, /* 28 */
115 0x89e80000u, /* 29 */
116 0x00000005u, /* 30 */
117 0x6bc75e2du, /* 31 */
118 0x63100000u, /* 32 */
119 0x00000036u, /* 33 */
120 0x35c9adc5u, /* 34 */
121 0xdea00000u, /* 35 */
122 0x0000021eu, /* 36 */
123 0x19e0c9bau, /* 37 */
124 0xb2400000u, /* 38 */
125 0x0000152du, /* 39 */
126 0x02c7e14au, /* 40 */
127 0xf6800000u, /* 41 */
128 0x0000d3c2u, /* 42 */
129 0x1bceccedu, /* 43 */
130 0xa1000000u, /* 44 */
131 0x00084595u, /* 45 */
132 0x16140148u, /* 46 */
133 0x4a000000u, /* 47 */
134 0x0052b7d2u, /* 48 */
135 0xdcc80cd2u, /* 49 */
136 0xe4000000u, /* 50 */
137 0x033b2e3cu, /* 51 */
138 0x9fd0803cu, /* 52 */
139 0xe8000000u, /* 53 */
140 0x204fce5eu, /* 54 */
141 0x3e250261u, /* 55 */
142 0x10000000u, /* 56 */
143 0x00000001u, /* 57 */
144 0x431e0faeu, /* 58 */
145 0x6d7217cau, /* 59 */
146 0xa0000000u, /* 60 */
147 0x0000000cu, /* 61 */
148 0x9f2c9cd0u, /* 62 */
149 0x4674edeau, /* 63 */
150 0x40000000u, /* 64 */
151 0x0000007eu, /* 65 */
152 0x37be2022u, /* 66 */
153 0xc0914b26u, /* 67 */
154 0x80000000u, /* 68 */
155 0x000004eeu, /* 69 */
156 0x2d6d415bu, /* 70 */
157 0x85acef81u, /* 71 */
158 0x0000314du, /* 72 */
159 0xc6448d93u, /* 73 */
160 0x38c15b0au, /* 74 */
161 0x0001ed09u, /* 75 */
162 0xbead87c0u, /* 76 */
163 0x378d8e64u, /* 77 */
164 0x00134261u, /* 78 */
165 0x72c74d82u, /* 79 */
166 0x2b878fe8u, /* 80 */
167 0x00c097ceu, /* 81 */
168 0x7bc90715u, /* 82 */
169 0xb34b9f10u, /* 83 */
170 0x0785ee10u, /* 84 */
171 0xd5da46d9u, /* 85 */
172 0x00f436a0u, /* 86 */
173 0x4b3b4ca8u, /* 87 */
174 0x5a86c47au, /* 88 */
175 0x098a2240u, /* 89 */
176 0x00000002u, /* 90 */
177 0xf050fe93u, /* 91 */
178 0x8943acc4u, /* 92 */
179 0x5f655680u, /* 93 */
180 0x0000001du, /* 94 */
181 0x6329f1c3u, /* 95 */
182 0x5ca4bfabu, /* 96 */
183 0xb9f56100u, /* 97 */
184 0x00000125u, /* 98 */
185 0xdfa371a1u, /* 99 */
186 0x9e6f7cb5u, /* 100 */
187 0x4395ca00u, /* 101 */
188 0x00000b7au, /* 102 */
189 0xbc627050u, /* 103 */
190 0x305adf14u, /* 104 */
191 0xa3d9e400u, /* 105 */
192 0x000072cbu, /* 106 */
193 0x5bd86321u, /* 107 */
194 0xe38cb6ceu, /* 108 */
195 0x6682e800u, /* 109 */
196 0x00047bf1u, /* 110 */
197 0x9673df52u, /* 111 */
198 0xe37f2410u, /* 112 */
199 0x011d1000u, /* 113 */
200 0x002cd76fu, /* 114 */
201 0xe086b93cu, /* 115 */
202 0xe2f768a0u, /* 116 */
203 0x0b22a000u, /* 117 */
204 0x01c06a5eu, /* 118 */
205 0xc5433c60u, /* 119 */
206 0xddaa1640u, /* 120 */
207 0x6f5a4000u, /* 121 */
208 0x118427b3u, /* 122 */
209 0xb4a05bc8u, /* 123 */
210 0xa8a4de84u, /* 124 */
211 0x59868000u, /* 125 */
212 0xaf298d05u, /* 126 */
213 0x0e4395d6u, /* 127 */
214 0x9670b12bu, /* 128 */
215 0x7f410000u, /* 129 */
216 0x00000006u, /* 130 */
217 0xd79f8232u, /* 131 */
218 0x8ea3da61u, /* 132 */
219 0xe066ebb2u, /* 133 */
220 0xf88a0000u, /* 134 */
221 0x00000044u, /* 135 */
222 0x6c3b15f9u, /* 136 */
223 0x926687d2u, /* 137 */
224 0xc40534fdu, /* 138 */
225 0xb5640000u, /* 139 */
226 0x000002acu, /* 140 */
227 0x3a4edbbfu, /* 141 */
228 0xb8014e3bu, /* 142 */
229 0xa83411e9u, /* 143 */
230 0x15e80000u, /* 144 */
231 0x00001abau, /* 145 */
232 0x4714957du, /* 146 */
233 0x300d0e54u, /* 147 */
234 0x9208b31au, /* 148 */
235 0xdb100000u, /* 149 */
236 0x00010b46u, /* 150 */
237 0xc6cdd6e3u, /* 151 */
238 0xe0828f4du, /* 152 */
239 0xb456ff0cu, /* 153 */
240 0x8ea00000u, /* 154 */
241 0x000a70c3u, /* 155 */
242 0xc40a64e6u, /* 156 */
243 0xc5199909u, /* 157 */
244 0x0b65f67du, /* 158 */
245 0x92400000u, /* 159 */
246 0x006867a5u, /* 160 */
247 0xa867f103u, /* 161 */
248 0xb2fffa5au, /* 162 */
249 0x71fba0e7u, /* 163 */
250 0xb6800000u, /* 164 */
251 0x04140c78u, /* 165 */
252 0x940f6a24u, /* 166 */
253 0xfdffc788u, /* 167 */
254 0x73d4490du, /* 168 */
255 0x21000000u, /* 169 */
256 0x28c87cb5u, /* 170 */
257 0xc89a2571u, /* 171 */
258 0xebfdcb54u, /* 172 */
259 0x864ada83u, /* 173 */
260 0x4a000000u, /* 174 */
261 0x00000001u, /* 175 */
262 0x97d4df19u, /* 176 */
263 0xd6057673u, /* 177 */
264 0x37e9f14du, /* 178 */
265 0x3eec8920u, /* 179 */
266 0xe4000000u, /* 180 */
267 0x0000000fu, /* 181 */
268 0xee50b702u, /* 182 */
269 0x5c36a080u, /* 183 */
270 0x2f236d04u, /* 184 */
271 0x753d5b48u, /* 185 */
272 0xe8000000u, /* 186 */
273 0x0000009fu, /* 187 */
274 0x4f272617u, /* 188 */
275 0x9a224501u, /* 189 */
276 0xd762422cu, /* 190 */
277 0x946590d9u, /* 191 */
278 0x10000000u, /* 192 */
279 0x00000639u, /* 193 */
280 0x17877cecu, /* 194 */
281 0x0556b212u, /* 195 */
282 0x69d695bdu, /* 196 */
283 0xcbf7a87au, /* 197 */
284 0xa0000000u, /* 198 */
285 0x00003e3au, /* 199 */
286 0xeb4ae138u, /* 200 */
287 0x3562f4b8u, /* 201 */
288 0x2261d969u, /* 202 */
289 0xf7ac94cau, /* 203 */
290 0x40000000u, /* 204 */
291 0x00026e4du, /* 205 */
292 0x30eccc32u, /* 206 */
293 0x15dd8f31u, /* 207 */
294 0x57d27e23u, /* 208 */
295 0xacbdcfe6u, /* 209 */
296 0x80000000u, /* 210 */
297 0x00184f03u, /* 211 */
298 0xe93ff9f4u, /* 212 */
299 0xdaa797edu, /* 213 */
300 0x6e38ed64u, /* 214 */
301 0xbf6a1f01u, /* 215 */
302 0x00f31627u, /* 216 */
303 0x1c7fc390u, /* 217 */
304 0x8a8bef46u, /* 218 */
305 0x4e3945efu, /* 219 */
306 0x7a25360au, /* 220 */
307 0x097edd87u, /* 221 */
308 0x1cfda3a5u, /* 222 */
309 0x697758bfu, /* 223 */
310 0x0e3cbb5au, /* 224 */
311 0xc5741c64u, /* 225 */
312 0x5ef4a747u, /* 226 */
313 0x21e86476u, /* 227 */
314 0x1ea97776u, /* 228 */
315 0x8e5f518bu, /* 229 */
316 0xb6891be8u, /* 230 */
317 0x00000003u, /* 231 */
318 0xb58e88c7u, /* 232 */
319 0x5313ec9du, /* 233 */
320 0x329eaaa1u, /* 234 */
321 0x8fb92f75u, /* 235 */
322 0x215b1710u, /* 236 */
323 0x00000025u, /* 237 */
324 0x179157c9u, /* 238 */
325 0x3ec73e23u, /* 239 */
326 0xfa32aa4fu, /* 240 */
327 0x9d3bda93u, /* 241 */
328 0x4d8ee6a0u, /* 242 */
329 0x00000172u, /* 243 */
330 0xebad6ddcu, /* 244 */
331 0x73c86d67u, /* 245 */
332 0xc5faa71cu, /* 246 */
333 0x245689c1u, /* 247 */
334 0x07950240u, /* 248 */
335 0x00000e7du, /* 249 */
336 0x34c64a9cu, /* 250 */
337 0x85d4460du, /* 251 */
338 0xbbca8719u, /* 252 */
339 0x6b61618au, /* 253 */
340 0x4bd21680u, /* 254 */
341 0x000090e4u, /* 255 */
342 0x0fbeea1du, /* 256 */
343 0x3a4abc89u, /* 257 */
344 0x55e946feu, /* 258 */
345 0x31cdcf66u, /* 259 */
346 0xf634e100u, /* 260 */
347 0x0005a8e8u, /* 261 */
348 0x9d752524u, /* 262 */
349 0x46eb5d5du, /* 263 */
350 0x5b1cc5edu, /* 264 */
351 0xf20a1a05u, /* 265 */
352 0x9e10ca00u, /* 266 */
353 0x00389916u, /* 267 */
354 0x2693736au, /* 268 */
355 0xc531a5a5u, /* 269 */
356 0x8f1fbb4bu, /* 270 */
357 0x74650438u, /* 271 */
358 0x2ca7e400u, /* 272 */
359 0x0235faddu, /* 273 */
360 0x81c2822bu, /* 274 */
361 0xb3f07877u, /* 275 */
362 0x973d50f2u, /* 276 */
363 0x8bf22a31u, /* 277 */
364 0xbe8ee800u, /* 278 */
365 0x161bcca7u, /* 279 */
366 0x119915b5u, /* 280 */
367 0x0764b4abu, /* 281 */
368 0xe8652979u, /* 282 */
369 0x7775a5f1u, /* 283 */
370 0x71951000u, /* 284 */
371 0xdd15fe86u, /* 285 */
372 0xaffad912u, /* 286 */
373 0x49ef0eb7u, /* 287 */
374 0x13f39ebeu, /* 288 */
375 0xaa987b6eu, /* 289 */
376 0x6fd2a000u, /* 290 */
377 };
tds_login::new_password
DSTR new_password
new password to set (TDS 7.2+)
Definition: tds.h:531
tds_login::user_name
DSTR user_name
account for login
Definition: tds.h:529
tds.h
tds_login::ip_addrs
struct addrinfo * ip_addrs
ip(s) of server
Definition: tds.h:541
tds_read_conf_section
bool tds_read_conf_section(FILE *in, const char *section, TDSCONFPARSE tds_conf_parse, void *param)
Read a section of configuration file (INI style file)
Definition: config.c:504
tds_write_dump
int tds_write_dump
Tell if TDS debug logging is turned on or off.
Definition: log.c:58
tds_iconv_alloc
int tds_iconv_alloc(TDSCONNECTION *conn)
Allocate iconv stuff.
Definition: iconv.c:266
tds_setup_socket
static TDSERRNO tds_setup_socket(TDS_SYS_SOCKET *p_sock, struct addrinfo *addr, unsigned int port, int *p_oserr)
Setup the socket and attempt a connection.
Definition: net.c:249
tds_socket::ret_status
TDS_INT ret_status
return status from store procedure
Definition: tds.h:1203
tds_packet
Definition: tds.h:1055
tds_detach_results
void tds_detach_results(TDSRESULTINFO *info)
Detach result info from it current socket.
Definition: mem.c:488
tds_login::server_charset
DSTR server_charset
charset of server e.g.
Definition: tds.h:518
tds_free_param_result
void tds_free_param_result(TDSPARAMINFO *param_info)
Delete latest parameter.
Definition: mem.c:320
tds_goodread
int tds_goodread(TDSSOCKET *tds, unsigned char *buf, int buflen)
Loops until we have received some characters return -1 on failure.
Definition: net.c:916
tds_column::column_size
TDS_INT column_size
maximun size of data.
Definition: tds.h:696
tdsdump_col
void tdsdump_col(const TDSCOLUMN *col)
Write a column value to the debug log.
Definition: log.c:408
tds_error_message
Definition: util.c:222
tds_cursor::cursor_id
TDS_INT cursor_id
cursor id returned by the server after cursor declare
Definition: tds.h:942
tds_connection::s
TDS_SYS_SOCKET s
tcp socket, INVALID_SOCKET if not connected
Definition: tds.h:1075
tdsdump_log
void tdsdump_log(const char *file, unsigned int level_line, const char *fmt,...)
Write a message to the debug log.
Definition: log.c:354
tds_login::db_filename
DSTR db_filename
database filename to attach (MSSQL)
Definition: tds.h:524
tds_login::crlfile
DSTR crlfile
certificate revocation file
Definition: tds.h:526
tds_alloc_param_result
TDSPARAMINFO * tds_alloc_param_result(TDSPARAMINFO *old_param)
Adds a output parameter to TDSPARAMINFO.
Definition: mem.c:284
tds_alloc_row
TDSRET tds_alloc_row(TDSRESULTINFO *res_info)
Allocate space for row store return NULL on out of memory.
Definition: mem.c:524
tds_socket::cur_cursor
TDSCURSOR * cur_cursor
cursor in use
Definition: tds.h:1199
tds_dstr_init
static void tds_dstr_init(DSTR *s)
init a string with empty
Definition: string.h:53
tdsdump_off
void tdsdump_off(void)
Temporarily turn off logging.
Definition: log.c:76
retry_addr
Definition: net.c:364
tds7_get_instance_port
int tds7_get_instance_port(struct addrinfo *addr, const char *instance)
Get port of given instance.
Definition: net.c:1229
tds_get_socket_error
static int tds_get_socket_error(TDS_SYS_SOCKET sock)
Returns error stored in the socket.
Definition: net.c:217
tds_login::bulk_copy
unsigned int bulk_copy
if bulk copy should be enabled
Definition: tds.h:551
tds_flush_packet
TDSRET tds_flush_packet(TDSSOCKET *tds)
Flush packet to server.
Definition: write.c:285
tds_dynamic
Holds information for a dynamic (also called prepared) query.
Definition: tds.h:977
tds_socket::out_buf_max
unsigned int out_buf_max
Maximum size of packet pointed by out_buf.
Definition: tds.h:1167
tds_socket::in_cancel
volatile unsigned char in_cancel
indicate we are waiting a cancel reply; discard tokens till acknowledge; 1 mean we have to send cance...
Definition: tds.h:1206
tds_alloc_dynamic
TDSDYNAMIC * tds_alloc_dynamic(TDSCONNECTION *conn, const char *id)
Allocate a dynamic statement.
Definition: mem.c:160
tds_set_state
TDS_STATE tds_set_state(TDSSOCKET *tds, TDS_STATE state)
Set state of TDS connection, with logging and checking.
Definition: util.c:58
tds_dstr_free
void tds_dstr_free(DSTR *s)
free string
Definition: tdsstring.c:62
tds_dstr_isempty
static int tds_dstr_isempty(const DSTR *s)
test if string is empty
Definition: string.h:60
pollfd
Definition: poll.h:52
tds_message
Definition: tds.h:876
TDS_IS_MSSQL
#define TDS_IS_MSSQL(x)
Check if product is Microsft SQL Server.
Definition: tds.h:1623
tds_login::cafile
DSTR cafile
certificate authorities file
Definition: tds.h:525
tds_column
Metadata about columns in regular and compute rows.
Definition: tds.h:690
tds_socket_write
static int tds_socket_write(TDSCONNECTION *conn, TDSSOCKET *tds, const unsigned char *buf, int buflen)
Write to an OS socket.
Definition: net.c:762
tds_login::server_spn
DSTR server_spn
server SPN (in freetds.conf)
Definition: tds.h:523
tds_init_login
TDSLOGIN * tds_init_login(TDSLOGIN *login, TDSLOCALE *locale)
Initialize login structure with locale information and other stuff for connection.
Definition: mem.c:800
tds_socket::send_packet
TDSPACKET * send_packet
packet we are preparing to send
Definition: tds.h:1187
tds_cursor::query
char * query
SQL query.
Definition: tds.h:948
tds_socket_set_nosigpipe
int tds_socket_set_nosigpipe(TDS_SYS_SOCKET sock, int on)
Set socket to not throw SIGPIPE.
Definition: net.c:72
tds_socket::out_pos
unsigned out_pos
current position in out_buf
Definition: tds.h:1169
tds_goodwrite
int tds_goodwrite(TDSSOCKET *tds, const unsigned char *buffer, size_t buflen)
Definition: net.c:987
tds_connection::env
TDSENV env
environment is shared between all sessions
Definition: tds.h:1080
TDS_DEAD
@ TDS_DEAD
no connection
Definition: tds.h:796
tds_login::server_name
DSTR server_name
server name (in freetds.conf)
Definition: tds.h:513
tds_socket::in_row
bool in_row
true if we are getting rows
Definition: tds.h:1202
tds_env::block_size
int block_size
packet size (512-65535)
Definition: tds.h:966
tds_get_n
bool tds_get_n(TDSSOCKET *tds, void *dest, size_t need)
Get N bytes from the buffer and return them in the already allocated space given to us.
Definition: read.c:248
tds_dstr_cstr
static const char * tds_dstr_cstr(const DSTR *s)
Returns a C version (NUL terminated string) of dstr.
Definition: string.h:78
tds_login::tds_version
TDS_USMALLINT tds_version
TDS version.
Definition: tds.h:515
tds_bcpcoldata
Definition: tds.h:622
tds_connection::cursors
TDSCURSOR * cursors
linked list of cursors allocated for this connection contains only cursors allocated on the server
Definition: tds.h:1086
tdsdump_close
void tdsdump_close(void)
Close the TDS dump log file.
Definition: log.c:193
tds_socket_read
static int tds_socket_read(TDSCONNECTION *conn, TDSSOCKET *tds, unsigned char *buf, int buflen)
Read from an OS socket @TODO remove tds, save error somewhere, report error in another way.
Definition: net.c:727
tds_result_info
Hold information for any results.
Definition: tds.h:769
tds_dstr_copy
DSTR * tds_dstr_copy(DSTR *s, const char *src)
copy a string from another
Definition: tdsstring.c:122
tds_column_funcs
Definition: tds.h:638
tds_socket::cur_dyn
TDSDYNAMIC * cur_dyn
dynamic structure in use
Definition: tds.h:1212
tds_cursor::ref_count
TDS_INT ref_count
reference counter so client can retain safely a pointer
Definition: tds.h:940
tds7_get_instance_ports
int tds7_get_instance_ports(FILE *output, struct addrinfo *addr)
Get port of all instances.
Definition: net.c:1093
tds_capabilities
Definition: tds.h:505
tds_bcpinfo
Definition: tds.h:1563
tds_lookup_dynamic
TDSDYNAMIC * tds_lookup_dynamic(TDSCONNECTION *conn, const char *id)
Finds a dynamic given string id.
Definition: token.c:2583
tdsdump_on
void tdsdump_on(void)
Turn logging back on.
Definition: log.c:88
tds_socket::out_buf
unsigned char * out_buf
Output buffer.
Definition: tds.h:1161
tds_column::column_type
TDS_SERVER_TYPE column_type
This type can be different from wire type because conversion (e.g.
Definition: tds.h:698
tds_authentication
Definition: tds.h:1047
TDS_IDLE
@ TDS_IDLE
no data expected
Definition: tds.h:791
tds_dynamic::next
struct tds_dynamic * next
next in linked list, keep first
Definition: tds.h:979
tds_dynamic::res_info
TDSPARAMINFO * res_info
query results
Definition: tds.h:1000
tds_release_dynamic
void tds_release_dynamic(TDSDYNAMIC **pdyn)
Frees dynamic statement.
Definition: mem.c:253
tds_canonical_charset_name
const char * tds_canonical_charset_name(const char *charset_name)
Determine canonical iconv character set name.
Definition: iconv.c:958
tds_socket::has_status
bool has_status
true is ret_status is valid
Definition: tds.h:1201
tds_cursor::cursor_name
char * cursor_name
name of the cursor
Definition: tds.h:941
poll.h
Provide poll call where missing.
tds_blob
Information about blobs (e.g.
Definition: tds.h:587
tds_alloc_compute_result
static TDSCOMPUTEINFO * tds_alloc_compute_result(TDS_USMALLINT num_cols, TDS_USMALLINT by_cols)
Allocate memory for storing compute info return NULL on out of memory.
Definition: mem.c:395
tds_socket::current_results
TDSRESULTINFO * current_results
Current query information.
Definition: tds.h:1194
tds_get_conversion_type
TDS_SERVER_TYPE tds_get_conversion_type(TDS_SERVER_TYPE srctype, int colsize)
Return type suitable for conversions (convert all nullable types to fixed type)
Definition: tds_types.h:125
tds_select
int tds_select(TDSSOCKET *tds, unsigned tds_sel, int timeout_seconds)
Select on a socket until it's available or the timeout expires.
Definition: net.c:612
tds_socket::in_buf
unsigned char * in_buf
Input buffer.
Definition: tds.h:1154
tds_login::port
int port
port of database service
Definition: tds.h:514
tds_realloc
void * tds_realloc(void **pp, size_t new_size)
Reallocate a pointer and update it if success.
Definition: mem.c:1819
tds_dstr_zero
void tds_dstr_zero(DSTR *s)
clear all string filling with zeroes (mainly for security reason)
Definition: tdsstring.c:55
tds_socket::out_flag
unsigned char out_flag
output buffer type
Definition: tds.h:1172
tdserror
int tdserror(const TDSCONTEXT *tds_ctx, TDSSOCKET *tds, int msgno, int errnum)
Call the client library's error handler (for library-generated errors only)
Definition: util.c:307
tds_socket_set_nonblocking
int tds_socket_set_nonblocking(TDS_SYS_SOCKET sock)
Set socket to non-blocking.
Definition: net.c:168
tds_login::password
DSTR password
password of account login
Definition: tds.h:530
tds_socket
Information for a server connection.
Definition: tds.h:1141
tds_get_locale
TDSLOCALE * tds_get_locale(void)
Get locale information.
Definition: locale.c:50
tds_env::charset
char * charset
character set encoding
Definition: tds.h:969
tds_dynamic::params
TDSPARAMINFO * params
query parameters.
Definition: tds.h:1008
tds_dynamic::num_id
TDS_INT num_id
numeric id for mssql7+
Definition: tds.h:982
tds_locale
Definition: tds.h:576
tds_close_socket
void tds_close_socket(TDSSOCKET *tds)
Close current socket.
Definition: net.c:548
tds_cursor::type
TDS_INT type
row fetched from this cursor
Definition: tds.h:957
tds_socket::login
TDSLOGIN * login
config for login stuff.
Definition: tds.h:1214
tds_dynamic::id
char id[30]
id of dynamic.
Definition: tds.h:988
tds_prtype
const char * tds_prtype(int type)
Returns string representation of the given type.
Definition: token.c:3052
tds_dynamic::query
char * query
saved query, we need to know original query if prepare is impossible
Definition: tds.h:1010
tdsdump_open
int tdsdump_open(const char *filename)
Create and truncate a human readable dump file for the TDS traffic.
Definition: log.c:112
tds_poll_wakeup
Definition: tds.h:1063
tds_login::server_realm_name
DSTR server_realm_name
server realm name (in freetds.conf)
Definition: tds.h:522
tds_dynamic::ref_count
TDS_INT ref_count
reference counter so client can retain safely a pointer
Definition: tds.h:980
tds_alloc_param_data
void * tds_alloc_param_data(TDSCOLUMN *curparam)
Allocate data for a parameter.
Definition: mem.c:364
tds_get_dynid
static char * tds_get_dynid(TDSCONNECTION *conn, char *id)
Get an id for dynamic query based on TDS information.
Definition: mem.c:94
tds_connection::dyns
TDSDYNAMIC * dyns
list of dynamic allocated for this connection contains only dynamic allocated on the server
Definition: tds.h:1091
tds_context
Definition: tds.h:1029
tds_cursor::next
struct tds_cursor * next
next in linked list, keep first
Definition: tds.h:939
tds_login
Definition: tds.h:511
tds_free_input_params
void tds_free_input_params(TDSDYNAMIC *dyn)
Frees all allocated input parameters of a dynamic statement.
Definition: mem.c:206
tdsdump_dump_buf
void tdsdump_dump_buf(const char *file, unsigned int level_line, const char *msg, const void *buf, size_t length)
Dump the contents of data into the log file in a human readable format.
Definition: log.c:256
tds_cursor
Holds informations about a cursor.
Definition: tds.h:937
tds_connection
Definition: tds.h:1069
tds_column::column_cur_size
TDS_INT column_cur_size
size written in variable (ie: char, text, binary).
Definition: tds.h:737
tds_env::database
char * database
database name
Definition: tds.h:971