FreeTDS API
Loading...
Searching...
No Matches
Public Attributes | List of all members
tds_column Struct Reference

Metadata about columns in regular and compute rows. More...

#include <tds.h>

Collaboration diagram for tds_column:
[legend]

Public Attributes

BCPCOLDATAbcp_column_data
 
TDS_INT bcp_prefix_len
 The length, in bytes, of any length prefix this column may have.
 
TDS_INT bcp_term_len
 
TDS_CHAR * bcp_terminator
 
TDSICONVchar_conv
 refers to previously allocated iconv information
 
TDS_SMALLINT column_bindfmt
 
TDS_INT column_bindlen
 
TDS_SMALLINT column_bindtype
 
TDS_UCHAR column_collation [5]
 
uint8_t column_computed:1
 
TDS_INT column_cur_size
 size written in variable (ie: char, text, binary).
 
unsigned char * column_data
 
void(* column_data_free )(struct tds_column *column)
 
TDS_INT column_flags
 
uint8_t column_hidden:1
 
char column_iconv_buf [9]
 
unsigned char column_iconv_left
 
uint8_t column_identity:1
 
uint8_t column_key:1
 
TDS_INT * column_lenbind
 
DSTR column_name
 
uint8_t column_nullable:1
 
TDS_SMALLINT * column_nullbind
 
TDS_SMALLINT column_operand
 
TDS_TINYINT column_operator
 
uint8_t column_output:1
 
TDS_TINYINT column_prec
 precision for decimal/numeric and some datetime types
 
TDS_TINYINT column_scale
 scale for decimal/numeric
 
TDS_INT column_size
 Maximun size of data.
 
TDS_INT column_text_sqlgetdatapos
 
TDS_CHAR column_text_sqlputdatainfo
 
TDS_INT column_textpos
 
uint8_t column_timestamp:1
 
TDS_SERVER_TYPE column_type
 This type can be different from wire type because conversion (e.g.
 
TDS_INT column_usertype
 
TDS_CHAR * column_varaddr
 
TDS_TINYINT column_varint_size
 Size of length when reading from wire (0, 1, 2, 4, 5 or 8).
 
uint8_t column_writeable:1
 
const TDSCOLUMNFUNCSfuncs
 
struct { 
 
   TDS_INT   column_size 
 
   TDS_SERVER_TYPE   column_type 
 type of data, saved from wire
 
on_server 
 
DSTR table_column_name
 
DSTR table_name
 
uint8_t use_iconv_out:1
 

Detailed Description

Metadata about columns in regular and compute rows.

Member Data Documentation

◆ bcp_prefix_len

TDS_INT tds_column::bcp_prefix_len

The length, in bytes, of any length prefix this column may have.

For example, strings in some non-C programming languages are made up of a one-byte length prefix, followed by the string data itself. If the data do not have a length prefix, set prefixlen to 0. Currently not very used in code, however do not remove.

◆ column_cur_size

TDS_INT tds_column::column_cur_size

size written in variable (ie: char, text, binary).

-1 if NULL.

◆ column_size

TDS_INT tds_column::column_size

Maximun size of data.

For fixed types is the size.

◆ column_type

TDS_SERVER_TYPE tds_column::column_type

This type can be different from wire type because conversion (e.g.

type of data, saved from wire

UCS-2->Ascii) can be applied. I'm beginning to wonder about the wisdom of this, however. April 2003 jkl

◆ column_varint_size

TDS_TINYINT tds_column::column_varint_size

Size of length when reading from wire (0, 1, 2, 4, 5 or 8).

0 means fixed type. 1, 2 and 4 means the data stream contains a length exactly these bytes. 5 means old BLOB types having TEXTPTR on them. 5 as they contain 2 lengths, one 4 bytes for data length and another 1 byte for TEXTPTR length. 8 are MSSQL VARBINARY/VARCHAR(MAX) which have a 8 byte length, although data types are still limited to 2GB.


The documentation for this struct was generated from the following file: