GetInstalledDbSets

Description

(Perl only) For Visual Basic, see GetInstalledMasters.

Returns the list of registered database sets.

The value returned is an array reference. The returned values of GetInstalledDbSetsand GetInstalledMasterDbs always contain the same number of strings. The contents of both are ordered so that each schema repository (master database) listed in GetInstalledMasterDbs belongs to the database set at the same index in GetInstalledDbSets

Syntax

Perl


$session->GetInstalledDbSets(); 
Identifier
Description
session
The Session object that represents the current database-access session.
Return value
Returns a reference to an array of strings for the database sets.

Examples

Perl

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

use CQPerlExt;

# Create the session object...
$Session = CQSession::Build()
or die "Couldn't create the Compass '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);