Seems like a pointless exercise to me. A question to ask is what is the objective for this?
There is a quick way to do this but it depends on how accurate you want the count to be. In the Management Portal, under System Explorer, Classes there is the option to export classes to an external XML file; there is also the option to include/exclude system classes and select individual or all classes.
This will export the classes into an XML file which you can open in a text file editor to get the number of lines. Note though, the XML export adds additional lines for tags to differentiate the code sections so the count will be greater than the actual lines shown when actually editing the code in the usual editor.
But it could be an option for you.
You need to understand the difference between $order and $query; they both handle globals/arrays differently for different purposes.$order is the more straightforward to use (and more commonly used); it scans down a particular node of a global/array. For example for your example:
set n=$order(^TestGlobal("Not Configured",n))
; do something with n
$query is more useful if the global structure is unknown or less structured. It starts at the top of the global and returns the entire subscript string at a given level. So again for your example, the first $query would return ("Not Configured","Value 1"). You could then use $QL to get the number of subscripts at that level (2 in this case), and $qs(subscripts,position) to get the value of the subscript.
("Not Configured","Value 1")
w node ; this would return TestGlobal("Not Configured","Value 1")
w $ql(node) ; this would return 2
w $qs(node,1) ; this would return "not configured"
w $qs(node,2) ; this would return "Value 1"
w @node ; returns the data at that node; in this example null
TestGlobal("Not Configured","Value 1")
$order is the more commonly used.
You need to understand how to use globals and arrays to efficiently store data, and how to traverse them using $order. Globals and arrays are handled the same except globals are store on disk (persistant/permanent) and arrays are stored in memory (volatile/temporary).
Hope this helps.
I have also looked into installing the db onto a NAS drive (but not using Docker).
From my understanding, you cannot do this with the free community version of Iris/Cache, I believe a licenced version would enable this functionality. I haven't purchased a licence to prove this as I can't justify buying a personal licence for myself.Professionally though, where the company I work for have purchased licences, a local installation of Iris/Cache can access different db's on remote servers.
I hope that helps.
Log in or create a new account to continue