20 #ifndef _tdsconvert_h_
21 #define _tdsconvert_h_
23 #include <freetds/pushvis.h>
76 #define TDS_CONVERT_FAIL -1
77 #define TDS_CONVERT_NOAVAIL -2
78 #define TDS_CONVERT_SYNTAX -3
79 #define TDS_CONVERT_NOMEM -4
80 #define TDS_CONVERT_OVERFLOW -5
83 #define TDS_CONVERT_CHAR 256
84 #define TDS_CONVERT_BINARY 257
90 const TDS_CHAR * src,
size_t srclen);
102 #include <freetds/popvis.h>
union conv_result CONV_RESULT
TDS_UINT8 TDS_BIGDATETIME
tds_sysdep_int32_type TDS_INT
tds_sysdep_real64_type TDS_FLOAT
tds_sysdep_int64_type TDS_INT8
tds_sysdep_real32_type TDS_REAL
unsigned char TDS_TINYINT
tds_sysdep_int16_type TDS_SMALLINT
tds_sysdep_uint64_type TDS_UINT8
tds_sysdep_uint16_type TDS_USMALLINT
tds_sysdep_uint32_type TDS_UINT
TDS_SERVER_TYPE tds_get_null_type(TDS_SERVER_TYPE srctype)
Get same type but nullable.
unsigned char tds_willconvert(int srctype, int desttype)
Test if a conversion is possible.
size_t tds_strftime(char *buf, size_t maxsize, const char *format, const TDSDATEREC *timeptr, int prec)
format a date string according to an "extended" strftime(3) formatting definition.
ssize_t tds_char2hex(TDS_CHAR *dest, size_t destlen, const TDS_CHAR *src, size_t srclen)
TDS_INT tds_convert(const TDSCONTEXT *context, int srctype, const TDS_CHAR *src, TDS_UINT srclen, int desttype, CONV_RESULT *cr)
tds_convert convert a type to another.
this structure is not directed connected to a TDS protocol but keeps any DATE/TIME information.
struct conv_result::cb_t cb
struct conv_result::cc_t cc
TDS_BIGDATETIME bigdatetime
static CS_CONTEXT * context