GetQueryEntityDefNames

Description

Restituisce i nomi dei tipi di record adatti all'utilizzo nelle interrogazioni.

È possibile utilizzare uno qualsiasi dei nomi restituiti da questo metodo nel parametro entitydef_name per il metodo BuildQuery. (È inoltre possibile richiamare un oggetto EntityDef richiamando il metodo GetEntityDef.)

Nota: è possibile utilizzare i tipi di record creati in Rational ClearQuest nelle interrogazioni, in modo che il vettore restituito non sia mai vuoto.

Sintassi

VBScript

session.GetQueryEntityDefNames 

Perl

$session->GetQueryEntityDefNames(); 
Identificativo
Description
session
L'oggetto Session che rappresenta la sessione di accesso al database corrente.
Valore di ritorno
Per Visual Basic, viene restituito un valore Variant che contiene un vettore di stringhe. Ciascun valore String contiene il nome di un EntityDef che è possibile utilizzare in un'interrogazione.

Per Perl, viene restituito un riferimento a un vettore di stringhe.

Esempi

VBScript

set sessionObj = GetSession 
' Get the list of names of the record types that support queries.
entityDefNames = sessionObj.GetQueryEntityDefNames 

' Iterate over all record types 
for each name in entityDefNames 
   set queryDefObj = sessionObj.BuildQuery(name) 
   ' Fill in the query parameters and run it
   Next 

Perl

$sessionObj = $entity->GetSession();


# Get the list of names of the record types that support queries.

$entityDefNames = $sessionObj->GetQueryEntityDefNames();

#Iterate over the state-based record types
foreach $name ( @$entityDefNames ){
   $queryDefObj = $sessionObj->BuildQuery( $name );

   #Fill in the query parameters and run it

   # ...

   } 


Feedback