Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
themeConfluence
EdmiError edmiGetQueryResultColumnBN (SdaiQueryResult  qResult,
                                       SdaiInteger      rowNumber, 
                                       /* [SdaiString columnName, 
                                       SdaiPrimitiveType valueType, 
                                        void *value] */ 
                                          ...);

Reads a single data element contained in a table-formatted query result. The data element must be identified by its row number and its column name.

...

This function is only applicable on the results from query functions that are invoked with the option RESULT_AS_TABLE.

...

Arguments

...

See section SDAI Data Types
TypeNameComment
SdaiQueryResult

qResult

The returned result of a query function. This parameter must be the result of a query that was called with the option [RESULT_AS_TABLE]. See edmiExecuteQueryBN.

SdaiInteger

rowNumber

The row number to read in the query result table. The number of rows in the table is stored in the rows element of the <qResult> data structure.

SdaiString

columnName

The name of the column for which to read a value.

SdaiPrimitiveType

valueType

The primitive type of the data element to be read.

 

void

value

Variable that will receive the value identified by its <rowNumber> and <columnName>.

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

Options

...

 

Example

...

 

Code Block
languagecpp
EdmiError rstat;
 int i;
 SdaiString name;
 SdaiQueryResult queryResult;
 SdaiModel modId;
 /* Execute the query function */
 rstat = edmiExecuteQueryBN(modId, "FriendQuerySchema",
 "GetFriendsBySexAndName",  
 2, RESULT_AS_TABLE, &queryResult,

...

  
 sdaiSTRING, "*",

...

 
 sdaiENUMERATION, "MALE");

...

 
 printf("My male friends are:");

...


 for (i=0;i<queryResult->rows;i++) {

...


 if (rstat = edmiGetQueryResultColumnBN(queryResult, i,

...

 
 "NAME", sdaiSTRING, &name )) {

...

 
 printf("\nError %d in edmiGetQueryResultColumnBN: %s", rstat,

...

 
 edmiGetErrorText(rstat));

...

 
 goto err;

...

 
 } 
 printf("\n%s", name);

...

 
 } 
 edmiFreeQueryResult(queryResult);

...


 . . .

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"