I tried it now in Caché 2016.2.2 manually overwriting Storage
During compilation it gets automatically set back to
Also in class defintion.
Does this automatic change go back to repository ???
- Log in to post comments
I tried it now in Caché 2016.2.2 manually overwriting Storage
During compilation it gets automatically set back to
Also in class defintion.
Does this automatic change go back to repository ???
At first sight in Documatic, it looks like
was just renamed to
As a workaround, I would simply try in Caché to make a copy of %Library.CacheStorage to a new %Storage.Persistent
(a pure rename) Then compile a class with one and the other and compare the generated .int code.
It's a dirty hack. ![]()
But I have no hope ISC will ever provide some backward port from IRIS to Caché.
Sorry I have no IRIS at hands and can't try it myself.
score
-1 #1 - disagree, see no valid reasoning
-2 #2 - strongly disagree
-1 #3 - disagree because of #2
+1 #4- agree
+1 #5 - agree
+1 #6 - agree . pls.send enhancement req. to engineering
+0 #7 - not clear about the message ? an oref is neither primitive nor dynamic
+0 #8 - miss imagination of inconsistent return types
+0 #9 - don't understand that message
You may try WebTerminal over HTTPS as an alternate way for access.
It's really a matter of taste.
If you don't like the long list of params (especially with lousy documented methods) you can
#1) use 1 single param and pass a local array byRef . and decode it yourself eg:
do ##class(my.par).method(.par)or
#2) use the traditional style you may know from Caché I/O Device Guide having also just 1 parameter
do ##class(my.pieces).method("/SERVER=127.0.0.1:/PORT=1972:/NAMESPACE=SAMPLES")I personally prefer #2) as it gives you an embedded doc on your intentions.
#1) all documentation on XML is here
It covers everything to output Objects to XML.
#2) to fill this in-between object you may use the SQL Table represented by an object class.
as simple INSERT INTO my.xmltable select .........
You just have to take care that the object class also extends %XML.Adapter .
That makes it ready for XML Export. All details described in docs
Dear Martin,
I have a rather clear vision where your $example comes from ($zzg, $zza, ...) ![]()
My personal suggestion is to move everything you maintain today in %ZZLANG?00 routines into clean Macro definitions (.inc)
The history of %LANG* code goes back to times when migration from other language dialects (MSM, DTM, DSM, VISOS, ..) happened
and developers were writing just in .INT routines. That's far back in the late 80ies. The availability of MACRO code (also ages back) made it almost obsolete. The feature was never eliminated by considerations of backward compatibility.
I personally would never allow any developer to touch %SYS.
And wouldn't accept any code using $zz* , zz* stuff or $zu().
There are much cleaner ways to achieve the same result without compromising the core.
You may take my previous article The 'unlimited' UNIQUE index as a suggestion how to work around this limit.
if you just look for a specific property instead of a larger part of the object
you may use
set value=##class(ICT.Experiments.B).<propertyname>GetStored(primaryKey)
instead of
set collB=##class(ICT.Experiments.B).%OpenId(primaryKey)
to avoid loading the full object
I may misunderstand your intentions but
when I use "ResultSet.%Get("Collection")", all I get is a list of the primary keys of the objects.
now you all you miss for each PrimaryKey is
Set collB=##class(ICT.Experiments.B).%OpenId(primaryKey)
or
Set collC=##class(ICT.Experiments.C).%OpenId(primaryKey)
and the object is yours.
With your class definition, PrimaryKey is the Idkey of the Object.
the total size is somewhat strange its format changes from 255 to 256 in size and interpretation
and again at 65535 / 65536 up to <MAXSTRING>
special case:
the structure of $LB() is rather simply a binary string
-----------element--------------
TotalLength = 1, 3, 7 bytes depending on size *corrected*
Type = 1 byte (check in JSON converter for codes, or just check with ZZDUMP)
Content : size = TotalLength-1-size of length field
-----------element--------------
TotalLength = 1, 3, 7 bytes depending on size *corrected*
Type = 1 byte (check in JSON converter for codes, or just check with ZZDUMP)
Content : size= TotalLength-1-size of length field
-----------element--------------
...
Therefore concatenation of $lb) is so easy
Sorry, I had more changes.
My approach in details
compiles this routine:
and the using class
compiled as
and the test
Well, the code generator can be tricky.
It's not one of my favorites. But sometimes you have no choice.
instead of
do %code.WriteLine($c(9) _ "Quit ..Test()")use
do %code.WriteLine($c(9) _ "Quit zTest()")It worked for me best
OK.
StorageTo../..ToStorage only works in persistent classes where you move content from/to globals.
No chance without storage.
It doesn't get called in Registered Classes and not when the object wasn't saved.
see my test with %Persistent
This proves that there is limited use of the approach.
I could imagine inheriting standard data types for a customized data type and then
adding methods LogicalToStorage and StorageToLogical similar as LogicalToObs, ....
So your manipulations happen on the way from Global to the local variable.
Additional Parameters eventually may control the generated code.
It's just a vague idea.
Ken Olson , the founder of DEC (Digital Equipment Corp.) was famous for its statement:
Similar in the late 1950ies IBM estimated the worldwide market for computers of 15..30 systems in total.
So lack of phantasy what could be in the future is quite common also for very successful people and companies.
inside &SQL() only SQL compatible code is allowed
so $ZDT($H,3,1,3) is not known in SQL
you may do
mind the colon :%myts and :%tx to pass global accessible variables to embedded SQL
you better not change %CSP.Login but make a personal copy and change this
404 = HTTP page not found. Most likely you put your copy to the wrong directory or namespace
And then you have to put the reference in MgmtPortal Security-> WebApplications as Login page:
Again with the correct namespace and the correct directory.
@Aleksandar Kovacevic
ISC Engineering & Support has this information and also appropriate tools for analysis.
You better contact them directly in Cambridge.
@Dmitry Maslennikov : Excellent explanation ![]()
can't import %routines which I need.
Without any special mapping, %routines are stored in SYSLIB. (except %z*,%Z*)
Mount SYSLIB (default: read-only) as Read/Write and you can load your %routines.
Needless to mention that you better not overwrite already existing %routines.
The effects could be unpredictable.
As you describe it I'd create a nice BAT file that you execute.
It coud be static or created ad hoc just by writing it from Caché
And then execute it using $ZF(-1...) ,$zf(-2....) or CPIPE
Though Caché has powerful utilities around %File class you will be faster that way
[based on ~40 yrs of M]
adapt :== create your own class and inherit %CSP.Login
to create your own Login Page you best start with
defaulting to
.png)
and then you add the new Login Page to Security-> WebApplications
.png)
Size of WIJ is in Relation to Global Buffers. With equal size of G.Buf. you should get similar size of WIJ
that's wrong ! "will execute nothing, "
if condition
Sets the system variable $TEST.
And this was and still is a widely used way of signaling between routines and functions.
And millions lines of existing code rely on its proper use.
I come back to an earlier comment: Really learning the language is definitely an advantage.
returning to dotted subroutines would be really bad. Though they are still around in %SYS. ![]()
on the other hand, the flexibility of the language allows a broad range of personal styles.
knowing them enabled me in the past (amongst my customers ) to identify the author of a routine
just by his style with a hit rate of >75%. ![]()
QUIT and RETURN are massively different.