GetInstalledMasterDbs

説明

(Perl のみ) Visual Basic の場合は、「GetInstalledMasters」を参照してください。

登録されたスキーマ リポジトリ (マスター データベース) のリストを戻します。

戻される値は配列参照です。GetInstalledDbSets および GetInstalledMasterDbs の戻り値には、常に同じ数の文字列が含まれています。両者の内容は順序付けられているので、GetInstalledMasterDbs にリストされている各スキーマ リポジトリ (マスター データベース) は、GetInstalledDbSets の同じインデックスでのデータベース セットに属します。

構文

Perl

$session->GetInstalledMasterDbs(); 
識別子
説明
session
現在のデータベース アクセス セッションを表す Session オブジェクト。
戻り値
マスター データベース セットの文字列の配列への参照を戻します。

Perl

# This program runs in the context of a
# external  program (not from within a hook)...

use CQPerlExt;

# Create the session object...
$Session = CQSession::Build()
or die "Couldn't create the ClearQuest 'session' object.¥n";

# Get the list of master databases and dbsets installed on this
# machine; note that both functions return references to
# arrays...

my($MasterDBsREF) = $Session->GetInstalledMasterDbs();
my(@MasterDBs) = @$MasterDBsREF;
my($DbSetsREF) = $Session->GetInstalledDbSets();
my(@DbSets) = @$DbSetsREF;
my($N) = $#MasterDBs;

printf ("There are %d DbSet(s) installed on this machine.¥n", ($N+1));

for (my($i)=0; $i <= $N; $i++) {
print "DbSet #" . $i . ": " .
" DbSet=" . $DbSets[$i] .
" MasterDB=" . $MasterDBs[$i] .
"¥n";
}

CQSession::Unbuild($Session); 

フィードバック