Skip to content

Commit

Permalink
[irods#8088] Deprecate fillGenQueryInpFromStrCond().
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn authored and alanking committed Dec 17, 2024
1 parent 5e6e775 commit d8de445
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/core/include/irods/irods_query.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,12 @@ namespace irods
addKeyVal(&gen_input_.condInput, ZONE_KW, _zone_hint.c_str());
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
const int fill_err = fillGenQueryInpFromStrCond(
const_cast<char*>(_query_string.c_str()),
&gen_input_);
#pragma GCC diagnostic pop
if(fill_err < 0) {
THROW(fill_err, fmt::format("query fill failed for [{}]", _query_string));
}
Expand Down
2 changes: 1 addition & 1 deletion lib/core/include/irods/rcMisc.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ int getNextRepeatTime(char* currTime, char* delayStr, char* nextTime);

int printError(rcComm_t* Conn, int status, char* routineName);

int fillGenQueryInpFromStrCond(char* str, genQueryInp_t* genQueryInp);
__attribute__((deprecated("Use GenQuery2 API."))) int fillGenQueryInpFromStrCond(char* str, genQueryInp_t* genQueryInp);

int printGenQueryOut(FILE* fd, char* format, char* hint, genQueryOut_t* genQueryOut);

Expand Down
6 changes: 6 additions & 0 deletions server/re/src/genQueryMS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ int msiExecStrCondQuery( msParam_t* queryParam, msParam_t* genQueryOutParam, rul
strcpy( query, ( const char* )queryParam->inOutStruct );

memset( &genQueryInp, 0, sizeof( genQueryInp_t ) );
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
i = fillGenQueryInpFromStrCond( query, &genQueryInp );
#pragma GCC diagnostic pop
free( query );
if ( i < 0 ) {
return i;
Expand Down Expand Up @@ -533,7 +536,10 @@ msiMakeGenQuery( msParam_t* selectListStr, msParam_t* condStr, msParam_t* genQue
/* set up GenQueryInp */
genQueryInp->maxRows = MAX_SQL_ROWS;
genQueryInp->continueInx = 0;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
rei->status = fillGenQueryInpFromStrCond( query, genQueryInp );
#pragma GCC diagnostic pop
if ( rei->status < 0 ) {
rodsLog( LOG_ERROR, "msiMakeGenQuery: fillGenQueryInpFromStrCond failed." );
freeGenQueryInp( &genQueryInp );
Expand Down

0 comments on commit d8de445

Please sign in to comment.