36 #include <freetds/tds.h>
37 #include <freetds/convert.h>
39 #include <freetds/checks.h>
41 #if ENABLE_EXTRA_CHECKS
43 tds_check_packet_extra(
const TDSPACKET * packet)
46 for (; packet; packet = packet->
next) {
55 const int invalid_state = 0;
160 assert(
env->block_size >= 0 &&
env->block_size <= 65536);
169 int column_varint_size;
172 column_varint_size =
column->column_varint_size;
175 assert(column_varint_size == 8 ||
176 (column_varint_size < 5 && column_varint_size != 3));
182 if (
column->column_type == 0)
192 #define SPECIAL(ttype, server_type, varint) \
193 if (column->column_type == ttype && column->on_server.column_type == server_type && column_varint_size == varint) {} else
202 if (column_varint_size == 8) {
208 assert(column_varint_size >= 4);
210 assert(column_varint_size == 4);
212 conn.tds_version = 0x500;
214 conn.tds_version = 0x700;
241 assert(column_varint_size == 1);
244 assert(column_varint_size == 0
253 assert(column_varint_size != 0);
static CS_CONNECTION * conn
#define TDS_IS_SOCKET_INVALID(s)
#define TDS_ADDITIONAL_SPACE
#define is_numeric_type(x)
@ TDS_PENDING
cilent is waiting for data
@ TDS_SENDING
client would send data
@ TDS_READING
client is reading data
@ TDS_WRITING
client is writing data
@ TDS_IDLE
no data expected
#define is_nullable_type(x)
tds_sysdep_uint32_type TDS_UINT
static const char * column
#define tds_check_resultinfo_extra
#define tds_get_cardinal_type
#define tds_check_env_extra
#define tds_get_size_by_type
#define tds_check_cursor_extra
#define tds_check_tds_extra
#define tds_check_column_extra
#define tds_get_conversion_type
#define tds_get_varint_size
#define tds_check_dynamic_extra
#define tds_check_context_extra
if(yy_accept[yy_current_state])
const struct ncbi::grid::netcache::search::fields::SIZE size
Metadata about columns in regular and compute rows.
unsigned char * column_data
TDSENV env
environment is shared between all sessions
TDSCURSOR * cursors
linked list of cursors allocated for this connection contains only cursors allocated on the server
TDSDYNAMIC * dyns
list of dynamic allocated for this connection contains only dynamic allocated on the server
Holds informations about a cursor.
TDS_INT ref_count
reference counter so client can retain safely a pointer
struct tds_cursor * next
next in linked list, keep first
Holds information for a dynamic (also called prepared) query.
struct tds_dynamic * next
next in linked list, keep first
TDS_INT ref_count
reference counter so client can retain safely a pointer
char * query
saved query, we need to know original query if prepare is impossible
TDSPARAMINFO * params
query parameters.
TDSPARAMINFO * res_info
query results
TDS_TINYINT emulated
this dynamic query cannot be prepared so libTDS have to construct a simple query.
Current environment as reported by the server.
Hold information for any results.
Information for a server connection.
unsigned in_len
input buffer length
TDSCOMPUTEINFO ** comp_info
unsigned out_pos
current position in out_buf
unsigned char * out_buf
Output buffer.
TDSPACKET * send_packet
packet we are preparing to send
unsigned char * in_buf
Input buffer.
unsigned in_pos
current position in in_buf
unsigned int out_buf_max
Maximum size of packet pointed by out_buf.
TDSPARAMINFO * param_info