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)  

collection.cpp
Go to the documentation of this file.
1 
3 /* collection.c - collection operation */
4 
5 #include "rcMisc.h"
6 #include "collection.hpp"
7 #include "specColl.hpp"
8 #include "genQuery.h"
9 #include "specificQuery.h"
10 #include "dataObjRename.h"
11 #include "readCollection.h"
12 #include "closeCollection.h"
13 #include "collCreate.h"
14 #include "objMetaOpr.hpp"
15 #include "rsGenQuery.hpp"
16 #include "rsSpecificQuery.hpp"
17 #include "rsOpenCollection.hpp"
18 #include "rsReadCollection.hpp"
19 #include "rsCloseCollection.hpp"
20 #include "rsObjStat.hpp"
21 #include "rsCollCreate.hpp"
22 #include "rsDataObjRename.hpp"
23 
24 #include "irods_virtual_path.hpp"
25 
26 
27 /* checkCollAccessPerm - Check whether the user is allowed to perform
28  * operation specified by the accessPerm string on the collection.
29  * Various accessPerm are defined in icatDefines.h. (e.g.,
30  * ACCESS_DELETE_OBJECT for create and delete, ACCESS_READ_OBJECT for read).
31  * A return of >= 0 means allow and a negative value means disallow.
32  */
33 
34 int
35 checkCollAccessPerm( rsComm_t *rsComm, char *collection, char *accessPerm ) {
36  char accStr[LONG_NAME_LEN];
37  char condStr[MAX_NAME_LEN];
38  genQueryInp_t genQueryInp;
39  genQueryOut_t *genQueryOut = NULL;
40  int status;
41 
42  if ( collection == NULL || accessPerm == NULL ) {
44  }
45 
46  memset( &genQueryInp, 0, sizeof( genQueryInp ) );
47 
48  snprintf( accStr, LONG_NAME_LEN, "%s", rsComm->clientUser.userName );
49  addKeyVal( &genQueryInp.condInput, USER_NAME_CLIENT_KW, accStr );
50 
51  snprintf( accStr, LONG_NAME_LEN, "%s", rsComm->clientUser.rodsZone );
52  addKeyVal( &genQueryInp.condInput, RODS_ZONE_CLIENT_KW, accStr );
53 
54  snprintf( accStr, LONG_NAME_LEN, "%s", accessPerm );
55  addKeyVal( &genQueryInp.condInput, ACCESS_PERMISSION_KW, accStr );
56 
57  snprintf( condStr, MAX_NAME_LEN, "='%s'", collection );
58  addInxVal( &genQueryInp.sqlCondInp, COL_COLL_NAME, condStr );
59 
60  addInxIval( &genQueryInp.selectInp, COL_COLL_ID, 1 );
61 
62  genQueryInp.maxRows = MAX_SQL_ROWS;
63 
64  status = rsGenQuery( rsComm, &genQueryInp, &genQueryOut );
65 
66  clearGenQueryInp( &genQueryInp );
67  freeGenQueryOut( &genQueryOut );
68 
69  return status;
70 }
71 
72 /*
73  Try a specific-query for the a particular Data-object in collection
74  query first, for performance improvements, before going back to a
75  general-query. This is called from rsQueryDataObjInCollReCur below.
76  See the svn commit log (r5682) for the specific query definition.
77  */
79  rsComm_t *rsComm,
80  char *collection,
81  genQueryOut_t **genQueryOut ) {
82 
83  int status = 0;
84  char collNamePercent[MAX_NAME_LEN + 2];
85 
86  specificQueryInp_t specificQueryInp;
87 
88  rstrcpy( collNamePercent, collection, MAX_NAME_LEN );
89  rstrcat( collNamePercent, "/%", MAX_NAME_LEN );
90 
91  memset( &specificQueryInp, 0, sizeof( specificQueryInp_t ) );
92 
93  specificQueryInp.maxRows = MAX_SQL_ROWS;
94  specificQueryInp.continueInx = 0;
95 
96  specificQueryInp.sql = "DataObjInCollReCur";
97  specificQueryInp.args[0] = collection;
98  specificQueryInp.args[1] = collNamePercent;
99 
100  status = rsSpecificQuery( rsComm, &specificQueryInp, genQueryOut );
101 
102  if ( status == 0 ) {
103  /*
104  Set the attriInx values so the server-side code can locate
105  the fields (avoid a UNMATCHED_KEY_OR_INDEX error) the way
106  general-query is handled. The specific-query can't set these
107  because the columns being returned are not known (unlike for
108  general-query). So this code assumes the DataObjInCollReCur
109  is defined correctly and is returning the following columns.
110  The result->attriCnt == 6 test is a sanity check.
111  */
112  genQueryOut_t *result;
113  result = *genQueryOut;
114  if ( result->attriCnt == 7 ) {
115 
116  result->sqlResult[0].attriInx = COL_D_DATA_ID;
117  result->sqlResult[1].attriInx = COL_COLL_NAME;
118  result->sqlResult[2].attriInx = COL_DATA_NAME;
119  result->sqlResult[3].attriInx = COL_DATA_REPL_NUM;
120  result->sqlResult[4].attriInx = COL_D_RESC_NAME;
121  result->sqlResult[5].attriInx = COL_D_DATA_PATH;
122  result->sqlResult[6].attriInx = COL_D_RESC_ID;
123  }
124  }
125  return status;
126 }
127 
128 
129 
130 int
131 rsQueryDataObjInCollReCur( rsComm_t *rsComm, char *collection,
132  genQueryInp_t *genQueryInp, genQueryOut_t **genQueryOut, char *accessPerm,
133  int singleFlag ) {
134  char collQCond[MAX_NAME_LEN * 2];
135  int status = 0;
136  char accStr[LONG_NAME_LEN];
137 
138  if ( genQueryInp == NULL ||
139  collection == NULL ||
140  genQueryOut == NULL ) {
141  return USER__NULL_INPUT_ERR;
142  }
143 
144  memset( genQueryInp, 0, sizeof( genQueryInp_t ) );
145 
146  genAllInCollQCond( collection, collQCond );
147 
148  addInxVal( &genQueryInp->sqlCondInp, COL_COLL_NAME, collQCond );
149 
150  addInxIval( &genQueryInp->selectInp, COL_D_DATA_ID, 1 );
151  addInxIval( &genQueryInp->selectInp, COL_COLL_NAME, 1 );
152  addInxIval( &genQueryInp->selectInp, COL_DATA_NAME, 1 );
153 
154  if ( singleFlag == 0 ) {
155  addInxIval( &genQueryInp->selectInp, COL_DATA_REPL_NUM, 1 );
156  addInxIval( &genQueryInp->selectInp, COL_D_RESC_NAME, 1 );
157  addInxIval( &genQueryInp->selectInp, COL_D_DATA_PATH, 1 );
158  }
159 
160  addInxIval( &genQueryInp->selectInp, COL_D_RESC_ID, 1 );
161 
162  if ( accessPerm != NULL ) {
163  snprintf( accStr, LONG_NAME_LEN, "%s", rsComm->clientUser.userName );
164  addKeyVal( &genQueryInp->condInput, USER_NAME_CLIENT_KW, accStr );
165 
166  snprintf( accStr, LONG_NAME_LEN, "%s", rsComm->clientUser.rodsZone );
167  addKeyVal( &genQueryInp->condInput, RODS_ZONE_CLIENT_KW, accStr );
168 
169  snprintf( accStr, LONG_NAME_LEN, "%s", accessPerm );
170  addKeyVal( &genQueryInp->condInput, ACCESS_PERMISSION_KW, accStr );
171  /* have to set it to 1 because it only check the first one */
172  genQueryInp->maxRows = 1;
173  status = rsGenQuery( rsComm, genQueryInp, genQueryOut );
174  rmKeyVal( &genQueryInp->condInput, USER_NAME_CLIENT_KW );
175  rmKeyVal( &genQueryInp->condInput, RODS_ZONE_CLIENT_KW );
176  rmKeyVal( &genQueryInp->condInput, ACCESS_PERMISSION_KW );
177  }
178  else {
179  genQueryInp->maxRows = MAX_SQL_ROWS;
181  rsComm,
182  collection,
183  genQueryOut );
184  if ( status < 0 && status != CAT_NO_ROWS_FOUND ) {
185  rodsLog(
186  LOG_NOTICE,
187  "Note: DataObjInCollReCur specific-Query failed (not defined?), running standard query, status=%d",
188  status );
189  /* remove the level 0 error msg added by the specific-query failure */
190  status = freeRErrorContent( &rsComm->rError );
191  /* fall back to the general-query call which used before this
192  specific-query was added (post 3.3.1) */
193  genQueryInp->maxRows = MAX_SQL_ROWS;
194  status = rsGenQuery( rsComm, genQueryInp, genQueryOut );
195  }
196 
197  }
198 
199  return status;
200 
201 }
202 
203 int
204 rsQueryCollInColl( rsComm_t *rsComm, char *collection,
205  genQueryInp_t *genQueryInp, genQueryOut_t **genQueryOut ) {
206  char collQCond[MAX_NAME_LEN];
207  int status;
208 
209  if ( collection == NULL || genQueryOut == NULL ) {
210  return USER__NULL_INPUT_ERR;
211  }
212 
213  memset( genQueryInp, 0, sizeof( genQueryInp_t ) );
214 
215  snprintf( collQCond, MAX_NAME_LEN, "='%s'", collection );
216 
217  addInxVal( &genQueryInp->sqlCondInp, COL_COLL_PARENT_NAME, collQCond );
218 
219  addInxIval( &genQueryInp->selectInp, COL_COLL_NAME, 1 );
220 
221  genQueryInp->maxRows = MAX_SQL_ROWS;
222 
223  status = rsGenQuery( rsComm, genQueryInp, genQueryOut );
224 
225  return status;
226 }
227 
228 int
229 isCollEmpty( rsComm_t *rsComm, char *collection ) {
230  collInp_t openCollInp;
231  collEnt_t *collEnt;
232  int handleInx;
233  int entCnt = 0;
234 
235  if ( rsComm == NULL || collection == NULL ) {
237  "isCollEmpty: Input rsComm or collection is NULL" );
238  return True;
239  }
240 
241  memset( &openCollInp, 0, sizeof( openCollInp ) );
242  rstrcpy( openCollInp.collName, collection, MAX_NAME_LEN );
243  /* cannot query recur because collection is sorted in wrong order */
244  openCollInp.flags = 0;
245  handleInx = rsOpenCollection( rsComm, &openCollInp );
246  if ( handleInx < 0 ) {
248  "isCollEmpty: rsOpenCollection of %s error. status = %d",
249  openCollInp.collName, handleInx );
250  return True;
251  }
252 
253  while ( rsReadCollection( rsComm, &handleInx, &collEnt ) >= 0 ) {
254  entCnt++;
255  free( collEnt ); /* just free collEnt but not content */
256  }
257 
258  rsCloseCollection( rsComm, &handleInx );
259 
260  if ( entCnt > 0 ) {
261  return False;
262  }
263  else {
264  return True;
265  }
266 }
267 
268 /* collStat - query metaData of a collection. */
269 
270 int
271 collStat( rsComm_t *rsComm, dataObjInp_t *dataObjInp,
272  rodsObjStat_t **rodsObjStatOut ) {
273  genQueryInp_t genQueryInp;
274  genQueryOut_t *genQueryOut = NULL;
275  int status;
276  char condStr[MAX_NAME_LEN];
277  sqlResult_t *dataId;
278  sqlResult_t *ownerName;
279  sqlResult_t *ownerZone;
280  sqlResult_t *createTime;
281  sqlResult_t *modifyTime;
283  sqlResult_t *collInfo1;
284  sqlResult_t *collInfo2;
285 
286  /* see if objPath is a collection */
287  memset( &genQueryInp, 0, sizeof( genQueryInp ) );
288 
289  snprintf( condStr, MAX_NAME_LEN, "='%s'", dataObjInp->objPath );
290  addInxVal( &genQueryInp.sqlCondInp, COL_COLL_NAME, condStr );
291 
292  addInxIval( &genQueryInp.selectInp, COL_COLL_ID, 1 );
293  /* XXXX COL_COLL_NAME added for queueSpecColl */
294  addInxIval( &genQueryInp.selectInp, COL_COLL_NAME, 1 );
295  addInxIval( &genQueryInp.selectInp, COL_COLL_OWNER_NAME, 1 );
296  addInxIval( &genQueryInp.selectInp, COL_COLL_OWNER_ZONE, 1 );
297  addInxIval( &genQueryInp.selectInp, COL_COLL_CREATE_TIME, 1 );
298  addInxIval( &genQueryInp.selectInp, COL_COLL_MODIFY_TIME, 1 );
299  /* XXXX may want to do this if spec coll is supported */
300  addInxIval( &genQueryInp.selectInp, COL_COLL_TYPE, 1 );
301  addInxIval( &genQueryInp.selectInp, COL_COLL_INFO1, 1 );
302  addInxIval( &genQueryInp.selectInp, COL_COLL_INFO2, 1 );
303 
304  genQueryInp.maxRows = MAX_SQL_ROWS;
305 
306  status = rsGenQuery( rsComm, &genQueryInp, &genQueryOut );
307  if ( status >= 0 ) {
308  *rodsObjStatOut = ( rodsObjStat_t * ) malloc( sizeof( rodsObjStat_t ) );
309  memset( *rodsObjStatOut, 0, sizeof( rodsObjStat_t ) );
310  ( *rodsObjStatOut )->objType = COLL_OBJ_T;
311  status = ( int )COLL_OBJ_T;
312  if ( ( dataId = getSqlResultByInx( genQueryOut,
313  COL_COLL_ID ) ) == NULL ) {
315  "_rsObjStat: getSqlResultByInx for COL_COLL_ID failed" );
316  return UNMATCHED_KEY_OR_INDEX;
317  }
318  else if ( ( ownerName = getSqlResultByInx( genQueryOut,
319  COL_COLL_OWNER_NAME ) ) == NULL ) {
321  "_rsObjStat:getSqlResultByInx for COL_COLL_OWNER_NAME failed" );
322  return UNMATCHED_KEY_OR_INDEX;
323  }
324  else if ( ( ownerZone = getSqlResultByInx( genQueryOut,
325  COL_COLL_OWNER_ZONE ) ) == NULL ) {
327  "_rsObjStat:getSqlResultByInx for COL_COLL_OWNER_ZONE failed" );
328  return UNMATCHED_KEY_OR_INDEX;
329  }
330  else if ( ( createTime = getSqlResultByInx( genQueryOut,
331  COL_COLL_CREATE_TIME ) ) == NULL ) {
333  "_rsObjStat:getSqlResultByInx for COL_COLL_CREATE_TIME failed" );
334  return UNMATCHED_KEY_OR_INDEX;
335  }
336  else if ( ( modifyTime = getSqlResultByInx( genQueryOut,
337  COL_COLL_MODIFY_TIME ) ) == NULL ) {
339  "_rsObjStat:getSqlResultByInx for COL_COLL_MODIFY_TIME failed" );
340  return UNMATCHED_KEY_OR_INDEX;
341  }
342  else if ( ( collType = getSqlResultByInx( genQueryOut,
343  COL_COLL_TYPE ) ) == NULL ) {
345  "_rsObjStat:getSqlResultByInx for COL_COLL_TYPE failed" );
346  return UNMATCHED_KEY_OR_INDEX;
347  }
348  else if ( ( collInfo1 = getSqlResultByInx( genQueryOut,
349  COL_COLL_INFO1 ) ) == NULL ) {
351  "_rsObjStat:getSqlResultByInx for COL_COLL_INFO1 failed" );
352  return UNMATCHED_KEY_OR_INDEX;
353  }
354  else if ( ( collInfo2 = getSqlResultByInx( genQueryOut,
355  COL_COLL_INFO2 ) ) == NULL ) {
357  "_rsObjStat:getSqlResultByInx for COL_COLL_INFO2 failed" );
358  return UNMATCHED_KEY_OR_INDEX;
359  }
360  else {
361  rstrcpy( ( *rodsObjStatOut )->dataId, dataId->value, NAME_LEN );
362  rstrcpy( ( *rodsObjStatOut )->ownerName, ownerName->value,
363  NAME_LEN );
364  rstrcpy( ( *rodsObjStatOut )->ownerZone, ownerZone->value,
365  NAME_LEN );
366  rstrcpy( ( *rodsObjStatOut )->createTime, createTime->value,
367  TIME_LEN );
368  rstrcpy( ( *rodsObjStatOut )->modifyTime, modifyTime->value,
369  TIME_LEN );
370 
371  if ( strlen( collType->value ) > 0 ) {
372  specCollCache_t *specCollCache = 0;
373 
374  if ( ( specCollCache =
375  matchSpecCollCache( dataObjInp->objPath ) ) != NULL ) {
376  replSpecColl( &specCollCache->specColl,
377  &( *rodsObjStatOut )->specColl );
378  }
379  else {
380  status = queueSpecCollCache( rsComm, genQueryOut, // JMC - backport 4680?
381  dataObjInp->objPath );
382  if ( status < 0 ) {
383  return status;
384  }
386  &( *rodsObjStatOut )->specColl );
387  }
388 
389 
390  }
391  }
392  }
393 
394  clearGenQueryInp( &genQueryInp );
395  freeGenQueryOut( &genQueryOut );
396 
397  return status;
398 }
399 
400 /* collStatAllKinds - Stat of a collection. The path can be part of a
401  * specColl or not.
402  */
403 
404 int
405 collStatAllKinds( rsComm_t *rsComm, dataObjInp_t *dataObjInp,
406  rodsObjStat_t **rodsObjStatOut ) {
407  int status;
408 
409  *rodsObjStatOut = NULL;
410  addKeyVal( &dataObjInp->condInput, SEL_OBJ_TYPE_KW, "collection" );
411  status = _rsObjStat( rsComm, dataObjInp, rodsObjStatOut );
412  rmKeyVal( &dataObjInp->condInput, SEL_OBJ_TYPE_KW );
413  if ( status >= 0 ) {
414  if ( ( *rodsObjStatOut )->objType != COLL_OBJ_T ) {
416  }
417  }
418  if ( status < 0 && *rodsObjStatOut != NULL ) {
419  freeRodsObjStat( *rodsObjStatOut );
420  *rodsObjStatOut = NULL;
421  }
422  return status;
423 }
424 
425 /* mk the collection resursively */
426 
427 int
428 rsMkCollR( rsComm_t *rsComm, const char *startColl, const char *destColl ) {
429  int status;
430  int startLen;
431  int pathLen, tmpLen;
432  char tmpPath[MAX_NAME_LEN];
433 
434  startLen = strlen( startColl );
435  pathLen = strlen( destColl );
436 
437  // sanitize destColl
438  std::string dest_coll( destColl );
439  const std::string log_sep = irods::get_virtual_path_separator();
440  size_t pos = dest_coll.find_last_of( log_sep );
441  if ( ( dest_coll.size() - 1 ) == pos ) {
442  dest_coll.erase( pos, std::string::npos );
443  }
444 
445  rstrcpy( tmpPath, dest_coll.c_str(), MAX_NAME_LEN );
446 
447  tmpLen = pathLen;
448 
449  while ( tmpLen > startLen ) {
450  if ( isCollAllKinds( rsComm, tmpPath, NULL ) >= 0 ) {
451  break;
452  }
453 
454  /* Go backward */
455 
456  while ( tmpLen && tmpPath[tmpLen] != '/' ) {
457  tmpLen --;
458  }
459  tmpPath[tmpLen] = '\0';
460  }
461 
462  /* Now we go forward and make the required coll */
463  while ( tmpLen < pathLen ) {
464  collInp_t collCreateInp;
465 
466  /* Put back the '/' */
467  tmpPath[tmpLen] = '/';
468  memset( &collCreateInp, 0, sizeof( collCreateInp ) );
469  rstrcpy( collCreateInp.collName, tmpPath, MAX_NAME_LEN );
470  status = rsCollCreate( rsComm, &collCreateInp );
471 
472  if ( status == CAT_NAME_EXISTS_AS_DATAOBJ && isTrashPath( tmpPath ) ) {
473  /* name conflict with a data object in the trash collection */
474  dataObjCopyInp_t dataObjRenameInp;
475  memset( &dataObjRenameInp, 0, sizeof( dataObjRenameInp ) );
476 
477  dataObjRenameInp.srcDataObjInp.oprType =
478  dataObjRenameInp.destDataObjInp.oprType = RENAME_DATA_OBJ;
479  rstrcpy( dataObjRenameInp.srcDataObjInp.objPath, tmpPath,
480  MAX_NAME_LEN );
481  rstrcpy( dataObjRenameInp.destDataObjInp.objPath, tmpPath,
482  MAX_NAME_LEN );
483  appendRandomToPath( dataObjRenameInp.destDataObjInp.objPath );
484 
485  status = rsDataObjRename( rsComm, &dataObjRenameInp );
486  if ( status >= 0 ) {
487  status = rsCollCreate( rsComm, &collCreateInp );
488  }
489  }
490  /* something may be added by rsCollCreate */
491  clearKeyVal( &collCreateInp.condInput );
492  if ( status < 0 ) {
493  // =-=-=-=-=-=-=-
494  // JMC - backport 4819
497  "rsMkCollR: rsCollCreate - coll %s already exist.stat = %d",
498  tmpPath, status );
499  status = 0;
500  }
501  else {
503  "rsMkCollR: rsCollCreate failed for %s, status =%d",
504  tmpPath, status );
505  }
506  // =-=-=-=-=-=-=-
507  return status;
508  }
509  while ( tmpLen && tmpPath[tmpLen] != '\0' ) {
510  tmpLen ++;
511  }
512  }
513  return 0;
514 }
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
DataObjInp::objPath
char objPath[(1024+64)]
Definition: dataObjInpOut.h:66
specificQueryInp_t::maxRows
int maxRows
Definition: specificQuery.h:13
COL_COLL_OWNER_ZONE
#define COL_COLL_OWNER_ZONE
Definition: rodsGenQuery.h:192
MAX_SQL_ROWS
#define MAX_SQL_ROWS
Definition: rodsGenQuery.h:16
NULL
#define NULL
Definition: rodsDef.h:70
rsCollCreate
int rsCollCreate(rsComm_t *rsComm, collInp_t *collCreateInp)
Definition: rsCollCreate.cpp:52
appendRandomToPath
int appendRandomToPath(char *trashPath)
Definition: rcMisc.cpp:2348
rstrcat
char * rstrcat(char *dest, const char *src, int maxLen)
Definition: stringOpr.cpp:75
rsComm_t
Definition: rcConnect.h:145
True
#define True
Definition: parseCommandLine.h:11
DataObjCopyInp::srcDataObjInp
dataObjInp_t srcDataObjInp
Definition: dataObjCopy.h:26
COL_DATA_REPL_NUM
#define COL_DATA_REPL_NUM
Definition: rodsGenQuery.h:166
rsReadCollection
int rsReadCollection(rsComm_t *rsComm, int *handleInxInp, collEnt_t **collEnt)
Definition: rsReadCollection.cpp:15
addKeyVal
int addKeyVal(keyValPair_t *condInput, const char *keyWord, const char *value)
Definition: rcMisc.cpp:789
rsQueryCollInColl
int rsQueryCollInColl(rsComm_t *rsComm, char *collection, genQueryInp_t *genQueryInp, genQueryOut_t **genQueryOut)
Definition: collection.cpp:204
rsOpenCollection
int rsOpenCollection(rsComm_t *rsComm, collInp_t *openCollInp)
Definition: rsOpenCollection.cpp:16
SYS_INTERNAL_NULL_INPUT_ERR
@ SYS_INTERNAL_NULL_INPUT_ERR
Definition: rodsErrorTable.h:92
DataObjCopyInp
Definition: dataObjCopy.h:25
specColl.hpp
isCollEmpty
int isCollEmpty(rsComm_t *rsComm, char *collection)
Definition: collection.cpp:229
CollInp
Definition: dataObjInpOut.h:157
UNMATCHED_KEY_OR_INDEX
@ UNMATCHED_KEY_OR_INDEX
Definition: rodsErrorTable.h:244
SqlResult::attriInx
int attriInx
Definition: rodsGenQuery.h:62
userInfo_t::userName
char userName[64]
Definition: rodsUser.h:66
SpecCollCacheHead
specCollCache_t * SpecCollCacheHead
Definition: irods_server_globals.cpp:49
CATALOG_ALREADY_HAS_ITEM_BY_THAT_NAME
@ CATALOG_ALREADY_HAS_ITEM_BY_THAT_NAME
Definition: rodsErrorTable.h:424
USER_NAME_CLIENT_KW
#define USER_NAME_CLIENT_KW
Definition: rodsKeyWdDef.h:164
specificQueryInp_t::continueInx
int continueInx
Definition: specificQuery.h:14
COL_COLL_OWNER_NAME
#define COL_COLL_OWNER_NAME
Definition: rodsGenQuery.h:191
GenQueryInp
Definition: rodsGenQuery.h:24
rcMisc.h
ACCESS_PERMISSION_KW
#define ACCESS_PERMISSION_KW
Definition: rodsKeyWdDef.h:185
trySpecificQueryDataObjInCollReCur
int trySpecificQueryDataObjInCollReCur(rsComm_t *rsComm, char *collection, genQueryOut_t **genQueryOut)
Definition: collection.cpp:78
rsOpenCollection.hpp
LONG_NAME_LEN
#define LONG_NAME_LEN
Definition: rodsDef.h:57
dataObjRename.h
specificQueryInp_t::args
char * args[10]
Definition: specificQuery.h:10
COL_COLL_ID
#define COL_COLL_ID
Definition: rodsGenQuery.h:188
addInxVal
int addInxVal(inxValPair_t *inxValPair, int inx, const char *value)
Definition: rcMisc.cpp:921
LOG_ERROR
#define LOG_ERROR
Definition: rodsLog.h:43
CollInp::flags
int flags
Definition: dataObjInpOut.h:159
collCreate.h
rsReadCollection.hpp
readCollection.h
GenQueryInp::selectInp
inxIvalPair_t selectInp
Definition: rodsGenQuery.h:53
GenQueryInp::maxRows
int maxRows
Definition: rodsGenQuery.h:25
GenQueryOut::sqlResult
sqlResult_t sqlResult[50]
Definition: rodsGenQuery.h:72
specificQueryInp_t
Definition: specificQuery.h:8
COL_COLL_MODIFY_TIME
#define COL_COLL_MODIFY_TIME
Definition: rodsGenQuery.h:197
rsSpecificQuery
int rsSpecificQuery(rsComm_t *rsComm, specificQueryInp_t *specificQueryInp, genQueryOut_t **genQueryOut)
Definition: rsSpecificQuery.cpp:16
collStatAllKinds
int collStatAllKinds(rsComm_t *rsComm, dataObjInp_t *dataObjInp, rodsObjStat_t **rodsObjStatOut)
Definition: collection.cpp:405
RENAME_DATA_OBJ
#define RENAME_DATA_OBJ
Definition: dataObjInpOut.h:177
rsCloseCollection
int rsCloseCollection(rsComm_t *rsComm, int *handleInxInp)
Definition: rsCloseCollection.cpp:14
freeRodsObjStat
int freeRodsObjStat(rodsObjStat_t *rodsObjStat)
Definition: rcMisc.cpp:3537
COLL_OBJ_T
@ COLL_OBJ_T
Definition: rodsType.h:39
closeCollection.h
COL_DATA_NAME
#define COL_DATA_NAME
Definition: rodsGenQuery.h:165
rsComm_t::rError
rError_t rError
Definition: rcConnect.h:158
rsSpecificQuery.hpp
COL_D_RESC_NAME
#define COL_D_RESC_NAME
Definition: rodsGenQuery.h:171
RODS_ZONE_CLIENT_KW
#define RODS_ZONE_CLIENT_KW
Definition: rodsKeyWdDef.h:165
getSqlResultByInx
sqlResult_t * getSqlResultByInx(genQueryOut_t *genQueryOut, int attriInx)
Definition: rcMisc.cpp:1387
rsQueryDataObjInCollReCur
int rsQueryDataObjInCollReCur(rsComm_t *rsComm, char *collection, genQueryInp_t *genQueryInp, genQueryOut_t **genQueryOut, char *accessPerm, int singleFlag)
Definition: collection.cpp:131
LOG_DEBUG
#define LOG_DEBUG
Definition: rodsLog.h:23
genAllInCollQCond
int genAllInCollQCond(char *collection, char *collQCond)
Definition: miscUtil.cpp:262
collStat
int collStat(rsComm_t *rsComm, dataObjInp_t *dataObjInp, rodsObjStat_t **rodsObjStatOut)
Definition: collection.cpp:271
specificQueryInp_t::sql
char * sql
Definition: specificQuery.h:9
TIME_LEN
#define TIME_LEN
Definition: rodsDef.h:54
GenQueryInp::condInput
keyValPair_t condInput
Definition: rodsGenQuery.h:52
irods::get_virtual_path_separator
std::string get_virtual_path_separator()
Definition: irods_virtual_path.cpp:11
rsDataObjRename.hpp
CollEnt
Definition: miscUtil.h:113
GenQueryInp::sqlCondInp
inxValPair_t sqlCondInp
Definition: rodsGenQuery.h:56
DataObjInp
Definition: dataObjInpOut.h:65
OBJ_PATH_DOES_NOT_EXIST
@ OBJ_PATH_DOES_NOT_EXIST
Definition: rodsErrorTable.h:279
genQuery.h
MAX_NAME_LEN
#define MAX_NAME_LEN
Definition: rodsDef.h:61
rsDataObjRename
int rsDataObjRename(rsComm_t *rsComm, dataObjCopyInp_t *dataObjRenameInp)
Definition: rsDataObjRename.cpp:42
addInxIval
int addInxIval(inxIvalPair_t *inxIvalPair, int inx, int value)
Definition: rcMisc.cpp:883
rmKeyVal
int rmKeyVal(keyValPair_t *condInput, const char *keyWord)
Definition: rcMisc.cpp:710
rsMkCollR
int rsMkCollR(rsComm_t *rsComm, const char *startColl, const char *destColl)
Definition: collection.cpp:428
CollInp::condInput
keyValPair_t condInput
Definition: dataObjInpOut.h:161
GenQueryOut
Definition: rodsGenQuery.h:67
SEL_OBJ_TYPE_KW
#define SEL_OBJ_TYPE_KW
Definition: rodsKeyWdDef.h:71
collType
ReIterableType collType(Res *coll)
Definition: functions.cpp:323
COL_COLL_PARENT_NAME
#define COL_COLL_PARENT_NAME
Definition: rodsGenQuery.h:190
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
GenQueryOut::attriCnt
int attriCnt
Definition: rodsGenQuery.h:69
userInfo_t::rodsZone
char rodsZone[64]
Definition: rodsUser.h:67
collection.hpp
LOG_NOTICE
#define LOG_NOTICE
Definition: rodsLog.h:33
rsComm_t::clientUser
userInfo_t clientUser
Definition: rcConnect.h:153
COL_COLL_TYPE
#define COL_COLL_TYPE
Definition: rodsGenQuery.h:198
int
typedef int((*funcPtr)())
_rsObjStat
int _rsObjStat(rsComm_t *rsComm, dataObjInp_t *dataObjInp, rodsObjStat_t **rodsObjStatOut)
Definition: rsObjStat.cpp:111
SqlResult::value
char * value
Definition: rodsGenQuery.h:64
specificQuery.h
DataObjCopyInp::destDataObjInp
dataObjInp_t destDataObjInp
Definition: dataObjCopy.h:27
isTrashPath
int isTrashPath(char *myPath)
Definition: rcMisc.cpp:2395
rsObjStat.hpp
matchSpecCollCache
specCollCache_t * matchSpecCollCache(char *objPath)
Definition: specColl.cpp:236
DataObjInp::oprType
int oprType
Definition: dataObjInpOut.h:72
irods_virtual_path.hpp
CAT_NO_ROWS_FOUND
@ CAT_NO_ROWS_FOUND
Definition: rodsErrorTable.h:423
SqlResult
Definition: rodsGenQuery.h:61
COL_COLL_NAME
#define COL_COLL_NAME
Definition: rodsGenQuery.h:189
CAT_NAME_EXISTS_AS_DATAOBJ
@ CAT_NAME_EXISTS_AS_DATAOBJ
Definition: rodsErrorTable.h:449
replSpecColl
int replSpecColl(specColl_t *inSpecColl, specColl_t **outSpecColl)
Definition: rcMisc.cpp:778
CollInp::collName
char collName[(1024+64)]
Definition: dataObjInpOut.h:158
checkCollAccessPerm
int checkCollAccessPerm(rsComm_t *rsComm, char *collection, char *accessPerm)
Definition: collection.cpp:35
COL_COLL_CREATE_TIME
#define COL_COLL_CREATE_TIME
Definition: rodsGenQuery.h:196
rodsObjStat
Definition: objStat.h:8
queueSpecCollCache
int queueSpecCollCache(rsComm_t *rsComm, genQueryOut_t *genQueryOut, char *objPath)
Definition: specColl.cpp:83
False
#define False
Definition: parseCommandLine.h:12
rsGenQuery.hpp
rstrcpy
char * rstrcpy(char *dest, const char *src, int maxLen)
Definition: stringOpr.cpp:51
COL_D_DATA_PATH
#define COL_D_DATA_PATH
Definition: rodsGenQuery.h:172
COL_COLL_INFO1
#define COL_COLL_INFO1
Definition: rodsGenQuery.h:199
DataObjInp::condInput
keyValPair_t condInput
Definition: dataObjInpOut.h:74
freeGenQueryOut
int freeGenQueryOut(genQueryOut_t **genQueryOut)
Definition: rcMisc.cpp:1133
NAME_LEN
#define NAME_LEN
Definition: rodsDef.h:55
rsCollCreate.hpp
clearKeyVal
int clearKeyVal(keyValPair_t *condInput)
Definition: rcMisc.cpp:1047
clearGenQueryInp
void clearGenQueryInp(void *voidInp)
Definition: rcMisc.cpp:1118
COL_COLL_INFO2
#define COL_COLL_INFO2
Definition: rodsGenQuery.h:200
rsGenQuery
int rsGenQuery(rsComm_t *rsComm, genQueryInp_t *genQueryInp, genQueryOut_t **genQueryOut)
Definition: rsGenQuery.cpp:604
rsCloseCollection.hpp
SpecCollCache::specColl
specColl_t specColl
Definition: objInfo.h:104
freeRErrorContent
int freeRErrorContent(rError_t *myError)
Definition: rcMisc.cpp:182
SpecCollCache
Definition: objInfo.h:102
isCollAllKinds
int isCollAllKinds(rsComm_t *rsComm, char *objName, rodsLong_t *collId)
Definition: objMetaOpr.cpp:186
objMetaOpr.hpp
COL_D_RESC_ID
#define COL_D_RESC_ID
Definition: rodsGenQuery.h:185
COL_D_DATA_ID
#define COL_D_DATA_ID
Definition: rodsGenQuery.h:163
USER__NULL_INPUT_ERR
@ USER__NULL_INPUT_ERR
Definition: rodsErrorTable.h:247