IRubricatorCopier.Copy

Syntax

Copy;

Description

The Copy method copies time series database

Comments

Specify value of the IRubricatorCopier.CopyInfo property for the proper method performance.

Example

Executing the example requires a time series database with the TSDB identifier and a folder with the F_TSDB_COPY identifier.

Add links to the Cubes and Metabase system assemblies.

Sub UserCopy;
Var
    MB: IMetabase;
    pCopier: IRubricatorCopier;
    CInfo: IMetabaseObjectCopyInfo;
Begin
    // Get current repository
    MB := MetabaseClass.Active;
    // Create an object for copying a repository object
    CInfo := MB.CreateCopyInfo;
    CInfo.Id := MB.GenerateId("FC_COPY");
    CInfo.Name := Copy of time series database;
    CInfo.WithData := True;
    CInfo.Destination := MB.ItemById("F_TSDB_COPY");
    CInfo.Source := MB.ItemById("TSDB");
    // Create an object for copying a time series database
    pCopier := New RubricatorCopier.Create;
    // Specify general copying parameters
    pCopier.CopyInfo := CInfo;
    // Specify that copying is performed with data
    pCopier.WithObjects := True;
    // Specify that copying is performed within one transaction
    pCopier.DisableTransactions := True;
    // Copy
    pCopier.Copy;
End Sub UserCopy;

After executing the example the TSDB time series database is copied with data to the F_TSDB_COPY folder within one transaction.

See also:

IRubricatorCopier