FreeTDS API: src/tds/data.c File Reference

FreeTDS API

Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
data.c File Reference

Handle different data handling from network. More...

`#include <config.h>`
`#include <stdarg.h>`
`#include <stdio.h>`
`#include <assert.h>`
`#include <freetds/utils.h>`
`#include <freetds/tds.h>`
`#include <freetds/bytes.h>`
`#include <freetds/iconv.h>`
`#include <freetds/checks.h>`
`#include <freetds/stream.h>`
`#include <freetds/data.h>`
`#include <freetds/pushvis.h>`
`#include <freetds/popvis.h>`
`#include "tds_types.h"`
Include dependency graph for data.c:

## Classes
struct | tds_varmax_stream

## Macros
#define | TDS_DECLARE_FUNCS(name) extern const TDSCOLUMNFUNCS tds_ ## name ## _funcs
#define | TDS_DONT_DEFINE_DEFAULT_FUNCTIONS
#define | USE_ICONV_IN (tds->conn->use_iconv_in)

## Typedefs
typedef struct tds_varmax_stream | TDSVARMAXSTREAM

## Functions
static TDSRET | tds72_get_varmax (TDSSOCKET *tds, TDSCOLUMN *curcol)
TDSRET | tds_clrudt_get_info (TDSSOCKET *tds, TDSCOLUMN *col)
TDSRET | tds_clrudt_put_info (TDSSOCKET *tds, TDSCOLUMN *col TDS_UNUSED)
TDS_INT | tds_clrudt_row_len (TDSCOLUMN *col)
| TDS_COMPILE_CHECK (tds_variant_offset, TDS_OFFSET(TDSVARIANT, data)==TDS_OFFSET(TDSBLOB, textvalue))
| TDS_COMPILE_CHECK (tds_variant_size, sizeof(((TDSVARIANT *) 0) ->data)==sizeof(((TDSBLOB *) 0) ->textvalue))
| TDS_COMPILE_CHECK (variant_size, sizeof(TDSBLOB) >=sizeof(TDSVARIANT))
| TDS_DECLARE_FUNCS (clrudt)
| TDS_DECLARE_FUNCS (generic)
| TDS_DECLARE_FUNCS (invalid)
| TDS_DECLARE_FUNCS (msdatetime)
| TDS_DECLARE_FUNCS (mstabletype)
| TDS_DECLARE_FUNCS (numeric)
| TDS_DECLARE_FUNCS (sybbigtime)
| TDS_DECLARE_FUNCS (variant)
TDSRET | tds_generic_get (TDSSOCKET *tds, TDSCOLUMN *curcol)
| Read a data from wire.
TDSRET | tds_generic_get_info (TDSSOCKET *tds, TDSCOLUMN *col)
TDSRET | tds_generic_put (TDSSOCKET *tds, TDSCOLUMN *curcol, bool bcp7)
| Write data to wire.
TDSRET | tds_generic_put_info (TDSSOCKET *tds, TDSCOLUMN *col)
| Put data information to wire.
TDS_INT | tds_generic_row_len (TDSCOLUMN *col)
TDS_SERVER_TYPE | tds_get_cardinal_type (TDS_SERVER_TYPE datatype, int usertype)
static TDSRET | tds_get_char_dynamic (TDSSOCKET *tds, TDSCOLUMN *curcol, void **pp, size_t allocated, TDSINSTREAM *r_stream)
static const TDSCOLUMNFUNCS * | tds_get_column_funcs (TDSCONNECTION *conn, int type)
TDSRET | tds_invalid_get (TDSSOCKET *tds TDS_UNUSED, TDSCOLUMN *col TDS_UNUSED)
TDSRET | tds_invalid_get_info (TDSSOCKET *tds TDS_UNUSED, TDSCOLUMN *col TDS_UNUSED)
TDSRET | tds_invalid_put (TDSSOCKET *tds TDS_UNUSED, TDSCOLUMN *col TDS_UNUSED, bool bcp7 TDS_UNUSED)
TDSRET | tds_invalid_put_info (TDSSOCKET *tds TDS_UNUSED, TDSCOLUMN *col TDS_UNUSED)
TDS_INT | tds_invalid_row_len (TDSCOLUMN *col TDS_UNUSED)
TDSRET | tds_msdatetime_get (TDSSOCKET *tds, TDSCOLUMN *col)
TDSRET | tds_msdatetime_get_info (TDSSOCKET *tds, TDSCOLUMN *col)
TDSRET | tds_msdatetime_put (TDSSOCKET *tds, TDSCOLUMN *col, bool bcp7 TDS_UNUSED)
TDSRET | tds_msdatetime_put_info (TDSSOCKET *tds, TDSCOLUMN *col)
TDS_INT | tds_msdatetime_row_len (TDSCOLUMN *col TDS_UNUSED)
TDSRET | tds_mstabletype_get (TDSSOCKET *tds TDS_UNUSED, TDSCOLUMN *col TDS_UNUSED)
TDSRET | tds_mstabletype_get_info (TDSSOCKET *tds TDS_UNUSED, TDSCOLUMN *col TDS_UNUSED)
TDSRET | tds_mstabletype_put (TDSSOCKET *tds, TDSCOLUMN *col, bool bcp7 TDS_UNUSED)
TDSRET | tds_mstabletype_put_info (TDSSOCKET *tds, TDSCOLUMN *col)
TDS_INT | tds_mstabletype_row_len (TDSCOLUMN *col TDS_UNUSED)
TDSRET | tds_numeric_get (TDSSOCKET *tds, TDSCOLUMN *curcol)
TDSRET | tds_numeric_get_info (TDSSOCKET *tds, TDSCOLUMN *col)
TDSRET | tds_numeric_put (TDSSOCKET *tds, TDSCOLUMN *col, bool bcp7 TDS_UNUSED)
TDSRET | tds_numeric_put_info (TDSSOCKET *tds, TDSCOLUMN *col)
TDS_INT | tds_numeric_row_len (TDSCOLUMN *col TDS_UNUSED)
void | tds_set_column_type (TDSCONNECTION *conn, TDSCOLUMN *curcol, TDS_SERVER_TYPE type)
| Set type of column initializing all dependency.
void | tds_set_param_type (TDSCONNECTION *conn, TDSCOLUMN *curcol, TDS_SERVER_TYPE type)
| Set type of column initializing all dependency.
static void | tds_swap_numeric (TDS_NUMERIC *num)
| Converts numeric from Microsoft representation to internal one (Sybase).
TDSRET | tds_sybbigtime_get (TDSSOCKET *tds, TDSCOLUMN *col)
TDSRET | tds_sybbigtime_get_info (TDSSOCKET *tds, TDSCOLUMN *col)
TDSRET | tds_sybbigtime_put (TDSSOCKET *tds, TDSCOLUMN *col, bool bcp7 TDS_UNUSED)
TDSRET | tds_sybbigtime_put_info (TDSSOCKET *tds, TDSCOLUMN *col TDS_UNUSED)
TDS_INT | tds_sybbigtime_row_len (TDSCOLUMN *col TDS_UNUSED)
TDSRET | tds_variant_get (TDSSOCKET *tds, TDSCOLUMN *curcol)
TDSRET | tds_variant_put (TDSSOCKET *tds TDS_UNUSED, TDSCOLUMN *col TDS_UNUSED, bool bcp7 TDS_UNUSED)
TDSRET | tds_variant_put_info (TDSSOCKET *tds TDS_UNUSED, TDSCOLUMN *col TDS_UNUSED)
static int | tds_varmax_stream_read (TDSINSTREAM *stream, void *ptr, size_t len)

## Detailed Description

Handle different data handling from network.

## Function Documentation

## ◆ tds_generic_get()

TDSRET tds_generic_get | ( | TDSSOCKET * | tds,
|  | TDSCOLUMN * | curcol
| ) |  |

Read a data from wire.

Parameters

  tds | state information for the socket and the TDS protocol
  curcol | column where store column information

Returns
  TDS_FAIL on error or TDS_SUCCESS

Here is the call graph for this function:

## ◆ tds_generic_put()

TDSRET tds_generic_put | ( | TDSSOCKET * | tds,
|  | TDSCOLUMN * | curcol,
|  | bool | bcp7
| ) |  |

Write data to wire.

Parameters

  tds | state information for the socket and the TDS protocol
  curcol | column where store column information

Returns
  TDS_FAIL on error or TDS_SUCCESS

Here is the call graph for this function:

## ◆ tds_generic_put_info()

TDSRET tds_generic_put_info | ( | TDSSOCKET * | tds,
|  | TDSCOLUMN * | col
| ) |  |

Put data information to wire.

Parameters

  tds | state information for the socket and the TDS protocol
  col | column where to store information

Returns
  TDS_SUCCESS or TDS_FAIL

Here is the call graph for this function:

## ◆ tds_set_column_type()

void tds_set_column_type | ( | TDSCONNECTION * | conn,
|  | TDSCOLUMN * | curcol,
|  | TDS_SERVER_TYPE | type
| ) |  |

Set type of column initializing all dependency.

column_usertype should already be set.

Parameters

  curcol | column to set
  type | type to set

Here is the caller graph for this function:

## ◆ tds_set_param_type()

void tds_set_param_type | ( | TDSCONNECTION * | conn,
|  | TDSCOLUMN * | curcol,
|  | TDS_SERVER_TYPE | type
| ) |  |

Set type of column initializing all dependency.

Parameters

  tds | state information for the socket and the TDS protocol
  curcol | column to set
  type | type to set

Here is the call graph for this function:

## ◆ tds_swap_numeric()

static void tds_swap_numeric | ( | TDS_NUMERIC * | num | ) |
| static

Converts numeric from Microsoft representation to internal one (Sybase).

Parameters

  num | numeric data to convert

Here is the caller graph for this function: