GetDmStd

Syntax

GetDmStdResult GetDmStd(DmId tDim, GetDmStdArg tArg)

Parameters

tDim. Moniker of opened table dictionary instance.

tArg. Operation execution parameters.

Description

The GetDmStd operation gets table dictionary metadata.

Comments

This operation enables the user to get information about table dictionary structure: attributes, blocks, indexes, dictionary levels and other settings that affect dictionary work. To execute the operation, in the tDim field specify table dictionary instance moniker, and in the tArg field specify parameters that will be used to get information. The moniker can be obtained on executing the OpenDim operation. In the tArg.pattern field specify the pattern that will be used to get information. The operation results in the requested metadata.

Example

Below is the example of using the GetDmStd operation to get information about table dictionary structure. The request contains dictionary moniker and the pattern that determines which metadata should be obtained. The response contains the obtained information.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetDmStd xmlns="http://www.fsight.ru/PP.SOM.Som">
<tDim xmlns="">
  <id>S1!M!S!DM9</id>
  </tDim>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <attrs>Get</attrs>
  <blocks>Get</blocks>
<block>
  <all>true</all>
  </block>
  </pattern>
  </tArg>
  </GetDmStd>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetDmStdResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns="">
  <id>S1!M!S!DM9</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="4" hf="0">
  <i>DIM_1</i>
  <n>Dim_1</n>
  <k>116</k>
  <c>1025</c>
  <p>103</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
  <dirty>0</dirty>
<attrs>
<its>
<it>
  <k>117</k>
  <id>NAME</id>
  <n>Name</n>
  <vis>1</vis>
  <dt>1</dt>
  <predefined>Name</predefined>
  <dataDomain>0</dataDomain>
  <nullable>1</nullable>
  <hasHierarchy>0</hasHierarchy>
  </it>
<it>
  <k>118</k>
  <id>ID</id>
  <n>Identifier</n>
  <vis>1</vis>
  <dt>2</dt>
  <uniqueIndex>INDEX1</uniqueIndex>
  <predefined>Ident</predefined>
  <dataDomain>0</dataDomain>
  <nullable>1</nullable>
  <hasHierarchy>0</hasHierarchy>
  </it>
<it>
  <k>119</k>
  <id>ORDER</id>
  <n>Order</n>
  <vis>1</vis>
  <dt>2</dt>
  <predefined>Order</predefined>
  <dataDomain>0</dataDomain>
  <nullable>1</nullable>
  <hasHierarchy>0</hasHierarchy>
  </it>
<it>
  <k>122</k>
  <id>PARENT</id>
  <n>Parent</n>
  <vis>1</vis>
  <dt>2</dt>
  <dataDomain>0</dataDomain>
  <nullable>1</nullable>
  <hasHierarchy>0</hasHierarchy>
  </it>
<it>
  <k>177</k>
  <id>CODE</id>
  <n>Code</n>
  <vis>1</vis>
  <dt>1</dt>
  <dataDomain>0</dataDomain>
  <nullable>1</nullable>
  <hasHierarchy>0</hasHierarchy>
  </it>
  </its>
  <ident>1</ident>
  <name>0</name>
  <order>2</order>
<orders>
<its>
<it>
<attr>
  <k>119</k>
  <id>ORDER</id>
  </attr>
  <reverseOrder>0</reverseOrder>
  </it>
  </its>
  </orders>
  </attrs>
<blocks>
<its>
<it>
  <k>120</k>
  <id>BLOCK1</id>
  <n>Block1</n>
  <vis>1</vis>
<indexes>
<it>
  <k>121</k>
  <id>PRIMARY_INDEX</id>
  <n>Primary index of the Block1 block</n>
  <vis>1</vis>
<block>
  <k>120</k>
  <id>BLOCK1</id>
  <n>Block1</n>
  <vis>1</vis>
  </block>
<attrs>
<it>
  <k>118</k>
  <id>ID</id>
  <n>Identifier</n>
  <vis>1</vis>
  </it>
  </attrs>
  <primary>1</primary>
  <unique>1</unique>
  <useInSelection>0</useInSelection>
  <caseSensitive>1</caseSensitive>
  </it>
  </indexes>
<dataset ds="" isShortcut="0" isLink="0" ver="0" hf="0">
  <i>OBJ113</i>
  <n>dictionary</n>
  <k>114</k>
  <c>769</c>
  <p>103</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  </dataset>
  <type>Recursive</type>
<bindings>
<it>
<attr>
  <k>117</k>
  <id>NAME</id>
  </attr>
  <expression>OBJ113.NAME</expression>
  </it>
<it>
<attr>
  <k>118</k>
  <id>ID</id>
  </attr>
  <expression>OBJ113.ID</expression>
  </it>
<it>
<attr>
  <k>119</k>
  <id>ORDER</id>
  </attr>
  <expression>OBJ113.ID</expression>
  </it>
<it>
<attr>
  <k>122</k>
  <id>PARENT</id>
  </attr>
  <expression>OBJ113.PARENTID</expression>
  </it>
<it>
<attr>
  <k>177</k>
  <id>CODE</id>
  </attr>
  <expression>OBJ113.CODE</expression>
  </it>
  </bindings>
  <whereExpr />
<recursive>
  <startWith>OBJ113.PARENTID = 0</startWith>
<connectByIndex>
  <k>121</k>
  <id>PRIMARY_INDEX</id>
  </connectByIndex>
<connectsBy>
<it>
<attr>
  <k>118</k>
  <id>ID</id>
  </attr>
  <expression>OBJ113.PARENTID</expression>
  </it>
  </connectsBy>
  <startWithWhere />
  <connectByWhere />
  </recursive>
  </it>
  </its>
  </blocks>
  <deduplicateCondition>None</deduplicateCondition>
  <deduplicateExpression />
  <hideInaccessibleElements>1</hideInaccessibleElements>
  <reverseOrder>0</reverseOrder>
  </meta>
  </GetDmStdResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetDmStd" :
{
"tDim" :
{
"id" : "S1!M!S!DM9"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"attrs" : "Get",
"blocks" : "Get",
"block" :
{
"all" : "true"
}
}
}
}
}

JSON response:

{
"GetDmStdResult" :
{
"id" :
{
"id" : "S1!M!S!DM9"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "4",
"@hf" : "0",
"i" : "DIM_1",
"n" : "Dim_1",
"k" : "116",
"c" : "1025",
"p" : "103",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "0",
"attrs" :
{
"its" :
{
"it" :
[
{
"k" : "117",
"id" : "NAME",
"n" : "Name",
"vis" : "1",
"dt" : "1",
"predefined" : "Name",
"dataDomain" : "0",
"nullable" : "1",
"hasHierarchy" : "0"
},
{
"k" : "118",
"id" : "ID",
"n" : "Identifier",
"vis" : "1",
"dt" : "2",
"uniqueIndex" : "INDEX1",
"predefined" : "Ident",
"dataDomain" : "0",
"nullable" : "1",
"hasHierarchy" : "0"
},
{
"k" : "119",
"id" : "ORDER",
"n" : "Order",
"vis" : "1",
"dt" : "2",
"predefined" : "Order",
"dataDomain" : "0",
"nullable" : "1",
"hasHierarchy" : "0"
},
{
"k" : "122",
"id" : "PARENT",
"n" : "Parent",
"vis" : "1",
"dt" : "2",
"dataDomain" : "0",
"nullable" : "1",
"hasHierarchy" : "0"
},
{
"k" : "177",
"id" : "CODE",
"n" : "Code",
"vis" : "1",
"dt" : "1",
"dataDomain" : "0",
"nullable" : "1",
"hasHierarchy" : "0"
}
]
},
"ident" : "1",
"name" : "0",
"order" : "2",
"orders" :
{
"its" :
{
"it" :
[
{
"attr" :
{
"k" : "119",
"id" : "ORDER"
},
"reverseOrder" : "0"
}
]
}
}
},
"blocks" :
{
"its" :
{
"it" :
[
{
"k" : "120",
"id" : "BLOCK1",
"n" : "Block1",
"vis" : "1",
"indexes" :
{
"it" :
{
"k" : "121",
"id" : "PRIMARY_INDEX",
"n" : "Primary index of the Block1 block",
"vis" : "1",
"block" :
{
"k" : "120",
"id" : "BLOCK1",
"n" : "Block1",
"vis" : "1"
},
"attrs" :
{
"it" :
{
"k" : "118",
"id" : "ID",
"n" : "Identifier",
"vis" : "1"
}
},
"primary" : "1",
"unique" : "1",
"useInSelection" : "0",
"caseSensitive" : "1"
}
},
"dataset" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "0",
"@hf" : "0",
"i" : "OBJ113",
"n" : "dictionary",
"k" : "114",
"c" : "769",
"p" : "103",
"h" : "0",
"hasPrv" : "0",
"ic" : "0"
},
"type" : "Recursive",
"bindings" :
{
"it" :
[
{
"attr" :
{
"k" : "117",
"id" : "NAME"
},
"expression" : "OBJ113.NAME"
},
{
"attr" :
{
"k" : "118",
"id" : "ID"
},
"expression" : "OBJ113.ID"
},
{
"attr" :
{
"k" : "119",
"id" : "ORDER"
},
"expression" : "OBJ113.ID"
},
{
"attr" :
{
"k" : "122",
"id" : "PARENT"
},
"expression" : "OBJ113.PARENTID"
},
{
"attr" :
{
"k" : "177",
"id" : "CODE"
},
"expression" : "OBJ113.CODE"
}
]
},
"whereExpr" : "",
"recursive" :
{
"startWith" : "OBJ113.PARENTID = 0",
"connectByIndex" :
{
"k" : "121",
"id" : "PRIMARY_INDEX"
},
"connectsBy" :
{
"it" :
{
"attr" :
{
"k" : "118",
"id" : "ID"
},
"expression" : "OBJ113.PARENTID"
}
},
"startWithWhere" : "",
"connectByWhere" : ""
}
}
]
}
},
"deduplicateCondition" : "None",
"deduplicateExpression" : "",
"hideInaccessibleElements" : "1",
"reverseOrder" : "0"
}
}
}
public static GetDmStdResult GetStandartDimension(DmId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetDmStd()
{
tArg = new GetDmStdArg()
{
pattern = new DmStdMdPattern()
{
attrs = ListOperation.Get,
blocks = ListOperation.Get,
block = new DmStdBlockPattern() { all = true }
}
},
tDim = moniker
};
//Get information about table dictionary
var result = somClient.GetDmStd(tGet);
return result;
}

See also:

Working with Dictionaries