Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
IRodsSearch Struct Reference

A set of SearchTerms to use when running a search. More...

#include <meta_search.h>

Collaboration diagram for IRodsSearch:
[legend]

Public Member Functions

IRodsSearchAllocateIRodsSearch (void)
 Allocate an IRodsSearch. More...
 
void FreeIRodsSearch (IRodsSearch *search_p)
 Free an IRodsSearch. More...
 
void ClearIRodsSearch (IRodsSearch *search_p)
 Clear an IRodsSearch. More...
 
QueryResultsDoIRodsSearch (IRodsSearch *search_p, struct IRodsConnection *connection_p)
 Perform an iRODS search. More...
 
bool AddMetadataDataAttributeSearchTerm (IRodsSearch *search_p, const char *clause_s, const char *key_s, const char *op_s, const char *value_s)
 Create and add a SearchTerm to an IRodsSearch. More...
 
bool AddIRodsSearchTerm (IRodsSearch *search_p, const char *clause_s, const char *key_s, const int key_id, const char *op_s, const char *value_s, const int value_id)
 Add a search term to an IRodsSearch. More...
 
int32 DetermineSearchTerms (LinkedList *terms_p, const json_t *json_p)
 Parse a JSON fragment and add SearchTermNodes to a LinkedList. More...
 

Data Fields

LinkedListis_search_terms_p
 A LinkedList of SearchTermNodes. More...
 

Detailed Description

A set of SearchTerms to use when running a search.

Member Function Documentation

◆ AllocateIRodsSearch()

IRodsSearch * AllocateIRodsSearch ( void  )

Allocate an IRodsSearch.

Returns
A newly-allocated IRodsSearch or NULL upon error.

◆ FreeIRodsSearch()

void FreeIRodsSearch ( IRodsSearch search_p)

Free an IRodsSearch.

Parameters
search_pThe IRodsSearch to free.

◆ ClearIRodsSearch()

void ClearIRodsSearch ( IRodsSearch search_p)

Clear an IRodsSearch.

Parameters
search_pThe IRodsSearch to clear.

◆ DoIRodsSearch()

QueryResults * DoIRodsSearch ( IRodsSearch search_p,
struct IRodsConnection connection_p 
)

Perform an iRODS search.

Parameters
search_pThe IRodsSearch to perform.
connection_pThe connection to the iRODS server to perform the search on.
Returns
The QueryResults from the search.

◆ AddMetadataDataAttributeSearchTerm()

bool AddMetadataDataAttributeSearchTerm ( IRodsSearch search_p,
const char *  clause_s,
const char *  key_s,
const char *  op_s,
const char *  value_s 
)

Create and add a SearchTerm to an IRodsSearch.

This adds a search term in the form of a key op value triplet as described in AddIRodsSearchTerm

Parameters
search_pThe IRodsSearch to add the SearchTerm to.
clause_sThe search term's clause.
key_sThe search term's key.
op_sThe search term's operation such as "=", "<", etc.
value_sThe search term's value.
Returns
true if the search term was added successfully, false otherwise.
See also
AddIRodsSearchTerm

◆ AddIRodsSearchTerm()

bool AddIRodsSearchTerm ( IRodsSearch search_p,
const char *  clause_s,
const char *  key_s,
const int  key_id,
const char *  op_s,
const char *  value_s,
const int  value_id 
)

Add a search term to an IRodsSearch.

This adds a search term in the form of a key op value triplet. For example key could be "foo", value = "bar" and op = "="

Parameters
search_pThe IRodsSearch to add the term to.
clause_sThe search term's clause.
key_sThe search term's key.
key_idThe id of the key's column.
op_sThe search term's operation such as "=", "<", etc.
value_sThe search term's value.
value_idThe id of the value's column.
Returns
true if the search term was added successfully, false otherwise.

◆ DetermineSearchTerms()

int32 DetermineSearchTerms ( LinkedList terms_p,
const json_t *  json_p 
)

Parse a JSON fragment and add SearchTermNodes to a LinkedList.

Parameters
terms_pThe LinkedList where the SearchTermNodes will get added.
json_pThe JSON fragment to parse. The JSON is of the form:
{
"key": "key_value",
"key_id": key_id,
"value": "value_value",
"value_id": value_id,
"clause": "clause_value"
}
Returns
The number of search terms added.

Field Documentation

◆ is_search_terms_p

LinkedList* is_search_terms_p

A LinkedList of SearchTermNodes.

See also
SearchTermNode

The documentation for this struct was generated from the following file: