Documents > BPS V2 Script API
bps::installer::Installer Class Reference

The Installer class serves to install or update a BPS datastore. More...

List of all members.

Public Member Functions

 Installer (Datastore aDatastore)
 The constructor.
void latestLevel ()
void setup (String aSchema, Number aPin, String aTsData, String aTsIndex)
 Execute the basic setup for a new datastore.
void setVerbose (Number aVerbosity)
 Set amount of information to log.
void update (Number aMaxLevel)
 Update an existing datastore to the latest level.
Number verbose ()

Detailed Description

The Installer class serves to install or update a BPS datastore.

It will normally be called by the scripts createdb.js and updatedb.js.


Constructor & Destructor Documentation

bps::installer::Installer::Installer ( Datastore  aDatastore)

The constructor.

Depending on the task to perform, the database connection needs to be made different:

When creating a new datastore with setup(), initial connection should be as DBA (Oracle) or Superuser (PostgreSQL). During setup() the datastore will reconnect as the BPS owner of the new datastore.

When updating the datastore with update(), the initial connection should be as BPS owner of the datastore.

Parameters:
aDatastoreDatastore object in connected state.

Member Function Documentation

void bps::installer::Installer::latestLevel ( )
Returns:
The latest database level.
void bps::installer::Installer::setup ( String  aSchema,
Number  aPin,
String  aTsData,
String  aTsIndex 
)

Execute the basic setup for a new datastore.

Parameters:
aSchemaName of the new schema and BPS owner.
aPinPIN of the new BPS owner.
aTsDataTablespace name to store data.
aTsIndexTablespace name to store indexes. May be the same as aTsData.
void bps::installer::Installer::setVerbose ( Number  aVerbosity)

Set amount of information to log.

Parameters:
aVerbosity0=No loggin, 1=Actions only, 2=Actions and SQL statements.
void bps::installer::Installer::update ( Number  aMaxLevel)

Update an existing datastore to the latest level.

Parameters:
aMaxLevelThe maximum level to update to.
See also:
latestLevel()
Number bps::installer::Installer::verbose ( )
Returns:
Amount of information to log.