IMetaDictionaryLookup.LookupCompoundKeys

Fore Syntax

LookupCompoundKeys: Array;

Fore.NET Syntax

LookupCompoundKeys(): System.Array;

Description

The LookupCompoundKeys property returns an array of compound keys for time series.

Comments

The following property indicates whether the time series database uses compound keys: IRubricator.CompoundFactorKey.

Fore Example

Executing the example requires that the repository contains a time series database with the RUBRICATOR identifier. Add links to the Metabase, Cubes, Rds system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    RubDesc: IMetabaseObjectDescriptor;
    Rub: IRubricator;
    RubrIn: IRubricatorInstance;
    DictInst: IMetaDictionaryInstance;
    MetaDLookup: IMetaDictionaryLookup;
    Keys, cKey: Array Of Variant;
    i, j: Integer;
    s: String;
Begin
    MB := MetabaseClass.Active;
    RubDesc := MB.ItemById("RUBRICATOR");
    Rub := RubDesc.Bind As IRubricator;
    If Rub.CompoundFactorKey Then
        RubrIn := RubDesc.Open(NullAs IRubricatorInstance;
        DictInst := RubrIn.Facts;
        MetaDLookup := DictInst.CreateLookup("");
        Keys := MetaDLookup.LookupCompoundKeys;
        For i := 0 To Keys.Length - 1 Do
            cKey := Keys[i] As Array Of Variant;
            s := "";
            For j := 0 To cKey.Length - 1 Do
                s := s + cKey[j] + "; ";
            End For;
            Debug.WriteLine(s);
        End For;
    End If;
End Sub UserProc;

After executing the example, values of compound keys are displayed in the console window if the time series database uses these keys.

Fore.NET Example

Executing the example requires that the repository contains a time series database with the RUBRICATOR identifier.

Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Rds;

[STAThread]
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    RubDesc: IMetabaseObjectDescriptor;
    Rub: IRubricator;
    RubrIn: IRubricatorInstance;
    DictInst: IMetaDictionaryInstance;
    MetaDLookup: IMetaDictionaryLookup;
    Keys, cKey: Array Of object;
    i, j: Integer;
    s: String;
Begin
    MB := Params.Metabase;
    RubDesc := MB.ItemById["RUBRICATOR"];
    Rub := RubDesc.Bind() As IRubricator;
    If Rub.CompoundFactorKey Then
        RubrIn := RubDesc.Open(NullAs IRubricatorInstance;
        DictInst := RubrIn.Facts;
        MetaDLookup := DictInst.CreateLookup("");
        Keys := MetaDLookup.LookupCompoundKeys() As Array Of object;
        For i := 0 To Keys.Length - 1 Do
            cKey := Keys[i] As Array Of object;
            s := "";
            For j := 0 To cKey.Length - 1 Do
                s := s + cKey[j] + "; ";
            End For;
            System.Diagnostics.Debug.WriteLine(s);
        End For;
    End If;

After executing the example, values of compound keys are displayed in the console window if the time series database uses these keys.

See also:

IMetaDictionary