|
static TDS_INT | binary_to_result (int desttype, const void *data, size_t len, CONV_RESULT *cr) |
| Copy binary data to to result and return len or TDS_CONVERT_NOMEM.
|
|
static bool | is_alphabetic (const char *) |
|
static bool | is_ampm (const char *) |
|
static bool | is_dd_mon_yyyy (char *t) |
|
static bool | is_numeric (const char *) |
|
static bool | is_numeric_dateformat (const char *) |
|
static bool | is_timeformat (const char *) |
|
static TDS_INT | parse_int8 (const char *buf, const char *pend, TDS_UINT8 *res, bool *p_negative) |
| convert a number in string to TDS_INT8
|
|
static const char * | parse_numeric (const char *buf, const char *pend, bool *p_negative, size_t *p_digits, size_t *p_decimals) |
| Parse a string for numbers.
|
|
static int | store_dd_mon_yyy_date (char *datestr, struct tds_time *t) |
|
static int | store_hour (const char *, const char *, struct tds_time *) |
|
static int | store_mday (const char *, struct tds_time *) |
|
static int | store_monthname (const char *datestr, struct tds_time *t) |
| Test if a string is a month name and store correct month number.
|
|
static int | store_numeric_date (const char *, struct tds_time *) |
|
static int | store_time (const char *, struct tds_time *) |
|
static int | store_year (int, struct tds_time *) |
|
static int | store_yymmdd_date (const char *, struct tds_time *) |
|
static int | string_to_datetime (const char *datestr, TDS_UINT len, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | string_to_float (const TDS_CHAR *src, TDS_UINT srclen, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | string_to_int (const char *buf, const char *pend, TDS_INT *res) |
| convert a number in string to TDS_INT
|
|
static TDS_INT | string_to_int8 (const char *buf, const char *pend, TDS_INT8 *res) |
| convert a number in string to TDS_INT8
|
|
static int | string_to_numeric (const char *instr, const char *pend, CONV_RESULT *cr) |
| convert a number in string to a TDSNUMERIC
|
|
static TDS_INT | string_to_result (int desttype, const char *s, CONV_RESULT *cr) |
| Copy a terminated string to result and return len or TDS_CONVERT_NOMEM.
|
|
static TDS_INT | string_to_uint8 (const char *buf, const char *pend, TDS_UINT8 *res) |
| convert a number in string to TDS_UINT8
|
|
static int | stringz_to_numeric (const char *instr, CONV_RESULT *cr) |
| convert a zero terminated string to NUMERIC
|
|
TDS_INT | tds_char2hex (TDS_CHAR *dest, TDS_UINT destlen, const TDS_CHAR *src, TDS_UINT srclen) |
|
TDS_INT | tds_convert (const TDSCONTEXT *tds_ctx, int srctype, const void *src, TDS_UINT srclen, int desttype, CONV_RESULT *cr) |
| tds_convert convert a type to another.
|
|
static TDS_INT | tds_convert_bigdatetime (const TDSCONTEXT *tds_ctx, const TDS_BIGDATETIME *bigdatetime, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_bigtime (const TDSCONTEXT *tds_ctx, const TDS_BIGTIME *bigtime, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_binary (const TDS_UCHAR *src, TDS_INT srclen, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_bit (const TDS_CHAR *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_char (const TDS_CHAR *src, TDS_UINT srclen, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_date (const TDSCONTEXT *tds_ctx, const TDS_DATE *date, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_datetime (const TDSCONTEXT *tds_ctx, const TDS_DATETIME *dt, int desttype, unsigned precision, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_datetime4 (const TDSCONTEXT *tds_ctx, const TDS_DATETIME4 *dt4, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_datetimeall (const TDSCONTEXT *tds_ctx, int srctype, const TDS_DATETIMEALL *dta, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_flt8 (const TDS_FLOAT *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_int (TDS_INT num, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_int1 (const int8_t *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_int2 (const TDS_SMALLINT *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_int4 (const TDS_INT *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_int8 (const TDS_INT8 *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_int8_numeric (unsigned char scale, unsigned char sign, TDS_UINT8 num, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_int_numeric (unsigned char scale, unsigned char sign, TDS_UINT num, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_money (const TDSCONTEXT *tds_ctx, const TDS_MONEY *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_money4 (const TDSCONTEXT *tds_ctx, const TDS_MONEY4 *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_numeric (const TDS_NUMERIC *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_real (const TDS_REAL *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_time (const TDSCONTEXT *tds_ctx, const TDS_TIME *time, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_to_binary (int srctype, const TDS_CHAR *src, TDS_UINT srclen, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_uint1 (const TDS_TINYINT *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_uint2 (const TDS_USMALLINT *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_uint4 (const TDS_UINT *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_uint8 (const TDS_UINT8 *src, int desttype, CONV_RESULT *cr) |
|
static TDS_INT | tds_convert_unique (const TDS_CHAR *src, int desttype, CONV_RESULT *cr) |
|
TDSRET | tds_datecrack (TDS_INT datetype, const void *di, TDSDATEREC *dr) |
| Convert from db date format to a structured date format.
|
|
TDS_SERVER_TYPE | tds_get_null_type (TDS_SERVER_TYPE srctype) |
| Get same type but nullable.
|
|
size_t | tds_strftime (char *buf, size_t maxsize, const char *format, const TDSDATEREC *dr, int prec) |
| format a date string according to an "extended" strftime(3) formatting definition.
|
|
unsigned char | tds_willconvert (int srctype, int desttype) |
| Test if a conversion is possible.
|
|
static void | two_digit (char *out, int num) |
|
Conversions between datatypes.