Lookup: IMetaDictionaryLookup;
Lookup: Prognoz.Platform.Interop.Rds.IMetaDictionaryLookup;
The Lookup property returns a search condition.
Executing the example requires that the repository contains a time series database with the TSDB identifier. This database must have a time series attribute with the COUNTRY identifier.
Add links to the Cubes, Metabase, Orm, Rds system assemblies.
Sub UserProc;
Var
MB: IMetabase;
RubrInst: IRubricatorInstance;
FactsLookup: IRubricatorFactsLookup;
MetaDLookup: IMetaDictionaryLookup;
Cond: IOrmCondition;
Key: Array Of Integer;
i: Integer;
Begin
MB := MetabaseClass.Active;
RubrInst := MB.ItemById("TSDB").Open(Null) As IRubricatorInstance;
FactsLookup := RubrInst.CreateFactsLookup;
MetaDLookup := FactsLookup.Lookup;
Cond := MetaDLookup.Where.Add;
Cond.AttributeName := "COUNTRY";
Cond.Value := 512;
FactsLookup.Open(DictionaryCursorOptions.None);
Key := FactsLookup.LookupFactors;
For Each i In Key Do
Debug.WriteLine(i);
End For;
End Sub UserProc;
On executing the example time series are searched by the following condition: value of the COUNTRY attribute is equal to 512. The keys of the found time series are displayed to the development environment console.
The requirements and result of Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Orm;
Imports Prognoz.Platform.Interop.Rds;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
RubrInst: IRubricatorInstance;
FactsLookup: IRubricatorFactsLookup;
MetaDLookup: IMetaDictionaryLookup;
Cond: IOrmCondition;
Key: System.Array;
i: Integer;
Begin
MB := Params.Metabase;
RubrInst := MB.ItemById["TSDB"].Open(Null) As IRubricatorInstance;
FactsLookup := RubrInst.CreateFactsLookup();
MetaDLookup := FactsLookup.Lookup;
Cond := MetaDLookup.Where.Add();
Cond.AttributeName := "COUNTRY";
Cond.Value := 512;
FactsLookup.Open(DictionaryCursorOptions.dcuoNone);
Key := FactsLookup.LookupFactors();
For Each i In Key Do
System.Diagnostics.Debug.WriteLine(i);
End For;
End Sub;
See also: