IRubricator.DatabaseEx

Syntax

DatabaseEx: IDatabase;

Description

The DatabaseEx property determines a database for a time series database.

Comments

If this property is not determined, database of the MDM repository specified in the IRubricator.Database property is used.

Example

Executing the example requires that the repository contains a database with the OBJ_DB identifier and an MDM repository with the MDM_REPO identifier.

Sub Main;

Var

Mb: IMetabase;

Inf: IMetabaseObjectCreateInfo;

Obj: IMetabaseObjectDescriptor;

Cat: IRubricator;

Rds: IRdsDatabase;

Database: IDatabase;

Begin

Mb := MetabaseClass.Active;

Inf := Mb.CreateCreateInfo;

Inf.Id := "OBJ_FC_EX";

Inf.Name := Inf.Id;

Inf.ClassId := MetabaseObjectClass.KE_CLASS_RUBRICATOR;

Inf.Parent := Mb.Root;

Inf.KeepEdit := True;

Obj := Mb.CreateObject(Inf);

Cat := (Obj As IRubricator);

Rds := Mb.ItemById("RDS_REPO").Bind As IRdsDatabase;

Cat.Database := Rds;

Database := Mb.ItemById("OBJ_DB").Bind As IDatabase;

Cat.DatabaseEx := Database;

Cat.CreateFacts;

Cat.AutoUnits := True;

Cat.CalendarLevels := DimCalendarLevelSet.Year Or DimCalendarLevelSet.Quarter;

Cat.AlterAndSave;

End Sub Main;

After executing the example the OBJ_FC_EX time series database with all its system tables is created in the repository. A database other than MDM repository database is specified for the time series database that is why system tables are stored in the time series database.

See also:

IRubricator