---
name: "globus_rls_client_queryresult"
section: "3"
platform: "linux"
package: "libglobus-rls-client-doc"
version: "5.2-8"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_rls_client_queryresult"
---

# globus\_rls\_client\_queryresult(3)

## NAME

Query Results -

### Data Structures

struct **globus\_rls\_attribute\_object\_t**\
 **globus\_rls\_client\_lrc\_attr\_search()** *returns a list of these structures which include the object name (LFN or PFN) and attribute value found by the query.*  struct **globus\_rls\_string2\_t**\
 *String pair result.*  struct **globus\_rls\_string2\_bulk\_t**\
 *String pair result with return code, returned by bulk query operations.*

### Functions

globus\_result\_t **globus\_rls\_client\_free\_list** (globus\_list\_t \*list)\

## Detailed Description

List results are returned as globus\_list\_t's, list datums depend on the type of query (eg **globus\_rls\_string2\_t**, **globus\_rls\_attribute\_t**, etc).

A list result should be freed with **globus\_rls\_client\_free\_list()** when it's no longer needed. RLS supports limiting the number of results returned by a single query using an offset and reslimit. The offset specifies which result to begin with, reslimit specifies how many results to return. Offset should begin at 0 to retrieve all records. If reslimit is 0 then all results are returned at once, unless the server has a limit on results configured. If NULL is passed as the offset argument then the API will repeatedly call the query function until are results are retrieved. The following are equivalent examples of how to print the lfn,pfn pairs returned by **globus\_rls\_client\_lrc\_get\_lfn()**:

```
   globus_list_t *str2_list;
   globus_list_t *p;
   globus_rls_string2_t *str2;
   // Retrieve all results, API will handle looping through partial results
   // if the server has a limit configured.  Error handling has been omitted.
   globus_rls_client_lrc_get_lfn(h, "somepfn", NULL, 0, &str2_list);
   for (p = str2_list; p; p = globus_list_rest(p)) {
     str2 = (globus_rls_string2_t *) globus_list_first(p);
     printf("lfn: %s pfn:%s0, str2->s1, str2->s2);
   }
   globus_rls_client_free_list(str2_list);
   // This code fragment retrieves results 5 at a time.  Note offset is set
   // to -1 when the server has no more results to return.
   int offset = 0;
   while (globus_rls_client_lrc_get_lfn(h, "somepfn", &offset, 5, &str2_list) == GLOBUS_SUCCESS) {
     for (p = str2_list; p; p = globus_list_rest(p)) {
       str2 = (globus_rls_string2_t *) globus_list_first(p);
       printf("lfn: %s pfn:%s0, str2->s1, str2->s2);
     }
     globus_rls_client_free_list(str2_list);
     if (offset == -1)
       break;
   }
   .fi
```

## Function Documentation

### globus\_result\_t globus\_rls\_client\_free\_list (globus\_list\_t \*list)

Free result list returned by one of the query functions. **Parameters:**

*list* List returned by one of the query functions.

**Return values:**

*GLOBUS\_SUCCESS* List and contents successfully freed.

## Author

Generated automatically by Doxygen for globus rls client from the source code.
