irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

rcGenQuery.cpp
Go to the documentation of this file.
1 
5 
8 /* See genQuery.h for a description of this API call.*/
9 
10 #include "genQuery.h"
11 #include "procApiRequest.h"
12 #include "apiNumber.h"
13 
14 /* this is a debug routine; it just prints the genQueryInp
15  structure */
16 int
17 printGenQI( genQueryInp_t *genQueryInp ) {
18  int i, len;
19  int *ip1, *ip2;
20  char *cp;
21  char **cpp;
22 
23  printf( "maxRows=%d\n", genQueryInp->maxRows );
24 
25  len = genQueryInp->selectInp.len;
26  printf( "sel len=%d\n", len );
27  ip1 = genQueryInp->selectInp.inx;
28  ip2 = genQueryInp->selectInp.value;
29  for ( i = 0; i < len; i++ ) {
30  printf( "sel inx [%d]=%d\n", i, *ip1 );
31  printf( "sel val [%d]=%d\n", i, *ip2 );
32  ip1++;
33  ip2++;
34  }
35 
36  len = genQueryInp->sqlCondInp.len;
37  printf( "sqlCond len=%d\n", len );
38  ip1 = genQueryInp->sqlCondInp.inx;
39  cpp = genQueryInp->sqlCondInp.value;
40  cp = *cpp;
41  for ( i = 0; i < len; i++ ) {
42  printf( "sel inx [%d]=%d\n", i, *ip1 );
43  printf( "sel val [%d]=:%s:\n", i, cp );
44  ip1++;
45  cpp++;
46  cp = *cpp;
47  }
48  return 0;
49 }
50 
88 int
89 rcGenQuery( rcComm_t *conn, genQueryInp_t *genQueryInp,
90  genQueryOut_t **genQueryOut ) {
91  int status;
92  /* printGenQI(genQueryInp); */
93  status = procApiRequest( conn, GEN_QUERY_AN, genQueryInp, NULL,
94  ( void ** )genQueryOut, NULL );
95 
96  return status;
97 }
98 
rcComm_t
Definition: rcConnect.h:95
NULL
#define NULL
Definition: rodsDef.h:70
GenQueryInp
Definition: rodsGenQuery.h:24
InxIvalPair::len
int len
Definition: objInfo.h:206
InxValPair::inx
int * inx
Definition: objInfo.h:215
GenQueryInp::selectInp
inxIvalPair_t selectInp
Definition: rodsGenQuery.h:53
GenQueryInp::maxRows
int maxRows
Definition: rodsGenQuery.h:25
InxValPair::value
char ** value
Definition: objInfo.h:216
rcGenQuery
int rcGenQuery(rcComm_t *conn, genQueryInp_t *genQueryInp, genQueryOut_t **genQueryOut)
Definition: rcGenQuery.cpp:89
printGenQI
int printGenQI(genQueryInp_t *genQueryInp)
Definition: rcGenQuery.cpp:17
procApiRequest.h
InxIvalPair::inx
int * inx
Definition: objInfo.h:207
GenQueryInp::sqlCondInp
inxValPair_t sqlCondInp
Definition: rodsGenQuery.h:56
genQuery.h
GenQueryOut
Definition: rodsGenQuery.h:67
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
InxIvalPair::value
int * value
Definition: objInfo.h:208
InxValPair::len
int len
Definition: objInfo.h:214
apiNumber.h
procApiRequest
int procApiRequest(rcComm_t *conn, int apiNumber, void *inputStruct, bytesBuf_t *inputBsBBuf, void **outStruct, bytesBuf_t *outBsBBuf)
Definition: procApiRequest.cpp:55
GEN_QUERY_AN
#define GEN_QUERY_AN
Definition: apiNumber.h:131