FreeTDS API

Loading...
Searching...
No Matches
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 _tdsguard_gGNZG1PGQbnTbRweOYXD8U_
21#define _tdsguard_gGNZG1PGQbnTbRweOYXD8U_
22
23#ifndef _tdsguard_hfOrWb5znoUCWdBPoNQvqN_
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, \
35 tds_ ## name ## _put, \
36 TDS_EXTRA_CHECK(tds_ ## name ## _check) \
37}
38
39tds_func_get_info tds_invalid_get_info;
40tds_func_row_len tds_invalid_row_len;
41tds_func_get_data tds_invalid_get;
42tds_func_put_info tds_invalid_put_info;
43tds_func_put_data tds_invalid_put;
44tds_func_check tds_invalid_check;
45
46tds_func_get_info tds_generic_get_info;
47tds_func_row_len tds_generic_row_len;
48tds_func_get_data tds_generic_get;
49tds_func_put_info tds_generic_put_info;
50tds_func_put_data tds_generic_put;
51tds_func_check tds_generic_check;
52
53tds_func_get_info tds_numeric_get_info;
54tds_func_row_len tds_numeric_row_len;
55tds_func_get_data tds_numeric_get;
56tds_func_put_info tds_numeric_put_info;
57tds_func_put_data tds_numeric_put;
58tds_func_check tds_numeric_check;
59
60#define tds_variant_get_info tds_generic_get_info
61#define tds_variant_row_len tds_generic_row_len
62tds_func_get_data tds_variant_get;
63tds_func_put_info tds_variant_put_info;
64tds_func_put_data tds_variant_put;
65tds_func_check tds_variant_check;
66
67tds_func_get_info tds_msdatetime_get_info;
68tds_func_row_len tds_msdatetime_row_len;
69tds_func_get_data tds_msdatetime_get;
70tds_func_put_info tds_msdatetime_put_info;
71tds_func_put_data tds_msdatetime_put;
72tds_func_check tds_msdatetime_check;
73
74tds_func_get_info tds_clrudt_get_info;
75tds_func_row_len tds_clrudt_row_len;
76#define tds_clrudt_get tds_generic_get
77tds_func_put_info tds_clrudt_put_info;
78#define tds_clrudt_put tds_generic_put
79tds_func_check tds_clrudt_check;
80
81tds_func_get_info tds_sybbigtime_get_info;
82tds_func_row_len tds_sybbigtime_row_len;
83tds_func_get_data tds_sybbigtime_get;
84tds_func_put_info tds_sybbigtime_put_info;
85tds_func_put_data tds_sybbigtime_put;
86tds_func_check tds_sybbigtime_check;
87
88tds_func_get_info tds_mstabletype_get_info;
89tds_func_row_len tds_mstabletype_row_len;
90tds_func_get_data tds_mstabletype_get;
91tds_func_put_info tds_mstabletype_put_info;
92tds_func_put_data tds_mstabletype_put;
93tds_func_check tds_mstabletype_check;
94
99#ifndef TDS_DONT_DEFINE_DEFAULT_FUNCTIONS
100# define TDS_DEFINE_DEFAULT_FUNCS(name) \
101 const TDSCOLUMNFUNCS tds_ ## name ## _funcs = TDS_COMMON_FUNCS(name)
102
103TDS_DEFINE_DEFAULT_FUNCS(invalid);
104TDS_DEFINE_DEFAULT_FUNCS(generic);
105TDS_DEFINE_DEFAULT_FUNCS(numeric);
106TDS_DEFINE_DEFAULT_FUNCS(variant);
107TDS_DEFINE_DEFAULT_FUNCS(msdatetime);
108TDS_DEFINE_DEFAULT_FUNCS(clrudt);
109TDS_DEFINE_DEFAULT_FUNCS(sybbigtime);
110TDS_DEFINE_DEFAULT_FUNCS(mstabletype);
111#endif
112
113#include <freetds/popvis.h>
114
115#endif