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)  

keyValPairMS.cpp File Reference
#include "icatHighLevelRoutines.hpp"
#include "rcMisc.h"
#include "irods_re_structs.hpp"
Include dependency graph for keyValPairMS.cpp:

Go to the source code of this file.

Functions

int msiGetValByKey (msParam_t *inKVPair, msParam_t *inKey, msParam_t *outVal, ruleExecInfo_t *rei)
 
int msiPrintKeyValPair (msParam_t *where, msParam_t *inkvpair, ruleExecInfo_t *rei)
 
int msiString2KeyValPair (msParam_t *inBufferP, msParam_t *outKeyValPairP, ruleExecInfo_t *rei)
 
int msiString2StrArray (msParam_t *inBufferP, msParam_t *outStrArrayP, ruleExecInfo_t *rei)
 
int msiStrArray2String (msParam_t *inSAParam, msParam_t *outStr, ruleExecInfo_t *rei)
 
int msiAddKeyVal (msParam_t *inKeyValPair, msParam_t *key, msParam_t *value, ruleExecInfo_t *rei)
 

Function Documentation

◆ msiAddKeyVal()

int msiAddKeyVal ( msParam_t inKeyValPair,
msParam_t key,
msParam_t value,
ruleExecInfo_t rei 
)
Description:\n Adds a new key and value to a keyValPair_t
Module:\n core
Note
A new keyValPair_t is created if inKeyValPair is NULL.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in,out]inKeyValPair- Optional - a KeyValPair_MS_T
[in]key- Required - A STR_MS_T containing the key
[in]value- Optional - A STR_MS_T containing the value
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n none
Session Variables Modified:\n none
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 350 of file keyValPairMS.cpp.

References addKeyVal(), MsParam::inOutStruct, KeyValPair_MS_T, LOG_ERROR, NULL, parseMspForStr(), RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, RuleExecInfo::status, SYS_INTERNAL_NULL_INPUT_ERR, MsParam::type, USER__NULL_INPUT_ERR, USER_PARAM_TYPE_ERR, and get_irods_version::value.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiGetValByKey()

int msiGetValByKey ( msParam_t inKVPair,
msParam_t inKey,
msParam_t outVal,
ruleExecInfo_t rei 
)
Description:\n Given a list of KVPairs and a Key, this microservice gets the corresponding value.
Module:\n core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]inKVPair- This msParam is of type KeyValPair_PI which is a KeyValPair List.
[in]inKey- This msParam is of type STR_MS_T which is a key.
[out]outVal- This msParam is of type STR_MS_T which is a value corresponding to key.
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n none
Session Variables Modified:\n none
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 46 of file keyValPairMS.cpp.

References fillStrInMsParam(), getValByKey(), MsParam::inOutStruct, MsParam::label, NULL, RE_TEST_MACRO, and UNMATCHED_KEY_OR_INDEX.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiPrintKeyValPair()

int msiPrintKeyValPair ( msParam_t where,
msParam_t inkvpair,
ruleExecInfo_t rei 
)
Description:\n Prints key-value pairs to rei's stdout separated by " = "
Module:\n core
Since
pre-2.1
Note
msiExecStrCondQuery is used to run the query: "SELECT DATA_NAME, DATA_REPL_NUM, DATA_CHECKSUM WHERE DATA_NAME LIKE 'foo%'". The result is printed using msiPrintKeyValPair, which prints each row as an attribute-value pair.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]where- a msParam of type STR_MS_T which is either stderr or stdout.
[in]inkvpair- a msParam of type KeyValPair_PI which is a KeyValPair list (structure).
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n none
Session Variables Modified:\n none
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 100 of file keyValPairMS.cpp.

References MsParam::inOutStruct, KeyValPair::keyWord, get_db_schema_version::l, KeyValPair::len, NULL, RE_TEST_MACRO, KeyValPair::value, and writeString().

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiStrArray2String()

int msiStrArray2String ( msParam_t inSAParam,
msParam_t outStr,
ruleExecInfo_t rei 
)
Description:\n Array of Strings converted to a string separated by %-signs
Module:\n core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]inSAParam- a msParam of type strArr_MS_T which is an array of strings.
[out]outStr- a msParam of type STR_MS_T which a string with %-separators.
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n none
Session Variables Modified:\n none
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
msiString2KeyValPair

Definition at line 293 of file keyValPairMS.cpp.

References MsParam::inOutStruct, StrArray::len, RE_TEST_MACRO, StrArray::size, STR_MS_T, MsParam::type, and StrArray::value.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

◆ msiString2KeyValPair()

int msiString2KeyValPair ( msParam_t inBufferP,
msParam_t outKeyValPairP,
ruleExecInfo_t rei 
)

Definition at line 165 of file keyValPairMS.cpp.

References addKeyVal(), buf, MsParam::inOutStruct, KeyValPair_MS_T, StrArray::len, NULL, parseMultiStr(), RE_TEST_MACRO, StrArray::size, MsParam::type, StrArray::value, and get_irods_version::value.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiString2StrArray()

int msiString2StrArray ( msParam_t inBufferP,
msParam_t outStrArrayP,
ruleExecInfo_t rei 
)

Definition at line 235 of file keyValPairMS.cpp.

References buf, MsParam::inOutStruct, NULL, parseMultiStr(), RE_TEST_MACRO, STR_MS_T, StrArray_MS_T, MsParam::type, and USER_PARAM_TYPE_ERR.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function: