example moved here Remote Global Listing using NativeAPI for ObjectScript #1
- Log in to post comments
example moved here Remote Global Listing using NativeAPI for ObjectScript #1
my personal congratulations to the Winners ! 馃憤
According to class
Class Contatos.Empresa Extends %Persistent
{
Relationship Nomedaempresa As
Contatos.Amiguinho [ Cardinality = many, Inverse = Trabalho ];
Property Nome As %String;
Storage Default
}It also needs an ID and a Relationship.
you may run an export ^%G like on the remote server and then copy somehow the result
It's an orgy of IsDefined ($DATA) and GetNext( $ORDER) as equivalent of $QUERY is not implemented
sorry, Insert() is only for the "MANY" side of the Relationship
You just can insert existing IDs.
So you have to check first:
set emp=##class(Contatos.Empresa).%OpenId(IDt)
if $isObject(emp) Do objcontato.Trabalho.Insert(emp)
Relationship is an Object concept that has no direct equivalent in SQL to handle it
The "MANY" end is basically just a piece of code (
By SQL you just can set it indirectly from the "ONE" end as you found yourself.
This is a real Property / Column that has a distinct value that you can touch and set
My 5th Choice:
My 3rd Choice:
mixing file systems Win / *UX might be tricky
My Second Choice:
My First Choice:
BTW:
whatever your method does it always terminate with Quit $$$OK
so whatever happens it is equivalent to
set SphereJauh=1
I assume you look for a different return value ? Is it ?
your ClassMethod GetSphereJauh(Id..... is located in some Class
so just call it as any other class methodset SphereJauh=##class(classname).GetSphereJauh(ATTRDesc)
the fact that this is used as part of a custom class query is totally irrelevant in this context.
it is straightforward ObjectScript. nothing else
Now it is obvious that ^realglobal has 11.3 times the size of ^testglobal
while your ^testglobal seems to have all blocks in buffers in memory
this is rather unlikely for ^realglobal.
So repeated reloading of blocks from disk seems to cause the delay
If you have the chance to double or triple your global buffers
you most likely may see improved processing of your $O()
How do you recognize LOCKED items ?
How do you LOCK items ?
BTW: check consumption of IRIS Licenses
Follow up to @Dmitry Maslennikov:
Error on IRIS side: ACCESS DENIED ODBC can't connect ===> timeout
Why ACCESS DENIED ? The most likely cause
You can avoid this by
check https://openexchange.intersystems.com/package/function-ISJSON-2 in OEX
and https://community.intersystems.com/post/function-check-if-string-json-object in DC
Muchas gracias !
Thank you all!
400+ years back when my earliest documented ancestor was born
Spain+Austria was a World Wide Empire ("Casa Austria", Emperor Carlos V.) that ruled the globe.
I feel quite familiar with you.
Robert
if you want to take a look behind the scene try this example
Character-Slice Index
Quick Summary:
Hi @Vivian Lee !
I think you had no chance to see the problem in docs
You mentioned a custom class that extends %Text.English
this might be the cause of your problem.
The class is not visible in normal class reference (don't ask me why)
Default %Text.English has a Parameter NOISEWORDS100 =
"the of and a to in is you that it he for was on are as with his they at be this from I have or by one had not but what all were when we there can an your which their said if do will each about how up out them then she many some so these would other into has more her two like him see time could no make than first been its who now my made over did down only way find use may long little very after called just where most know get through back";
So you might be affected by these NOISEWORDS.
I failed to find any useful public documentation on this parameter and also %Text.Text is not too useful
Agree with @Julius Kavay
Just read the documentation on %CONTAINS
It's a function specific to data type %TEXT and is language dependant (more details in docs)
-------------------
If you look for a functionality as SQL LIKE you better use LIKE
or [ the contains operator of COS
%Get() in %SQL.StatementResult. does NOT act like $Get() in ObjectScript
You have to resolve the NULL value issue in your SQL statement using NVL() function with 2nd parameter.
More NULL Handling Functions
see official docs
You still didn't understand the difference:
you should know from what time zone you get your input from
#1 is correct
Your calculation #2 is seriously wrong.
reason
reading documentation you see
dformat -2
|
$ZDATETIME returns an integer specifying the count of seconds from a platform-specific origin date/time. This is the value returned by the time() library function, as defined in the ISO C Programming Language Standard. For example, on POSIX-compliant systems this value is the count of seconds from January 1, 1970 00:00:00 UTC |
And that's the mistake:
Your BirthDate is obviously considered as LOCAL time
And therefore the difference you see reflects the time offset of your machine to UTC
-19800 sec => -5.5 hrs
system variable $ZTZ will show your offset to UTC in minutes => -330
my guess: your machine is running at local time in India