NCBI C++ ToolKit
|
#include <freetds/tds.h>
#include <freetds/convert.h>
#include <freetds/string.h>
#include <freetds/pushvis.h>
#include <freetds/popvis.h>
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
struct | _cs_config |
struct | cs_diag_msg_client |
struct | cs_diag_msg_svr |
struct | cs_diag_msg |
struct | _cs_context |
struct | _ct_colinfo |
struct | _cs_connection |
struct | _cs_param |
struct | _csremote_proc |
struct | _cs_dynamic |
struct | _cs_command |
struct | _cs_blkdesc |
struct | _cs_locale |
Macros | |
#define | CS_DYNAMIC_CMD 160 |
#define | CS_CUR_CMD 161 |
#define | _CS_RES_NONE -1 |
#define | _CS_RES_INIT 0 |
#define | _CS_RES_RESULTSET_EMPTY 1 |
#define | _CS_RES_RESULTSET_ROWS 2 |
#define | _CS_RES_STATUS 3 |
#define | _CS_RES_CMD_DONE 4 |
#define | _CS_RES_CMD_SUCCEED 5 |
#define | _CS_RES_END_RESULTS 6 |
#define | _CS_RES_DESCRIBE_RESULT 7 |
#define | _CS_COMMAND_IDLE 0 |
#define | _CS_COMMAND_BUILDING 1 |
#define | _CS_COMMAND_READY 2 |
#define | _CS_COMMAND_SENT 3 |
#define | _CS_CANCEL_NOCANCEL 0 |
#define | _CS_CANCEL_PENDING 1 |
#define | _CS_ERRHAND_INLINE 1 |
#define | _CS_ERRHAND_CB 2 |
#define | _CS_CURS_TYPE_UNACTIONED TDS_CURSOR_STATE_UNACTIONED |
#define | _CS_CURS_TYPE_REQUESTED TDS_CURSOR_STATE_REQUESTED |
#define | _CS_CURS_TYPE_SENT TDS_CURSOR_STATE_SENT |
Typedefs | |
typedef struct _cs_dynamic | CS_DYNAMIC |
typedef struct _cs_param | CS_PARAM |
typedef struct _csremote_proc | CS_REMOTE_PROC |
typedef struct _ct_colinfo | CT_COLINFO |
typedef CS_PARAM | CSREMOTE_PROC_PARAM |
typedef struct _csremote_proc | CSREMOTE_PROC |
typedef CS_PARAM | CS_DYNAMIC_PARAM |
#define _CS_CURS_TYPE_REQUESTED TDS_CURSOR_STATE_REQUESTED |
#define _CS_CURS_TYPE_SENT TDS_CURSOR_STATE_SENT |
#define _CS_CURS_TYPE_UNACTIONED TDS_CURSOR_STATE_UNACTIONED |
typedef struct _cs_dynamic CS_DYNAMIC |
typedef CS_PARAM CS_DYNAMIC_PARAM |
typedef struct _csremote_proc CS_REMOTE_PROC |
typedef struct _csremote_proc CSREMOTE_PROC |
typedef CS_PARAM CSREMOTE_PROC_PARAM |
typedef struct _ct_colinfo CT_COLINFO |
CS_RETCODE _cs_convert_ex | ( | CS_CONTEXT * | ctx, |
CS_DATAFMT * | srcfmt, | ||
CS_VOID * | srcdata, | ||
CS_DATAFMT * | destfmt, | ||
CS_VOID * | destdata, | ||
CS_INT * | resultlen, | ||
TDS_SERVER_TYPE | desttype, | ||
CS_VOID ** | handle | ||
) |
Definition at line 501 of file cs.c.
References _csclient_msg(), _ct_get_server_type(), assert, conv_result::c, CS_FAIL, CS_FMT_NULLTERM, CS_FMT_PADBLANK, CS_FMT_PADNULL, CS_FMT_UNUSED, CS_NVARCHAR_TYPE, cs_prretcode(), CS_SRC_VALUE, CS_SUCCEED, CS_VARBINARY_TYPE, CS_VARCHAR_TYPE, ctx, _cs_datafmt::datatype, conv_result::dta, dummy, _cs_datafmt::format, free(), i, conv_result::ib, is_fixed_type, is_numeric_type, _cs_varchar::len, len, _cs_datafmt::maxlength, conv_result::n, NULL, _cs_datafmt::precision, tdsnumeric::precision, _cs_datafmt::scale, tdsnumeric::scale, _cs_varchar::str, SYB5BIGDATETIME, SYB5BIGTIME, SYBBINARY, SYBBIT, SYBBITN, SYBCHAR, SYBDATE, SYBDATETIME, SYBDATETIME4, SYBDECIMAL, SYBFLT8, SYBIMAGE, SYBINT1, SYBINT2, SYBINT4, SYBINT8, SYBLONGBINARY, SYBMONEY, SYBMONEY4, SYBMSDATE, SYBMSDATETIME2, SYBMSDATETIMEOFFSET, SYBMSTIME, SYBNTEXT, SYBNUMERIC, SYBNVARCHAR, SYBREAL, SYBTEXT, SYBTIME, SYBUINT1, SYBUINT2, SYBUINT4, SYBUINT8, SYBUNIQUE, SYBVARBINARY, SYBVARCHAR, tds_convert, TDS_CONVERT_FAIL, TDS_CONVERT_NOAVAIL, TDS_CONVERT_NOMEM, TDS_CONVERT_OVERFLOW, TDS_CONVERT_SYNTAX, _cs_context::tds_ctx, TDS_DBG_FUNC, tds_get_size_by_type, TDS_INVALID_TYPE, tds_numeric_bytes_per_prec, tdsdump_log, and conv_result::ti.
Referenced by _blk_get_col_data(), and cs_convert().
int _cs_convert_not_client | ( | CS_CONTEXT * | ctx, |
TDSCOLUMN * | curcol, | ||
CONV_RESULT * | convert_buffer, | ||
unsigned char ** | p_src | ||
) |
Try to convert to a type we can handle.
Definition at line 1508 of file cs.c.
References tds_column::column_cur_size, tds_column::column_type, CS_BIGDATETIME_TYPE, CS_BIGTIME_TYPE, CS_DATE_TYPE, CS_ILLEGAL_TYPE, ctx, len, SYB5BIGDATETIME, SYB5BIGTIME, SYBDATE, SYBMSDATE, SYBMSDATETIME2, SYBMSDATETIMEOFFSET, SYBMSTIME, tds_convert, and _cs_context::tds_ctx.
Referenced by _blk_get_col_data(), _ct_bind_data(), and _ct_get_client_type().
Definition at line 300 of file cs.c.
Referenced by ct_con_props().
Definition at line 262 of file cs.c.
Referenced by ct_con_props().
void _cs_locale_free | ( | CS_LOCALE * | locale | ) |
Definition at line 249 of file cs.c.
Referenced by ct_con_drop(), and ct_con_props().
void _csclient_msg | ( | CS_CONTEXT * | ctx, |
const char * | funcname, | ||
int | layer, | ||
int | origin, | ||
int | severity, | ||
int | number, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 188 of file cs.c.
Referenced by _ct_get_client_type(), ct_callback(), ct_compute_info(), ct_describe(), ct_res_info(), and paraminfoalloc().
int _ct_bind_data | ( | CS_CONTEXT * | ctx, |
TDSRESULTINFO * | resinfo, | ||
TDSRESULTINFO * | bindinfo, | ||
CS_INT | offset | ||
) |
Definition at line 1794 of file ct.c.
Referenced by _blk_rowxfer_out(), and test_type().
CS_INT _ct_diag_clearmsg | ( | CS_CONTEXT * | context, |
CS_INT | type | ||
) |
Definition at line 4805 of file ct.c.
Referenced by cs_ctx_drop().
int _ct_get_client_type | ( | CS_CONTEXT * | ctx, |
TDSCOLUMN * | col | ||
) |
Definition at line 1964 of file ct.c.
References _cs_convert_not_client(), _csclient_msg(), tds_column::column_cur_size, tds_column::column_data, tds_column::column_size, tds_column::column_type, tds_column::column_usertype, CS_BIGDATETIME_TYPE, CS_BIGINT_TYPE, CS_BIGTIME_TYPE, CS_BINARY_TYPE, CS_BIT_TYPE, CS_CHAR_TYPE, CS_DATE_TYPE, CS_DATETIME4_TYPE, CS_DATETIME_TYPE, CS_DECIMAL_TYPE, CS_FLOAT_TYPE, CS_IMAGE_TYPE, CS_INT_TYPE, CS_LONGBINARY_TYPE, CS_MONEY4_TYPE, CS_MONEY_TYPE, CS_NUMERIC_TYPE, CS_REAL_TYPE, CS_SMALLINT_TYPE, CS_TEXT_TYPE, CS_TIME_TYPE, CS_TINYINT_TYPE, CS_UBIGINT_TYPE, CS_UINT_TYPE, CS_UNICHAR_TYPE, CS_UNIQUE_TYPE, CS_USMALLINT_TYPE, ctx, NULL, SYB5BIGDATETIME, SYB5BIGTIME, SYBBINARY, SYBBIT, SYBBITN, SYBCHAR, SYBDATE, SYBDATETIME, SYBDATETIME4, SYBDATETIMN, SYBDECIMAL, SYBFLT8, SYBFLTN, SYBIMAGE, SYBINT1, SYBINT2, SYBINT4, SYBINT8, SYBINTN, SYBLONGBINARY, SYBMONEY, SYBMONEY4, SYBMONEYN, SYBNUMERIC, SYBREAL, SYBTEXT, SYBTIME, SYBUINT1, SYBUINT2, SYBUINT4, SYBUINT8, SYBUINTN, SYBUNIQUE, SYBVARBINARY, SYBVARCHAR, SYBVARIANT, TDS_DBG_FUNC, tdsdump_log, USER_UNICHAR_TYPE, and USER_UNIVARCHAR_TYPE.
Referenced by _blk_get_col_data(), _ct_bind_data(), blk_describe(), ct_data_info(), ct_describe(), and test_type().
TDS_SERVER_TYPE _ct_get_server_type | ( | TDSSOCKET * | tds, |
int | datatype | ||
) |
Definition at line 2128 of file ct.c.
Referenced by _blk_get_col_data(), _cs_convert(), _cs_convert_ex(), and cs_will_convert().
int _ct_handle_client_message | ( | const TDSCONTEXT * | ctxptr, |
TDSSOCKET * | tdsptr, | ||
TDSMESSAGE * | msgptr | ||
) |
TDSRET _ct_handle_server_message | ( | const TDSCONTEXT * | ctxptr, |
TDSSOCKET * | tdsptr, | ||
TDSMESSAGE * | msgptr | ||
) |
void _ctclient_msg | ( | CS_CONNECTION * | con, |
const char * | funcname, | ||
int | layer, | ||
int | origin, | ||
int | severity, | ||
int | number, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 188 of file ct.c.
Referenced by _blk_get_col_data(), _blk_null_error(), _blk_rowxfer_in(), _blk_rowxfer_out(), blk_bind(), blk_describe(), blk_done(), blk_init(), and blk_props().