NCBI C++ ToolKit
Classes | Functions | Variables
rpc.c File Reference
#include "common.h"
#include <common/test_assert.h>
+ Include dependency graph for rpc.c:

Go to the source code of this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Classes

struct  RETPARAM
 
struct  parameters_t
 

Functions

static RETCODE init_proc (DBPROCESS *dbproc, const char *name)
 
int ignore_err_handler (DBPROCESS *dbproc, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr)
 
int ignore_msg_handler (DBPROCESS *dbproc, DBINT msgno, int state, int severity, char *text, char *server, char *proc, int line)
 
static RETPARAMsave_retparam (RETPARAM *param, char *name, char *value, int type, int len)
 
static void free_retparam (RETPARAM *param)
 
static int colwidth (DBPROCESS *dbproc, int icol)
 
int main (int argc, char **argv)
 

Variables

char param_data1 [64]
 
char param_data3 [8000+1]
 
char param_data4 [2 *4000+1]
 
int param_data2
 
int param_data5
 
struct parameters_t bindings []
 
struct parameters_tpb [] = bindings
 

Function Documentation

◆ colwidth()

static int colwidth ( DBPROCESS dbproc,
int  icol 
)
static

Definition at line 112 of file rpc.c.

References dbcollen(), dbcoltype(), dbproc, dbwillconvert(), and SYBCHAR.

Referenced by main().

◆ free_retparam()

static void free_retparam ( RETPARAM param)
static

Definition at line 65 of file rpc.c.

References free(), RETPARAM::name, NULL, and RETPARAM::value.

Referenced by main().

◆ ignore_err_handler()

int ignore_err_handler ( DBPROCESS dbproc,
int  severity,
int  dberr,
int  oserr,
char *  dberrstr,
char *  oserrstr 
)

Definition at line 88 of file rpc.c.

References dbproc, dbsetuserdata(), exit(), INT_CANCEL, NULL, and syb_err_handler().

Referenced by main().

◆ ignore_msg_handler()

int ignore_msg_handler ( DBPROCESS dbproc,
DBINT  msgno,
int  state,
int  severity,
char *  text,
char *  server,
char *  proc,
int  line 
)

Definition at line 73 of file rpc.c.

References dbproc, dbsetuserdata(), NULL, proc, syb_msg_handler(), and text().

Referenced by main().

◆ init_proc()

static RETCODE init_proc ( DBPROCESS dbproc,
const char *  name 
)
static

Definition at line 22 of file rpc.c.

References dbproc, dbresults(), dbsqlexec(), FAIL, NO_MORE_RESULTS, and sql_cmd().

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)

◆ save_retparam()

static RETPARAM * save_retparam ( RETPARAM param,
char *  name,
char *  value,
int  type,
int  len 
)
static

Definition at line 50 of file rpc.c.

References free(), len, RETPARAM::len, RETPARAM::name, strdup, RETPARAM::type, type, RETPARAM::value, and value.

Referenced by main().

Variable Documentation

◆ bindings

struct parameters_t bindings[]
Initial value:
=
{ { "@null_input", DBRPCRETURN, SYBCHAR, -1, 0, NULL }
, { "@first_type", DBRPCRETURN, SYBCHAR, sizeof(param_data1), 0, (BYTE *) &param_data1 }
, { "@nullout", DBRPCRETURN, SYBINT4, -1, 0, (BYTE *) &param_data2 }
, { "@varchar_tds7_out", DBRPCRETURN, SYBVARCHAR, sizeof(param_data3), 0, (BYTE *) &param_data3 }
, { "@nvarchar_tds7_out", DBRPCRETURN, 231, sizeof(param_data4), 0, (BYTE *) &param_data4 }
, { "@nrows", DBRPCRETURN, SYBINT4, -1, -1, (BYTE *) &param_data5 }
, { "@c_this_name_is_way_more_than_thirty_characters_charlie",
0, SYBVARCHAR, 0, 0, NULL }
, { "@nv", 0, SYBVARCHAR, -1, 2, (BYTE *) "OK:" }
}
char param_data4[2 *4000+1]
Definition: rpc.c:118
char param_data3[8000+1]
Definition: rpc.c:118
int param_data2
Definition: rpc.c:119
char param_data1[64]
Definition: rpc.c:118
int param_data5
Definition: rpc.c:119
#define NULL
Definition: ncbistd.hpp:225
#define SYBINT4
Definition: sybdb.h:170
#define SYBVARCHAR
Definition: sybdb.h:162
unsigned char BYTE
Definition: sybdb.h:334
#define SYBCHAR
Definition: sybdb.h:160
#define DBRPCRETURN
Definition: sybdb.h:577

Referenced by main().

◆ param_data1

char param_data1[64]

Definition at line 118 of file rpc.c.

◆ param_data2

int param_data2

Definition at line 119 of file rpc.c.

◆ param_data3

char param_data3[8000+1]

Definition at line 118 of file rpc.c.

◆ param_data4

char param_data4[2 *4000+1]

Definition at line 118 of file rpc.c.

◆ param_data5

int param_data5

Definition at line 119 of file rpc.c.

Referenced by main().

◆ pb

struct parameters_t * pb[] = bindings
Modified on Tue Apr 09 08:00:00 2024 by modify_doxy.py rev. 669887
Modified on Wed Apr 10 07:35:22 2024 by modify_doxy.py rev. 669887
Modified on Thu Apr 11 15:20:23 2024 by modify_doxy.py rev. 669887
Modified on Fri Apr 12 17:22:43 2024 by modify_doxy.py rev. 669887
Modified on Sat Apr 13 11:50:02 2024 by modify_doxy.py rev. 669887
Modified on Sun Apr 14 05:29:10 2024 by modify_doxy.py rev. 669887