Thanks, good to know. Sounds like the authentication is simplest way to make the thing clear.
- Log in to post comments
Thanks, good to know. Sounds like the authentication is simplest way to make the thing clear.
The Id is a string of random characters, like VAzZwAod6o. And I need a way to get some more details about the session.
Thanks for the tip, but as I mentioned, so far we were not able to reproduce the problem, it comes time after time without evident reasons.
That's why I'm looking for a way to find out details of the client created the session.
As I see it, xml-to-objects classes need DOM while the whole purpose of TextReaded is to read the xml without DOM creation
Thanks, $zstorage worked fine
Thanks but I must use xml-to-object classes generated by the xsd
Right. Somehow I missed the evident idea that all the indexes can be simply initialized with -1 $order. Thanks.
The only thing, last index should be not set to its previous value.
Vladimir, the question was to resume the iteration from given point. Say we have only two indexes, A and B. When resuming, the code first has to check next values of B and only then next values of A. Your code stars with A skipping all remaining values of B.
Check $query-based solution in my answer to a post below. Looks to me as more elegant than with nested loops.
>which is easy to do with $ORDER
Tried to do this but solution did not look easy at all :)
My reworked solution so far. Looks working on samples I tested
; Get log for given 'clientid'
; 'maxlog' records max, starting from given 'date','dek','idx'
GetXLog(clientid,date,dek,idx,maxlog) public
{
s:maxlog="" maxlog=400
s counter=0
s gl=$name(^cxlog(clientid,date,dek,idx)) ; ^cxlog("EFRW1000",20161219,2,1,"date")=20161219
for { q:counter=maxlog
s oldroot=$name(@gl,4) ; we care only about first 4 indexes
s gl=$query(@gl) ; take next global
s root=$name(@gl,4)
continue:oldroot=root ; skip all sub-globals
q:clientid'=$qsubscript(root,1) ; for given 'clientid' only
w root,!
s counter=counter+1
}
w !
}
Does it work for you? I think at least the order must be c->b->a, not a->b-c
John,
If I see your explanations right, the issue is just a harmless result of some internal Cache's behaviour, so I should not really care, right?
ok, thanks for explanations.
We do the import always in the same way for many years and never saw this problem, but I doublecheck with my colleagues the way used last time
Cache for Windows (x86-64) 2016.1
The idea is extremely simple: each class includes auto-generated query 'select ID from classname' that returns ids of all existing objects of this class
I just mean that if I have simple task to show 1000 records split into 10 pages, with "raw" globals I can do it simple with $order but with objects there is nothing similar to $Order so I have to use SQL
Check this "Using Caché Objects ▶ Introduction to Persistent Objects ▶ Extent Queries"
https://community.intersystems.com/product-documentation/using-cach%C3%…
Very same as with raw Order: user opens a list, you give him first 100 objects and when he presses Next page, you continue from index 101
I wonder why when working with objects, we still must use SQL (Extent Query) to be able iterate all instances of a class. Do you know reasons for this design?
Please check my comment in the post below
Let's say we must iterate all Persons. Sure, by knowing its storage scheme, we can do it with Order but it's like invoking virtual function by memory offset in c++ world. The only object-oriented (i.e. without knowing too much of object internals) way I know is to use Extent. I wonder why generated class does not provide methods like GetFirst/GetLast/GetNext, this way users of the class could iterate extent in object-oriented way.
I always thought Extent is the only way. If I have for example persons in the database, how can I iterate all of them?
...you can probably go without the SQL layer...
I guess you must at least use Extent query to be able iterate the objects. Or can you manage without?
so it's not really feasible.
It is not possible to change the behaviour but I think it is possible to add some optional compiler function to give a warning when any type mismatch detected
"I don't tend to use the call stack view"
I'm not able to comprehend that
In my world stack view is as natural as.. as... as... I don't know, there is nothing more natural as working stack view in any debugger.
The trick with LOG^%ETN is for a case when you need the stack saved to a diagnostic log. But usual case for stack view is you have your debugger stopped on a breakpoint in some library routine and want to know what path brought you here. What you do? I look at stack view and click it to navigate to a call place.
"I don't tend to use the call stack view"
I'm not able to comprehend that
In my world stack view is as natural as.. as... as... I don't know, there is nothing more natural as working stack view in any debugger.
The trick with LOG^%ETN is for a case when you need the stack saved to a diagnostic log. But usual case for stack view is you have your debugger stopped on a breakpoint in some library routine and want to know what path brought you here. What you do? I look at stack view and click it to navigate to a call place.
The 'crash' is my post is actually incorrect. Studio never crashes, it always stops responding. So no error codes.
Now it took me about 15 minutes to reproduce the problem. I placed several breakpoints in my code and randomly clicked the stack every time debugger stopped, and at first everything worked OK. But then, without any evident reason, Studio stopped responding. Process info reports this:
| Execution Details | |||
|
| Last Global Reference: | %apiOLE("debug") |
| Routine: | %Debugger.System.1 |
| Source Location: | +415^%Debugger.System.1 |
I refreshed the page several times, the info remains the same
From CacheQuality web site:
Pricing
We have different pricing model accordingly with your needs, starting at a rate of 4.200$
To me this is a way to expensive just to know that method or property doesn't exist. Moreover, I want to know it immediately at project compile time. An external tool could parse the code during the night and tell some complex statistics but simple things must tell compiler
yes, I agree, all this would be really useful to have. At least as an external Lint tool.
But I know what they answer about (6): "it is not possible because of Dynamic Dispatch".
While Dynamic Dispatch is almost never needed but <method not exist> is every day experience
I don't like idea to set breakpoints in source code. At least because once set, you have to remember to remove it. This way is the only way for hardcore OS-level debugging but for application programming today I would prefer adequate debugger