📜 ⬆️ ⬇️

View globals in the Caché Database Management Portal

Causes antires and such isho cut
(The king of "Pro Fedot Archer")


Everything in Caché is stored in globals. Data, metadata, classes, programs. There is a handy tool for viewing globals in the Management Portal — the Global Data View page. We will consider it today.


An example of a global we will serve ^ DeepSee.Cubes . This is a global where the list of DeepSee cubes is stored. You do not need to know DeepSee to read this article.


To get to the “View global data” page, open the Management Portal, select “System Explorer” → “Globals” (Globals). Then to the left of the desired area, and click "View" next to the desired global.


In our case, select the SAMPLES area and the global DeepSee.Cubes .


On my installation, this page looks like this:


image


There are a lot of data in serious globala (millions of nodes). By default, the Preview page shows only the first 100. You can increase this number, but the more nodes you will specify for output, the longer the page will load.


The most interesting input field on this page is the Global Search Mask. Consideration of various masks, and we dedicate the rest of the article.


So, let the mask contain


  1. The name of the node. View will display only this node. Without descendants, even if they are.

image
If there is no value in the node itself, but there are descendants, the View will show the value “~ pointer”.


image


  1. The name of the node without the last closing bracket. View will display the node and all its descendants:

image


  1. Empty indexes in the global name. A view will display all the nodes that are matched.
    In this example, the View displays all nodes that have three indexes, the third of which is “bucketSize”, and the first two are any:

image


You can specify all indices to be empty. Then the review will display all nodes whose indexes have the specified number.


For example, three:


image


Two:


image


Or one:


image


  1. Intervals Index value can be recorded at the beginning : end . View will show only those nodes, indexes, which fall into a given interval.

image


Description of the masks in English is given in the documentation . I hope the use of masks will make your daily communication with the globals even more pleasant!


Bonus


The View page uses a public API Get request in the class% Library.Global :


SAMPLES>do ##class(%ResultSet).RunQuery("%Global","Get",$namespace,"^DeepSee.Cubes()") Global Name:Value:Name Format:Value Format:Permissions: ^DeepSee.Cubes("classes"):~pointer:1:1:: ^DeepSee.Cubes("cubes"):~pointer:1:1:: ^DeepSee.Cubes("kpis"):~pointer:1:1:: ^DeepSee.Cubes("prior"):~pointer:1:1:: ^DeepSee.Cubes("sharesIndex"):~pointer:1:1::``` 

')

Source: https://habr.com/ru/post/316602/


All Articles