NCBI C++ ToolKit
Macros | Functions
blk.c File Reference
#include <config.h>
#include <stdarg.h>
#include <stdio.h>
#include <freetds/utils.h>
#include <freetds/replacements.h>
#include "bkpublic.h"
#include "ctpublic.h"
#include "ctlib.h"
+ Include dependency graph for blk.c:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define CONN(bulk)   ((CS_CONNECTION *) (bulk)->bcpinfo.parent)
 

Functions

static void _blk_null_error (TDSBCPINFO *bcpinfo, int index, int offset)
 
static TDSRET _blk_get_col_data (TDSBCPINFO *bulk, TDSCOLUMN *bcpcol, int offset)
 
static CS_RETCODE _blk_rowxfer_in (CS_BLKDESC *blkdesc, CS_INT rows_to_xfer, CS_INT *rows_xferred)
 
static CS_RETCODE _blk_rowxfer_out (CS_BLKDESC *blkdesc, CS_INT rows_to_xfer, CS_INT *rows_xferred)
 
static void _blk_clean_desc (CS_BLKDESC *blkdesc)
 
 TDS_COMPILE_CHECK (same_size, sizeof(CS_BLKDESC)==sizeof(TDSBCPINFO))
 
 TDS_COMPILE_CHECK (nested_type, TDS_OFFSET(CS_BLKDESC, bcpinfo)==0)
 
CS_RETCODE blk_alloc (CS_CONNECTION *connection, CS_INT version, CS_BLKDESC **blk_pointer)
 
CS_RETCODE blk_bind (CS_BLKDESC *blkdesc, CS_INT item, CS_DATAFMT *datafmt_arg, CS_VOID *buffer, CS_INT *datalen, CS_SMALLINT *indicator)
 
CS_RETCODE blk_colval (SRV_PROC *srvproc, CS_BLKDESC *blkdescp, CS_BLK_ROW *rowp, CS_INT colnum, CS_VOID *valuep, CS_INT valuelen, CS_INT *outlenp)
 
CS_RETCODE blk_default (CS_BLKDESC *blkdesc, CS_INT colnum, CS_VOID *buffer, CS_INT buflen, CS_INT *outlen)
 
CS_RETCODE blk_describe (CS_BLKDESC *blkdesc, CS_INT item, CS_DATAFMT *datafmt_arg)
 
CS_RETCODE blk_done (CS_BLKDESC *blkdesc, CS_INT type, CS_INT *outrow)
 
CS_RETCODE blk_drop (CS_BLKDESC *blkdesc)
 
CS_RETCODE blk_getrow (SRV_PROC *srvproc, CS_BLKDESC *blkdescp, CS_BLK_ROW *rowp)
 
CS_RETCODE blk_gettext (SRV_PROC *srvproc, CS_BLKDESC *blkdescp, CS_BLK_ROW *rowp, CS_INT bufsize, CS_INT *outlenp)
 
CS_RETCODE blk_init (CS_BLKDESC *blkdesc, CS_INT direction, CS_CHAR *tablename, CS_INT tnamelen)
 
CS_RETCODE blk_props (CS_BLKDESC *blkdesc, CS_INT action, CS_INT property, CS_VOID *buffer, CS_INT buflen, CS_INT *outlen)
 
CS_RETCODE blk_rowalloc (SRV_PROC *srvproc, CS_BLK_ROW **row)
 
CS_RETCODE blk_rowdrop (SRV_PROC *srvproc, CS_BLK_ROW *row)
 
CS_RETCODE blk_rowxfer (CS_BLKDESC *blkdesc)
 
CS_RETCODE blk_rowxfer_mult (CS_BLKDESC *blkdesc, CS_INT *row_count)
 
CS_RETCODE blk_sendrow (CS_BLKDESC *blkdesc, CS_BLK_ROW *row)
 
CS_RETCODE blk_sendtext (CS_BLKDESC *blkdesc, CS_BLK_ROW *row, CS_BYTE *buffer, CS_INT buflen)
 
CS_RETCODE blk_sethints (CS_BLKDESC *blkdesc, CS_CHAR *hints, CS_INT hintslen)
 
CS_RETCODE blk_srvinit (SRV_PROC *srvproc, CS_BLKDESC *blkdescp)
 
CS_RETCODE blk_textxfer (CS_BLKDESC *blkdesc, CS_BYTE *buffer, CS_INT buflen, CS_INT *outlen)
 

Macro Definition Documentation

◆ CONN

#define CONN (   bulk)    ((CS_CONNECTION *) (bulk)->bcpinfo.parent)

Definition at line 47 of file blk.c.

Function Documentation

◆ _blk_clean_desc()

static void _blk_clean_desc ( CS_BLKDESC blkdesc)
static

◆ _blk_get_col_data()

static TDSRET _blk_get_col_data ( TDSBCPINFO bulk,
TDSCOLUMN bcpcol,
int  offset 
)
static

◆ _blk_null_error()

static void _blk_null_error ( TDSBCPINFO bcpinfo,
int  index,
int  offset 
)
static

Definition at line 701 of file blk.c.

References _ctclient_msg(), CONN, offset, TDS_DBG_FUNC, and tdsdump_log.

Referenced by _blk_rowxfer_in(), and blk_textxfer().

◆ _blk_rowxfer_in()

static CS_RETCODE _blk_rowxfer_in ( CS_BLKDESC blkdesc,
CS_INT  rows_to_xfer,
CS_INT rows_xferred 
)
static

◆ _blk_rowxfer_out()

static CS_RETCODE _blk_rowxfer_out ( CS_BLKDESC blkdesc,
CS_INT  rows_to_xfer,
CS_INT rows_xferred 
)
static

◆ blk_alloc()

CS_RETCODE blk_alloc ( CS_CONNECTION connection,
CS_INT  version,
CS_BLKDESC **  blk_pointer 
)

◆ blk_bind()

CS_RETCODE blk_bind ( CS_BLKDESC blkdesc,
CS_INT  item,
CS_DATAFMT datafmt_arg,
CS_VOID buffer,
CS_INT datalen,
CS_SMALLINT indicator 
)

◆ blk_colval()

CS_RETCODE blk_colval ( SRV_PROC srvproc,
CS_BLKDESC blkdescp,
CS_BLK_ROW rowp,
CS_INT  colnum,
CS_VOID valuep,
CS_INT  valuelen,
CS_INT outlenp 
)

Definition at line 174 of file blk.c.

References CS_FAIL, TDS_DBG_FUNC, and tdsdump_log.

◆ blk_default()

CS_RETCODE blk_default ( CS_BLKDESC blkdesc,
CS_INT  colnum,
CS_VOID buffer,
CS_INT  buflen,
CS_INT outlen 
)

Definition at line 186 of file blk.c.

References buffer, CS_FAIL, TDS_DBG_FUNC, and tdsdump_log.

◆ blk_describe()

CS_RETCODE blk_describe ( CS_BLKDESC blkdesc,
CS_INT  item,
CS_DATAFMT datafmt_arg 
)

◆ blk_done()

CS_RETCODE blk_done ( CS_BLKDESC blkdesc,
CS_INT  type,
CS_INT outrow 
)

◆ blk_drop()

CS_RETCODE blk_drop ( CS_BLKDESC blkdesc)

Definition at line 336 of file blk.c.

References _cs_blkdesc::bcpinfo, CS_SUCCEED, TDS_DBG_FUNC, tds_free_bcpinfo, and tdsdump_log.

Referenced by main(), and CTL_BCPInCmd::~CTL_BCPInCmd().

◆ blk_getrow()

CS_RETCODE blk_getrow ( SRV_PROC srvproc,
CS_BLKDESC blkdescp,
CS_BLK_ROW rowp 
)

Definition at line 347 of file blk.c.

References CS_FAIL, TDS_DBG_FUNC, and tdsdump_log.

◆ blk_gettext()

CS_RETCODE blk_gettext ( SRV_PROC srvproc,
CS_BLKDESC blkdescp,
CS_BLK_ROW rowp,
CS_INT  bufsize,
CS_INT outlenp 
)

Definition at line 356 of file blk.c.

References bufsize, CS_FAIL, TDS_DBG_FUNC, and tdsdump_log.

◆ blk_init()

CS_RETCODE blk_init ( CS_BLKDESC blkdesc,
CS_INT  direction,
CS_CHAR tablename,
CS_INT  tnamelen 
)

◆ blk_props()

CS_RETCODE blk_props ( CS_BLKDESC blkdesc,
CS_INT  action,
CS_INT  property,
CS_VOID buffer,
CS_INT  buflen,
CS_INT outlen 
)

◆ blk_rowalloc()

CS_RETCODE blk_rowalloc ( SRV_PROC srvproc,
CS_BLK_ROW **  row 
)

Definition at line 450 of file blk.c.

References CS_FAIL, row, TDS_DBG_FUNC, and tdsdump_log.

◆ blk_rowdrop()

CS_RETCODE blk_rowdrop ( SRV_PROC srvproc,
CS_BLK_ROW row 
)

Definition at line 459 of file blk.c.

References CS_FAIL, row, TDS_DBG_FUNC, and tdsdump_log.

◆ blk_rowxfer()

CS_RETCODE blk_rowxfer ( CS_BLKDESC blkdesc)

Definition at line 468 of file blk.c.

References blk_rowxfer_mult(), NULL, TDS_DBG_FUNC, and tdsdump_log.

Referenced by hoge_blkin(), main(), and CTL_BCPInCmd::Send().

◆ blk_rowxfer_mult()

CS_RETCODE blk_rowxfer_mult ( CS_BLKDESC blkdesc,
CS_INT row_count 
)

◆ blk_sendrow()

CS_RETCODE blk_sendrow ( CS_BLKDESC blkdesc,
CS_BLK_ROW row 
)

Definition at line 501 of file blk.c.

References CS_FAIL, row, TDS_DBG_FUNC, and tdsdump_log.

◆ blk_sendtext()

CS_RETCODE blk_sendtext ( CS_BLKDESC blkdesc,
CS_BLK_ROW row,
CS_BYTE buffer,
CS_INT  buflen 
)

Definition at line 511 of file blk.c.

References buffer, CS_FAIL, row, TDS_DBG_FUNC, and tdsdump_log.

◆ blk_sethints()

CS_RETCODE blk_sethints ( CS_BLKDESC blkdesc,
CS_CHAR hints,
CS_INT  hintslen 
)

◆ blk_srvinit()

CS_RETCODE blk_srvinit ( SRV_PROC srvproc,
CS_BLKDESC blkdescp 
)

Definition at line 535 of file blk.c.

References CS_FAIL, TDS_DBG_FUNC, and tdsdump_log.

◆ blk_textxfer()

CS_RETCODE blk_textxfer ( CS_BLKDESC blkdesc,
CS_BYTE buffer,
CS_INT  buflen,
CS_INT outlen 
)

◆ TDS_COMPILE_CHECK() [1/2]

TDS_COMPILE_CHECK ( nested_type  ,
TDS_OFFSET(CS_BLKDESC, bcpinfo)  = =0 
)

◆ TDS_COMPILE_CHECK() [2/2]

TDS_COMPILE_CHECK ( same_size  ,
sizeof(CS_BLKDESC = =sizeof(TDSBCPINFO) 
)
Modified on Thu Jul 18 16:01:33 2024 by modify_doxy.py rev. 669887