FreeTDS API

data.h
1 /* FreeTDS - Library of routines accessing Sybase and Microsoft databases
2 * Copyright (C) 2014 Frediano Ziglio
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 */
19
20 #ifndef _freetds_data_h_
21 #define _freetds_data_h_
22
23 #ifndef _tds_h_
24 # error Include tds.h before data.h
25 #endif
26
27 #include <freetds/pushvis.h>
28
29 #define TDS_COMMON_FUNCS(name) \
30 { \
31 tds_ ## name ## _get_info, \
32 tds_ ## name ## _get, \
33 tds_ ## name ## _row_len, \
34 tds_ ## name ## _put_info_len, \
35 tds_ ## name ## _put_info, \
36 tds_ ## name ## _put, \
37 TDS_EXTRA_CHECK(tds_ ## name ## _check) \
38 }
39
40 tds_func_get_info tds_invalid_get_info;
41 tds_func_row_len tds_invalid_row_len;
42 tds_func_get_data tds_invalid_get;
43 tds_func_put_info_len tds_invalid_put_info_len;
44 tds_func_put_info tds_invalid_put_info;
45 tds_func_put_data tds_invalid_put;
46 tds_func_check tds_invalid_check;
47
48 tds_func_get_info tds_generic_get_info;
49 tds_func_row_len tds_generic_row_len;
50 tds_func_get_data tds_generic_get;
51 tds_func_put_info_len tds_generic_put_info_len;
52 tds_func_put_info tds_generic_put_info;
53 tds_func_put_data tds_generic_put;
54 tds_func_check tds_generic_check;
55
56 tds_func_get_info tds_numeric_get_info;
57 tds_func_row_len tds_numeric_row_len;
58 tds_func_get_data tds_numeric_get;
59 tds_func_put_info_len tds_numeric_put_info_len;
60 tds_func_put_info tds_numeric_put_info;
61 tds_func_put_data tds_numeric_put;
62 tds_func_check tds_numeric_check;
63
64 #define tds_variant_get_info tds_generic_get_info
65 #define tds_variant_row_len tds_generic_row_len
66 tds_func_get_data tds_variant_get;
67 #define tds_variant_put_info_len tds_generic_put_info_len
68 tds_func_put_info tds_variant_put_info;
69 tds_func_put_data tds_variant_put;
70 tds_func_check tds_variant_check;
71
72 tds_func_get_info tds_msdatetime_get_info;
73 tds_func_row_len tds_msdatetime_row_len;
74 tds_func_get_data tds_msdatetime_get;
75 #define tds_msdatetime_put_info_len tds_generic_put_info_len
76 tds_func_put_info tds_msdatetime_put_info;
77 tds_func_put_data tds_msdatetime_put;
78 tds_func_check tds_msdatetime_check;
79
80 tds_func_get_info tds_clrudt_get_info;
81 tds_func_row_len tds_clrudt_row_len;
82 #define tds_clrudt_get tds_generic_get
83 #define tds_clrudt_put_info_len tds_generic_put_info_len
84 tds_func_put_info tds_clrudt_put_info;
85 #define tds_clrudt_put tds_generic_put
86 tds_func_check tds_clrudt_check;
87
88 tds_func_get_info tds_sybbigtime_get_info;
89 tds_func_row_len tds_sybbigtime_row_len;
90 tds_func_get_data tds_sybbigtime_get;
91 tds_func_put_info_len tds_sybbigtime_put_info_len;
92 tds_func_put_info tds_sybbigtime_put_info;
93 tds_func_put_data tds_sybbigtime_put;
94 tds_func_check tds_sybbigtime_check;
95
100 #ifndef TDS_DONT_DEFINE_DEFAULT_FUNCTIONS
101 # define TDS_DEFINE_DEFAULT_FUNCS(name) \
102 const TDSCOLUMNFUNCS tds_ ## name ## _funcs = TDS_COMMON_FUNCS(name)
103
104 TDS_DEFINE_DEFAULT_FUNCS(invalid);
105 TDS_DEFINE_DEFAULT_FUNCS(generic);
106 TDS_DEFINE_DEFAULT_FUNCS(numeric);
107 TDS_DEFINE_DEFAULT_FUNCS(variant);
108 TDS_DEFINE_DEFAULT_FUNCS(msdatetime);
109 TDS_DEFINE_DEFAULT_FUNCS(clrudt);
110 TDS_DEFINE_DEFAULT_FUNCS(sybbigtime);
111 #endif
112
113 #include <freetds/popvis.h>
114
115 #endif
tds_generic_put_info
TDSRET tds_generic_put_info(TDSSOCKET *tds, TDSCOLUMN *col)
Put data information to wire.
Definition: data.c:860
tds_generic_get
TDSRET tds_generic_get(TDSSOCKET *tds, TDSCOLUMN *curcol)
Read a data from wire.
Definition: data.c:696
tds_generic_put
TDSRET tds_generic_put(TDSSOCKET *tds, TDSCOLUMN *curcol, int bcp7)
Write data to wire.
Definition: data.c:933