Defines | |
#define | CASE_ALL_CHAR SYBCHAR: case SYBVARCHAR: case SYBTEXT: case XSYBCHAR: case XSYBVARCHAR |
#define | CASE_ALL_BINARY SYBBINARY: case SYBVARBINARY: case SYBIMAGE: case XSYBBINARY: case XSYBVARBINARY |
Functions | |
int | tds_get_conversion_type (int srctype, int colsize) |
Return type suitable for conversions (convert all nullable types to fixed type). | |
TDS_INT | tds_convert (TDSCONTEXT *tds_ctx, int srctype, const TDS_CHAR *src, TDS_UINT srclen, int desttype, CONV_RESULT *cr) |
tds_convert convert a type to another. | |
TDS_INT | tds_get_null_type (int srctype) |
Get same type but nullable. | |
size_t | tds_strftime (char *buf, size_t maxsize, const char *format, const TDSDATEREC *dr) |
format a date string according to an "extended" strftime formatting definition. | |
unsigned char | tds_willconvert (int srctype, int desttype) |
Test if a conversion is possible. | |
TDS_INT | tds_datecrack (TDS_INT datetype, const void *di, TDSDATEREC *dr) |
Convert from db date format to a structured date format. | |
Variables | |
const char | tds_hex_digits [16] = "0123456789abcdef" |
|
tds_convert convert a type to another. If you convert to SYBDECIMAL/SYBNUMERIC you MUST initialize precision and scale of cr. Do not expect string to be zero terminated. Databases support zero inside string. Doing strlen on result may result on data loss or even core. Use memcpy to copy destination using length returned. This function do not handle NULL, srclen should be >0, if not undefinited behaviour...
|
|
Convert from db date format to a structured date format.
|
|
Return type suitable for conversions (convert all nullable types to fixed type).
|
|
Get same type but nullable.
|
|
format a date string according to an "extended" strftime formatting definition.
|
|
Test if a conversion is possible.
|