⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sybdb.h

📁 这是linux下关于C的编程
💻 H
📖 第 1 页 / 共 5 页
字号:
**      comes back for every column in every row. The DBPROCESS structure**      points to a linked-list of DBROW structures. Each DBROW strcture points**      to an array of DBROWDATA structures. Since every DBROWDATA structure**      contains pointers to separately allocated buffers, the members of**      each array are linked together in a singly-linked list, to facilitate**      the operation of simple row-freeing routines.*/struct dbrowdata{        BYTE            *data;          /* actual data for this column in this                                         * row                                         */        DBINT           datlen;         /* length, in bytes, of this data */	DBINT		maxtxtlen;	/* This used to keep track of the 					 * largest SYBTEXT/SYBIMAGE column					 * received so far.					 */        DBBINARY        dattxptr[DBTXPLEN];/* This data's text-ptr, if it's of                                         * type SYBTEXT.                                         */        DBTINYINT       dattxplen;      /* Length, in bytes, of the text-ptr. */        DBBINARY        dattxts[DBTXTSLEN];/* The text-timestamp of this text                                         * value.                                         */        DBTINYINT       dattxtslen;     /* Length, in bytes, of the                                         * text-timestamp.                                         */        struct dbrowdata        *datnext;};typedef struct dbrowdata        DBROWDATA;/*** DBTYPEINFO - This is the structure through which precision and scale** information for Numeric/Decimal datatypes gets passed*/typedef	struct	dbtypeinfo{	DBINT	precision;	DBINT	scale;} DBTYPEINFO;/***  BINDREC - This is the structure used to store information about**      which columns should be bound to which programming variables*/struct  bindrec{        BYTE            *bindvar;       /* ptr to program variable */        DBINT           bindlen;        /* length of program variable */        DB_BINDPROC_FUNC bindproc;  	/* procedure to use for data copy. */        DBINT           *bindnullind;   /* IBM-type indicator variable. */        DBINT           bindtype;       /* variable for indexing convertfunc                                        ** tables.                                        */	DBTYPEINFO	bindtypeinfo;	/* precision/scale info */};typedef struct bindrec  BINDREC;/*** NULLBIND - This structure is attached to the DBPROCESS and is used**      to determine what to bind when bind values are NULL.*/struct  nullbind{        DBBIT           nullbit;        DBTINYINT       nulltiny;        DBSMALLINT      nullsmall;        DBINT           nullint;        DBCHAR          *nullchar;        DBINT           nulllchar;      /* length of char string */        DBBINARY        *nullbinary;        DBINT           nulllbinary;    /* length of binary string */        DBDATETIME      nulldatetime;        DBMONEY         nullmoney;        DBFLT8          nullflt8;        DBCHAR          *nullstring;        DBCHAR          *nullntbstring;        DBVARYCHAR      nullvarychar;        DBVARYBIN       nullvarybin;        DBDATETIME4     nullsmalldatetime;        DBMONEY4        nullsmallmoney;        DBREAL          nullflt4;        DBNUMERIC       nullnumeric;        DBDECIMAL       nulldecimal;        DBCHAR          *nullsensitivity;        DBCHAR          *nullboundary;};typedef struct nullbind NULLBIND;/***  DBCOLINFO - This structure contains the format information about a column.**      There is a linked list of DBCOLINFO structures in the DBPROCESS**      structure.  There is one DBCOLINFO structure for each column in the**      target list of the current command.  Format information for**      alternate rows, like compute, is kept in the DBALTHEAD and**      DBALTINFO structures.*/struct dbcolinfo{        char    colname[DBMAXCOLNAME+1];/* column name */        BYTE    coltype;                /* column type */        DBINT   coludtype;              /* user-defined type */        DBINT   collen;                 /* max length of column */        DBINT   colprlen;               /* max printing length of column */        char    *colcontrol;            /* control format, if any */        struct bindrec  colbind;        /* binding info, if any */        int     coltable;               /* for browse mode: which table                                         * did this column come from?                                         */        BYTE            colstatus;      /* for browse mode: what kind of column                                         * is this?                                         */	BYTE		colrowstatus;	/* for holding status in the 					 * TDS_ROWFMT data stream					 */        char    colorigname[DBMAXCOLNAME+1];/* for browse mode: what is the name                                         * of the table column that provided                                         * this select-list member?                                         */        char    *coltxobjname;          /* the SQL Server always returns the                                         * qualified object-name for TEXT                                         * columns.                                         */	DBTYPEINFO	coltypeinfo;	/* precision/scale info for Numeric or					 * Decimal columns.					 */	DBBOOL		colhasnull;	/* Is column data null? */        struct dbcolinfo        *colnext;       /* next column */};typedef struct dbcolinfo        DBCOLINFO;/***  DBTABNAME - This structure contains information about the tables which**      were used to produce the current set of results. The SQL Server only**      provides this info for queries that are executed in "browse mode".****      There is a linked list of DBTABNAME structures in the DBPROCESS**      structure.  There is one DBTABNAME structure for each table used to**      produce the target list of the current command.****      If this query was executed without "browse mode", then this list will**      have no members.*/struct dbtabname{        char                    tabname[DBMAXNAME+1];   /* column name */        struct dbtabname        *tabnext;               /* next column */};typedef struct dbtabname        DBTABNAME;/***  DBALTHEAD - This structure contains information for ALT rows.  ALT**      rows are COMPUTE results.  There is one DBALTHEAD for each COMPUTE**      statement.  All the COMPUTE operators in a particular COMPUTE statement**      must have the same bylist -- this is enforced by the SQL Server.**      Off of each DBALTHEAD is a linked list of DBALTINFO structures that**      describe the format for each particular COMPUTE operation in the**      COMPUTE.*/struct  dbalthead{        DBUSMALLINT     althid;         /* id for this COMPUTE statement */        BYTE    althalts;       /* number of DBALTINFO structures in althlist */        BYTE    althsizeby;     /* number of elements in the bylist */        BYTE    althbylist[DBMAXBYLIST];        /* colids of bylist elements */        struct dbaltinfo        *althlist;      /* linked list of DBALTINFOs */        struct dbprlist         *althprlist;    /* order print list for aops */        struct dbalthead        *althnext;      /* next dbalthead */};typedef struct dbalthead        DBALTHEAD;typedef struct dbxlate{        void DBFAR *bufstart;    /* For use when freeing translation tables. */        void DBFAR *xlate;       /* Points to an INTL_XLATE structure. */} DBXLATE;/***  DBPRLIST - This structure is used to create an 'ordered' printing list**      for computes.  For example a compute might be:**              compute sum(col1), avg(col2), sum(col2), avg(col3), avg(col1)**      For printing, it would be nice to have a list that pointed to the**      right DBALTINFO structures like this:**              sum(col1)-->sum(col2)**                |**               \|/**              avg(col1)-->avg(col2)-->avg(col3)**      It is used by the praltrow function that dbprrow uses but the**      information could be used by any DBLIB client.*/struct  dbprlist{        DBROWDATA       *prdata;        /* actual data for the compute */        struct dbaltinfo        *prtarget;      /* related ALTINFO struct */        struct dbprlist         *prright;       /* next aop in compute */        struct dbprlist         *prdown;        /* next compute in query */};typedef struct dbprlist DBPRLIST;/***  DBALTINFO - This structure contains the format information about**      alternate rows.  Compute clauses produce alternate rows of data,**      interspersed with the regular data rows returned by the dataserver.**      There is a linked list of DBALTHEAD structures in the DBPROCESS**      structure.  There is one DBALTHEAD structure for each possible**      type of alternate row of the current command.  Format information for**      regular data rows is kept in the DBCOLINFO structure.*/struct dbaltinfo{        char    *altname;       /* null terminated string to alt header */        BYTE    alttoken;       /* type of alternate information */        BYTE    altcolid;       /* which target list member referenced */        BYTE    alttype;        /* column type */        DBINT   altudtype;      /* user-defined type */        DBINT   altlen;         /* max length of column */        DBINT   altprlen;       /* printing length of data */        char    *altcontrol;            /* control format, if any */	DBTYPEINFO	alttypeinfo;	/* precision/scale info for Numeric or					 * Decimal columns.					 */        struct dbprlist *altprlist;     /* ptr to ordered printing list */        struct bindrec  altbind;        /* binding info, if any */        struct dbaltinfo        *altnext;       /* next column */};typedef struct dbaltinfo        DBALTINFO;/***  DBROW - This structure is used to store the actual row and alternate row**      data returned by the dataserver.  The member of the DBPROCESS structure **      called dbfirstdata stores the doubly-linked list of rows.  If buffering**      is off, only one row is stored.  The rows are stored in the order that**      they are received from the server.*/struct dbrow{        DBINT           rowid;          /* this is the returned row number */        DBUSMALLINT     rowaltid;       /* for ALT rows, this is                                         * DBALTINFO.altid                                         */        DBROWDATA       *rowdata;       /* actual data */        DBBOOL          rowhasnull;     /* are there any NULLS in this row of                                         * data?                                         */        struct dbrow    *rowprev;       /* previous row if buffering on */        struct dbrow    *rownext;       /* next row if buffering on */};typedef struct dbrow    DBROW;/***  DBINFO - This structure is used to store information and error messages**      returned by the dataserver.****      NOTE - This structure is used by APT.**              Adding or deleting structure members should be done with**              care.*/struct dbinfo{        DBINT		infonum;        /* error or info number */        DBTINYINT	infostate;      /* error state number */        DBTINYINT	infoclass;      /* info class or error severity */        char DBFAR	*infotext;      /* null terminated message */        char DBFAR	*infoservname;  /* null terminated Server-name */        char DBFAR	*infoprocname;  /* null terminated procedure-name */        DBUSMALLINT     infolinenum;    /* stored-procedure line-number */        struct dbinfo DBFAR	*infonext;};typedef struct dbinfo   DBINFO;struct dbparam{	BYTE		namelen;	DBCHAR		paramname[DBMAXNAME + 1];	BYTE		status;	DBINT		usertype;	BYTE		datatype;	DBINT		maxdatalen;	DBTYPEINFO	paramtypeinfo;	DBINT		datalen;	BYTE		*data;	struct dbparam  *paramnext;};typedef struct dbparam       DBPARAM;struct dbmsg{	DBUSMALLINT	msgid;	DBUSMALLINT	nummsgparams;	DBPARAM		*param;};typedef struct dbmsg        DBMSG;/***  Options - both for the dataserver and DBLIB**      As additional options are added, they should be added here and in**      the Dboptdict array.*//*** dataserver options are defined in pss.h** dataserver options and their index into the Dboptdict array** Dboptdict is defined in options.c*/#define DBPARSEONLY     0#de

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -