IRubricator.AlterAndSave

Syntax

AlterAndSave;

Description

The AlterAndSave method creates or updates system tables of time series database.

Example

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

Sub UserProc;
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 UserProc;

After executing the example the OBJ_FC_EX time series database with all its system tables is created in the repository. The system tables are located in the time series database.

See also:

IRubricator