Look features Caché Monitor.
- Log in to post comments
Look features Caché Monitor.
All correctly, this is what I had in mind.
Quote:
The Find Global String page enables you to find a given string in the subscripts1 or in the values2 of selected3 globals.
You can select all the globals of the namespace. In this case, the search will be performed across the database. In the search results you will get including the name of global.
The default ciphersuite string has changed to include new options and is now: ALL:!aNULL:!eNULL:!EXP:!SSLv2So the documentation is outdated?
In this case $system.SQL.DATEDIFF is not suitable:
USER><FONT COLOR="#0000ff">w $system</FONT><FONT COLOR="#008080">.SQL</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">DATEDIFF</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"yy"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$zdh</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"30.12.1990"</FONT><FONT COLOR="#000000">,4), </FONT><FONT COLOR="#0000ff">$zdh</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"01.01.1991"</FONT><FONT COLOR="#000000">,4))</FONT> 1USER><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$ZD</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$zdh</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"01.01.1991"</FONT><FONT COLOR="#000000">,4),8)-</FONT><FONT COLOR="#0000ff">$ZD</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$zdh</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"30.12.1990"</FONT><FONT COLOR="#000000">,4),8))\10000</FONT> 0
For better performance you should make a few changes:
select DOB from HSAA.Patient
where
dob<=dateadd('yy',-13,current_date)
or dob between
todate((year(current_date)-13)||'0101','yyyymmdd')
and todate((year(current_date)-13)||'1231','yyyymmdd')Then this:
<FONT COLOR="#000080">Include </FONT><FONT COLOR="#ff0000">Childor this:</FONT><FONT COLOR="#000080">Class Macro.Child Extends Macro.Parent </FONT><FONT COLOR="#000000">{
</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">first() { </FONT><FONT COLOR="#0000ff">#include </FONT><FONT COLOR="#000000">Child }
</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">Test() [ </FONT><FONT COLOR="#000080">PlaceAfter </FONT><FONT COLOR="#000000">= first ] { </FONT><FONT COLOR="#0000ff">write </FONT><FONT COLOR="#008000">"Class: " </FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$classname</FONT><FONT COLOR="#000000">() , ! , </FONT><FONT COLOR="#008000">"Value: " </FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$name </FONT><FONT COLOR="#000000">}
}</FONT>
<FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">Test()
{
</FONT><FONT COLOR="#0000ff">#include </FONT><FONT COLOR="#000000">Child
</FONT><FONT COLOR="#0000ff">write </FONT><FONT COLOR="#008000">"Class: " </FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$classname</FONT><FONT COLOR="#000000">() , ! , </FONT><FONT COLOR="#008000">"Value: " </FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$name
</FONT><FONT COLOR="#000000">}</FONT>Class include is not required (and does not seem to affect anything) and can be omittedYeah, I just forgot to delete that line.
Here's another way (without PlaceAfter):
<FONT COLOR="#000080">Class Macro.Child Extends Macro.Parent
</FONT><FONT COLOR="#000000">{
</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">%inc() [ </FONT><FONT COLOR="#000080">Internal</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#000080">Private </FONT><FONT COLOR="#000000">]
{
</FONT><FONT COLOR="#0000ff">#include </FONT><FONT COLOR="#000000">Child
}
</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">Test()
{
</FONT><FONT COLOR="#0000ff">write </FONT><FONT COLOR="#008000">"Class: " </FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$classname</FONT><FONT COLOR="#000000">() , ! , </FONT><FONT COLOR="#008000">"Value: " </FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$name
</FONT><FONT COLOR="#000000">}
}</FONT>
Why so difficult?
This similarly following condition:
<FONT COLOR="#000080">WHERE </FONT><FONT COLOR="#000000">( </FONT><FONT COLOR="#008000">year</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#808000">current_date</FONT><FONT COLOR="#000000">) - </FONT><FONT COLOR="#008000">year</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">DOB</FONT><FONT COLOR="#000000">) ) >= 13</FONT>It Besides above was already indicated, why does not follow to use such a code, for example:
<FONT COLOR="#0000ff">select </FONT><FONT COLOR="#808000">datediff</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#000080">year</FONT><FONT COLOR="#000000">,
</FONT><FONT COLOR="#808000">todate</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#808000">to_char</FONT><FONT COLOR="#000000">({</FONT><FONT COLOR="#000080">d </FONT><FONT COLOR="#008080">'1990-12-31'</FONT><FONT COLOR="#000000">},</FONT><FONT COLOR="#008080">'YYYY'</FONT><FONT COLOR="#000000">)||</FONT><FONT COLOR="#008080">':1'</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008080">'YYYY:MM'</FONT><FONT COLOR="#000000">), -- birthday
</FONT><FONT COLOR="#808000">todate</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#808000">to_char</FONT><FONT COLOR="#000000">({</FONT><FONT COLOR="#000080">d </FONT><FONT COLOR="#008080">'2003-01-01'</FONT><FONT COLOR="#000000">},</FONT><FONT COLOR="#008080">'YYYY'</FONT><FONT COLOR="#000000">)||</FONT><FONT COLOR="#008080">':1'</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008080">'YYYY:MM'</FONT><FONT COLOR="#000000">) -- report date
)</FONT>This gives an incorrect result - 13, although it should be 12.You are right, the macro $$$NULL present only in %sqlMigration.inc and this is not the file that developers often include to its project.
I prefer to use the macro $$$NULLOREF/$$$NULLOID from %occExtent.inc, which is available by default in the class that inherits from %Library.Base, and for routines is enough to include %systemInclude.inc.
On my desktop quite other results.
<FONT COLOR="#0000ff">n </FONT><FONT COLOR="#800000">N</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">j</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">timeResults:</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">N</FONT><FONT COLOR="#000000">=1e8
</FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">j</FONT><FONT COLOR="#000000">=1,2</FONT><FONT COLOR="#008000">/,3,4,5/ </FONT><FONT COLOR="#800080">{ </FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#800000">j</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">") "
</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">time</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#0000ff">$zh d </FONT><FONT COLOR="#000000">@(</FONT><FONT COLOR="#008000">"j"</FONT><FONT COLOR="#000000">_</FONT><FONT COLOR="#800000">j</FONT><FONT COLOR="#000000">)(</FONT><FONT COLOR="#800000">N</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#0000ff">w $zh</FONT><FONT COLOR="#000000">-</FONT><FONT COLOR="#800000">time</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">" s."</FONT><FONT COLOR="#000000">,! </FONT><FONT COLOR="#800080">} </FONT><FONT COLOR="#0000ff">q </FONT><FONT COLOR="#ff0000">j1</FONT><FONT COLOR="#000000">(N) </FONT><FONT COLOR="#0000ff">public </FONT><FONT COLOR="#800080">{ </FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">=1:1:</FONT><FONT COLOR="#800000">N </FONT><FONT COLOR="#800080">{</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">a</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">b</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">c</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">d</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">e</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">f</FONT><FONT COLOR="#000000">)=0</FONT><FONT COLOR="#800080">} } </FONT><FONT COLOR="#ff0000">j2</FONT><FONT COLOR="#000000">(N) </FONT><FONT COLOR="#0000ff">public </FONT><FONT COLOR="#800080">{ </FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">=1:1:</FONT><FONT COLOR="#800000">N </FONT><FONT COLOR="#800080">{</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">a</FONT><FONT COLOR="#000000">=0,</FONT><FONT COLOR="#800000">b</FONT><FONT COLOR="#000000">=0,</FONT><FONT COLOR="#800000">c</FONT><FONT COLOR="#000000">=0,</FONT><FONT COLOR="#800000">d</FONT><FONT COLOR="#000000">=0,</FONT><FONT COLOR="#800000">e</FONT><FONT COLOR="#000000">=0,</FONT><FONT COLOR="#800000">f</FONT><FONT COLOR="#000000">=0</FONT><FONT COLOR="#800080">} } </FONT><FONT COLOR="#ff0000">j3</FONT><FONT COLOR="#000000">(N) </FONT><FONT COLOR="#0000ff">public </FONT><FONT COLOR="#800080">{ </FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">=1:1:</FONT><FONT COLOR="#800000">N </FONT><FONT COLOR="#800080">{</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">a</FONT><FONT COLOR="#000000">=0,</FONT><FONT COLOR="#800000">b</FONT><FONT COLOR="#000000">=1,</FONT><FONT COLOR="#800000">c</FONT><FONT COLOR="#000000">=2,</FONT><FONT COLOR="#800000">d</FONT><FONT COLOR="#000000">=3,</FONT><FONT COLOR="#800000">e</FONT><FONT COLOR="#000000">=4,</FONT><FONT COLOR="#800000">f</FONT><FONT COLOR="#000000">=5</FONT><FONT COLOR="#800080">} } </FONT><FONT COLOR="#ff0000">j4</FONT><FONT COLOR="#000000">(N) </FONT><FONT COLOR="#0000ff">public </FONT><FONT COLOR="#800080">{ </FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">=1:1:</FONT><FONT COLOR="#800000">N </FONT><FONT COLOR="#800080">{</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">a</FONT><FONT COLOR="#000000">=0 </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">b</FONT><FONT COLOR="#000000">=1 </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">c</FONT><FONT COLOR="#000000">=2 </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">d</FONT><FONT COLOR="#000000">=3 </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">e</FONT><FONT COLOR="#000000">=4 </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">f</FONT><FONT COLOR="#000000">=5</FONT><FONT COLOR="#800080">} } </FONT><FONT COLOR="#ff0000">j5</FONT><FONT COLOR="#000000">(N) </FONT><FONT COLOR="#0000ff">public </FONT><FONT COLOR="#800080">{ </FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">=1:1:</FONT><FONT COLOR="#800000">N </FONT><FONT COLOR="#800080">{</FONT><FONT COLOR="#0000ff">s $lb</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">a</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">b</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">c</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">d</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">e</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">f</FONT><FONT COLOR="#000000">)=</FONT><FONT COLOR="#0000ff">$lb</FONT><FONT COLOR="#000000">(0,1,2,3,4,5)</FONT><FONT COLOR="#800080">} }</FONT>
USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000000">^perf</FONT>As you can see the difference is almost 2.5 times.
- 11.814189 s.
- 4.683832 s.
Fixed bugs/typos and added new types.
<FONT COLOR="#0000ff">#include </FONT><FONT COLOR="#000000">%PVA </FONT><FONT COLOR="#ff0000">types </FONT><FONT COLOR="#008000">; Show COS-Datatypes ; kav ; 2018-03-04 </FONT><FONT COLOR="#0000ff">n </FONT><FONT COLOR="#800000">array</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">bitstring </FONT><FONT COLOR="#0000ff">s $bit</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">bitstring</FONT><FONT COLOR="#000000">,1) = 1Result:</FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#008000">"№"</FONT><FONT COLOR="#000000">,?4,</FONT><FONT COLOR="#008000">"VALUE"</FONT><FONT COLOR="#000000">,?30,</FONT><FONT COLOR="#008000">"JSON"</FONT><FONT COLOR="#000000">,?45,</FONT><FONT COLOR="#008000">"$LISTBUILD"</FONT><FONT COLOR="#000000">,!,</FONT><FONT COLOR="#0000ff">$TR</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$J</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">""</FONT><FONT COLOR="#000000">,55),</FONT><FONT COLOR="#008000">" "</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"-"</FONT><FONT COLOR="#000000">),! </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">array</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#ff00ff">[ </FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">bitstring</FONT><FONT COLOR="#000000">)</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$ZBITSET</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$ZBITSTR</FONT><FONT COLOR="#000000">(4,1),2,0))</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$lb</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">""</FONT><FONT COLOR="#000000">))</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#0000ff">null</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#0000ff">true</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#0000ff">false</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">%ZEN.proxyObject</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%New</FONT><FONT COLOR="#000000">())</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#ff00ff">[]</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#ff00ff">{}</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#008000">"abcd"</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$wc</FONT><FONT COLOR="#000000">(35222))</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#008000">"2"</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#000000">2</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#000000">-2</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#000000">2.1</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#000000">-2.1</FONT><FONT COLOR="#808080">, </FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$double</FONT><FONT COLOR="#000000">(2.1)) </FONT><FONT COLOR="#ff00ff">] </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">array</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">"18"</FONT><FONT COLOR="#000000">=2 </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">array</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">"19"</FONT><FONT COLOR="#000000">=-2 </FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">=0:1:</FONT><FONT COLOR="#800000">array</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">%Size</FONT><FONT COLOR="#000000">() </FONT><FONT COLOR="#800080">{ </FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">")"</FONT><FONT COLOR="#000000">,?4,</FONT><FONT COLOR="#800000">array</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">%Get</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">),?30,</FONT><FONT COLOR="#0000ff">$$</FONT><FONT COLOR="#ff0000">TypeOf1</FONT><FONT COLOR="#000000">(.</FONT><FONT COLOR="#800000">array</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">),?45,</FONT><FONT COLOR="#0000ff">$$</FONT><FONT COLOR="#ff0000">TypeOf2</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">array</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">%Get</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">)),! </FONT><FONT COLOR="#800080">} </FONT><FONT COLOR="#008000">// Return JSON datatype by the documented way // </FONT><FONT COLOR="#ff0000">TypeOf1</FONT><FONT COLOR="#000000">(&array,key) </FONT><FONT COLOR="#800080">{ </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">typ</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#800000">array</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">%GetTypeCodeOf</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">key</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#0000ff">q </FONT><FONT COLOR="#800000">typ</FONT><FONT COLOR="#000000"></FONT><FONT COLOR="#008000">" "</FONT><FONT COLOR="#000000"></FONT><FONT COLOR="#0000ff">$case</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">typ</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUENULL</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"null"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUETRUE</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"boolTrue"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEFALSE</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"boolFalse"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEINTEGERPOS</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"+int"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEINTEGERNEG</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"-int"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEUNUSED1</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"unused"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEARRAY</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"array"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEOBJECT</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"object"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUETEXT</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"text"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUENUMBER</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"number"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEOVERFLOW</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"overflow"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUECACHENUMERIC</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"cacheNumeric"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEOREF</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"oref"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEUNASSIGNED</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"unassigned"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUELONGPOS</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"+long"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUELONGNEG</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"-long"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEBYTE</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"byte[]"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEDATETIME</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"dateTime"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEDOUBLE</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"double"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUESINGLE</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"single"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEUTF8</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"utf8"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUENESTED</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"nested"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#0000ff">$$$PVVALUEEOF</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">"eof"</FONT><FONT COLOR="#000000">, :</FONT><FONT COLOR="#008000">"unknown"</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#800080">} </FONT><FONT COLOR="#008000">// Return datatype by the undocumented $LB() way // </FONT><FONT COLOR="#ff0000">TypeOf2</FONT><FONT COLOR="#000000">(val) </FONT><FONT COLOR="#800080">{ </FONT><FONT COLOR="#0000ff">i $l</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">val</FONT><FONT COLOR="#000000">)>253 </FONT><FONT COLOR="#800080">{ </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">typ</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#0000ff">$ziswide</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">val</FONT><FONT COLOR="#000000">)+1 </FONT><FONT COLOR="#800080">} </FONT><FONT COLOR="#0000ff">else </FONT><FONT COLOR="#800080">{ </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">typ</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#0000ff">$a</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$lb</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">val</FONT><FONT COLOR="#000000">),2) </FONT><FONT COLOR="#800080">} </FONT><FONT COLOR="#0000ff">q </FONT><FONT COLOR="#800000">typ</FONT><FONT COLOR="#000000"></FONT><FONT COLOR="#008000">" "</FONT><FONT COLOR="#000000"></FONT><FONT COLOR="#0000ff">$case</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">typ </FONT><FONT COLOR="#000000">,1:</FONT><FONT COLOR="#008000">"8bitString" </FONT><FONT COLOR="#000000">,2:</FONT><FONT COLOR="#008000">"16bitString" </FONT><FONT COLOR="#000000">,4:</FONT><FONT COLOR="#008000">"nonNegativeInteger" </FONT><FONT COLOR="#000000">,5:</FONT><FONT COLOR="#008000">"negativeInteger" </FONT><FONT COLOR="#000000">,6:</FONT><FONT COLOR="#008000">"nonNegativeFloat" </FONT><FONT COLOR="#000000">,7:</FONT><FONT COLOR="#008000">"negativeFloat" </FONT><FONT COLOR="#000000">,8:</FONT><FONT COLOR="#008000">"double" </FONT><FONT COLOR="#000000">, :</FONT><FONT COLOR="#008000">"??? never seen before"</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#800080">}</FONT>
USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000000">^types</FONT> № VALUE JSON $LISTBUILD
- 8 text 1 8bitString 8 text 1 8bitString
8 text 1 8bitString0 null 1 8bitString- 1 1 boolTrue 1 8bitString
- 0 2 boolFalse 1 8bitString
- 4@%ZEN.proxyObject 12 oref 1 8bitString
- 2@%Library.DynamicArray 6 array 1 8bitString
- 1@%Library.DynamicObject 7 object 1 8bitString
- abcd 8 text 1 8bitString
- 視 8 text 2 16bitString
- 2 8 text 1 8bitString
- 2 9 number 4 nonNegativeInteger
- -2 9 number 5 negativeInteger
- 2.1 9 number 6 nonNegativeFloat
- -2.1 9 number 7 negativeFloat
- 2.1000000000000000888 18 double 8 double
13 unassigned 1 8bitString- 2 3 +int 4 nonNegativeInteger
- -2 4 -int 5 negativeInteger
31 eof 1 8bitString</pre>
Upd: 72
Upd: 67
my code is disclosed above
This can be done also in the CLS.
<FONT COLOR="#ff0000">TEST</FONT><FONT COLOR="#000000">(invar) [outvar] </FONT><FONT COLOR="#0000ff">public </FONT><FONT COLOR="#800080">{
}</FONT>
=><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">TEST(</FONT><FONT COLOR="#ff00ff">invar</FONT><FONT COLOR="#000000">) [</FONT><FONT COLOR="#000080">PublicList</FONT><FONT COLOR="#000000">=outvar] {
}</FONT>
PublicListStill can be so:
<FONT COLOR="#000080">Class dc.test </FONT><FONT COLOR="#000000">[ </FONT><FONT COLOR="#000080">Abstract </FONT><FONT COLOR="#000000">]
{
</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">Test(</FONT><FONT COLOR="#ff00ff">s </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#800080">"#"</FONT><FONT COLOR="#000000">)
{
</FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#008000">"Test_"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">s
</FONT><FONT COLOR="#000000">}
</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">mac() [ </FONT><FONT COLOR="#000080">ProcedureBlock </FONT><FONT COLOR="#000000">= 0 ]
{
</FONT><FONT COLOR="#ff0000">sub1</FONT><FONT COLOR="#000000">(s=1)
</FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#008000">"sub1_"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">s
</FONT><FONT COLOR="#0000ff">q
</FONT><FONT COLOR="#ff0000">sub2</FONT><FONT COLOR="#000000">(s=2)
</FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#008000">"sub2_"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">s
</FONT><FONT COLOR="#0000ff">q
</FONT><FONT COLOR="#ff0000">procPrivate</FONT><FONT COLOR="#000000">(s=3) </FONT><FONT COLOR="#800080">{
</FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#008000">"procPrivate_"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">s
</FONT><FONT COLOR="#800080">}
</FONT><FONT COLOR="#ff0000">procPublic</FONT><FONT COLOR="#000000">(s=3) </FONT><FONT COLOR="#0000ff">public </FONT><FONT COLOR="#800080">{
</FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#008000">"procPublic_"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">s
</FONT><FONT COLOR="#800080">}
</FONT><FONT COLOR="#000000">}
}</FONT>
Result:USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#ff0000">zTest</FONT><FONT COLOR="#000000">^dc.test.1(1)</FONT> Test_1 USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#ff0000">sub1</FONT><FONT COLOR="#000000">^dc.test.1</FONT> sub1_1 USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#ff0000">sub2</FONT><FONT COLOR="#000000">^dc.test.1</FONT> sub2_2 USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#ff0000">sub1</FONT><FONT COLOR="#000000">^dc.test.1(10)</FONT> sub1_10 USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#ff0000">sub2</FONT><FONT COLOR="#000000">^dc.test.1(10)</FONT> sub2_10 USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#ff0000">procPrivate</FONT><FONT COLOR="#000000">^dc.test.1(10)</FONT>D procPrivate^dc.test.1(10) ^ <NOLINE> USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#ff0000">procPublic</FONT><FONT COLOR="#000000">^dc.test.1(10)</FONT> procPublic_10 USER>
For self - education is the best - documentation, for example:
You can see the code examples and coding style in the sources of namespaces '%SYS' and/or 'SAMPLES'. But keep in mind that the style of classes written a long time ago differs significantly from style of classes written relatively recently, ex. [$ZT vs try/catch] or [%ResultSet vs %SQL.Statement]
Here is my solution, which has a number of advantages:
See my article for details: Indexing of non-atomic attributes
Class dc.TSOrder Extends (%Persistent, %Populate)
{
</FONT><FONT COLOR="#000080">Index </FONT><FONT COLOR="#000000">Extent [ </FONT><FONT COLOR="#000080">Extent</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#000080">Type </FONT><FONT COLOR="#000000">= bitmap ];
</FONT><FONT COLOR="#000080">Index </FONT><FONT COLOR="#000000">iSmartTS On (TS(KEYS), TS(ELEMENTS));
</FONT><FONT COLOR="#000080">Index </FONT><FONT COLOR="#000000">iTS On TS;
</FONT><FONT COLOR="#000080">Property </FONT><FONT COLOR="#000000">TS </FONT><FONT COLOR="#000080">As %TimeStamp</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#000080">MAXVAL </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#800080">"2016-07-31 23:59:59.999999"</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#000080">MINVAL </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#800080">"2016-07-01 00:00:00.000000"</FONT><FONT COLOR="#000000">);
</FONT><FONT COLOR="#000080">Property </FONT><FONT COLOR="#000000">Data </FONT><FONT COLOR="#000080">As %String</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#000080">MAXLEN </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">200</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#000080">MINLEN </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">100</FONT><FONT COLOR="#000000">);
</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">TSBuildValueArray(
</FONT><FONT COLOR="#ff00ff">value</FONT><FONT COLOR="#000000">,
</FONT><FONT COLOR="#000080">ByRef </FONT><FONT COLOR="#ff00ff">array</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#000080">As %Status
</FONT><FONT COLOR="#000000">{
</FONT><FONT COLOR="#0000ff">i </FONT><FONT COLOR="#800000">value</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"" </FONT><FONT COLOR="#800080">{
</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">array</FONT><FONT COLOR="#000000">(0)=</FONT><FONT COLOR="#800000">value
</FONT><FONT COLOR="#800080">}</FONT><FONT COLOR="#0000ff">else</FONT><FONT COLOR="#800080">{
</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">date</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#0000ff">$p</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">value</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">" "</FONT><FONT COLOR="#000000">,1),
</FONT><FONT COLOR="#800000">time</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#0000ff">$p</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">value</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">" "</FONT><FONT COLOR="#000000">,2),
</FONT><FONT COLOR="#800000">array</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"date"</FONT><FONT COLOR="#000000">)=</FONT><FONT COLOR="#800000">date</FONT><FONT COLOR="#000000">,
</FONT><FONT COLOR="#800000">array</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"time"</FONT><FONT COLOR="#000000">)=</FONT><FONT COLOR="#800000">time</FONT><FONT COLOR="#000000">,
</FONT><FONT COLOR="#800000">array</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"ddhh"</FONT><FONT COLOR="#000000">)=</FONT><FONT COLOR="#0000ff">$p</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">date</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"-"</FONT><FONT COLOR="#000000">,3)</FONT><FONT COLOR="#008000">"-"</FONT><FONT COLOR="#000000"></FONT><FONT COLOR="#0000ff">$p</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">time</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">":"</FONT><FONT COLOR="#000000">,1)
</FONT><FONT COLOR="#800080">}
</FONT><FONT COLOR="#0000ff">q $$$OK
</FONT><FONT COLOR="#000000">}
</FONT><FONT COLOR="#000080">/// d ##class(dc.TSOrder).Fill()
ClassMethod </FONT><FONT COLOR="#000000">Fill(</FONT><FONT COLOR="#ff00ff">N </FONT><FONT COLOR="#000000">= {30e6})
{
</FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000000">..</FONT><FONT COLOR="#0000ff">%KillExtent</FONT><FONT COLOR="#000000">(), ..</FONT><FONT COLOR="#0000ff">Populate</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">N</FONT><FONT COLOR="#000000">), </FONT><FONT COLOR="#0000ff">$system</FONT><FONT COLOR="#008080">.SQL</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">TuneTable</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$classname</FONT><FONT COLOR="#000000">(),</FONT><FONT COLOR="#0000ff">$$$YES</FONT><FONT COLOR="#000000">), </FONT><FONT COLOR="#0000ff">$system</FONT><FONT COLOR="#008080">.OBJ</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">Compile</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$classname</FONT><FONT COLOR="#000000">(),</FONT><FONT COLOR="#008000">"cu-d"</FONT><FONT COLOR="#000000">)
}
}</FONT>
Results from SMP:
<FONT COLOR="#0000ff">select </FONT><FONT COLOR="#000080">distinct null from </FONT><FONT COLOR="#008000">dc</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#008000">TSOrder </FONT><FONT COLOR="#000080">where </FONT><FONT COLOR="#008000">TS </FONT><FONT COLOR="#000000">between {</FONT><FONT COLOR="#000080">ts </FONT><FONT COLOR="#008080">'2016-07-01 00:00:00.00000'</FONT><FONT COLOR="#000000">} AND {</FONT><FONT COLOR="#000080">ts </FONT><FONT COLOR="#008080">'2016-07-01 23:59:59.999999'</FONT><FONT COLOR="#000000">}</FONT>
Performance: 2.339 seconds 2109755 global references 14768692 lines executed
(the number of selected records is 968476, used the normal index)
<FONT COLOR="#0000ff">select </FONT><FONT COLOR="#000080">distinct null from </FONT><FONT COLOR="#008000">dc</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#008000">TSOrder </FONT><FONT COLOR="#000080">where </FONT><FONT COLOR="#000000">for some %element(</FONT><FONT COLOR="#008000">TS</FONT><FONT COLOR="#000000">) (</FONT><FONT COLOR="#008000">%key</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008080">'date' </FONT><FONT COLOR="#000000">and </FONT><FONT COLOR="#008000">%value </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#008080">'2016-07-01'</FONT><FONT COLOR="#000000">)</FONT>
Performance: 2.269 seconds 1936962 global references 15496098 lines executed
(the number of selected records is 968476, used the "smart" index)
<FONT COLOR="#0000ff">select </FONT><FONT COLOR="#000080">distinct null from </FONT><FONT COLOR="#008000">dc</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#008000">TSOrder </FONT><FONT COLOR="#000080">where </FONT><FONT COLOR="#000000">for some %element(</FONT><FONT COLOR="#008000">TS</FONT><FONT COLOR="#000000">) (</FONT><FONT COLOR="#008000">%key</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008080">'ddhh' </FONT><FONT COLOR="#000000">and </FONT><FONT COLOR="#008000">%value </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#008080">'01-13'</FONT><FONT COLOR="#000000">)</FONT>
Performance: 0.096 seconds 80488 global references 644270 lines executed
(the number of selected records is 40239, used the "smart" index)
Yes, this (Classmethod Public) is only necessary for the second example.
You can change the XSLFO Stylesheet dynamically or statically. See XSLFOSTYLESHEET
So, there is a class-report, for example MyApp.ReportDemo.
Series of steps:SAMPLES>d $system.OBJ.DisplayError(##class(MyApp.ReportDemo).GenerateToFile($system.CSP.GetFileName($system.CSP.GetDefaultApp($zu(5))_"/MyApp.ReportDemo.xsl"),4))
/// If defined, this provides a reference to the external /// stylesheet to use in generating the XSL-FO (PDF) report. /// If it is not provided, a stylesheet will be generated /// from the ReportDisplay XData block. Parameter XSLFOSTYLESHEET As String = "MyApp.ReportDemo.xsl";
Now open the report in your browser/command line/etc. Profit!
Important: if you change something in ReportDisplay, you need to repeat the steps again.
This not it?
And if so?
Class dc.EmbedObj Extends %SerialObject
{
Property pOID As %ObjectIdentity [ Private ];
Property a As %String;
Property b As %String [ Calculated, SqlComputeCode = {s {*}=##class(dc.EmbedObj).Calcb({pOID})}, SqlComputed ];
ClassMethod Calcb(pOID) As %String
{
s r=""
q:pOID="" r
s $lb(id,cls)=$lfs(pOID,"@")
s p=$system.OBJ.OpenId(cls,id)
q:'$IsObject(p) r
i cls="dc.ContainerObj" {
s r="b"_p.Foobar
}elseif cls="dc.blablablaContainerObj" {
s r="b"_p.qwe
}
q r
}
}Class dc.ContainerObj Extends %Persistent
{
Property Foobar As %String;
Property InnerObj As dc.EmbedObj;
Trigger NewTrigger1 [ Event = INSERT, Foreach = row/object, Time = AFTER ]
{
n oid
s oid={%%ID}_"@"_{%%CLASSNAMEQ}
&sql(update dc.ContainerObj set InnerObj_pOID=:oid where %ID=:{id})
}
/// d ##class(dc.ContainerObj).Test()
ClassMethod Test()
{
d ..%KillExtent()
s t=..%New()
s t.Foobar="foobar1"
s t.InnerObj.a="a1"
d t.%Save()
&sql(insert into dc.ContainerObj(Foobar,InnerObj_a) values('foobar2','a2'))
d ##class(%SQL.Statement).%ExecDirect(,"select * from dc.ContainerObj").%Display()
}
}I.e. you need Callback methods for Studio, Atelier, etc.?
The documentation strongly recommends against doing so: Exercise caution when comparing local time and UTC time
Use %MVR
For example:Class dc.test Extends %Persistent
{
</FONT><FONT COLOR="#000080">Index </FONT><FONT COLOR="#000000">ibar On bar;
</FONT><FONT COLOR="#000080">Property </FONT><FONT COLOR="#000000">bar </FONT><FONT COLOR="#000080">As %String</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#000080">COLLATION </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#800080">"MVR"</FONT><FONT COLOR="#000000">);
</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">Test()
{
</FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000000">..</FONT><FONT COLOR="#0000ff">%KillExtent</FONT><FONT COLOR="#000000">()
</FONT><FONT COLOR="#800080">&sql(</FONT><FONT COLOR="#0000ff">insert </FONT><FONT COLOR="#000080">into </FONT><FONT COLOR="#008000">dc</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#008000">test</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">bar</FONT><FONT COLOR="#000000">)
</FONT><FONT COLOR="#0000ff">select </FONT><FONT COLOR="#008080">'00123AB' </FONT><FONT COLOR="#000080">union
</FONT><FONT COLOR="#0000ff">select </FONT><FONT COLOR="#008080">'12345AB'</FONT><FONT COLOR="#800080">)
</FONT><FONT COLOR="#0000ff">d $system</FONT><FONT COLOR="#008080">.SQL</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">TuneTable</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$classname</FONT><FONT COLOR="#000000">(),</FONT><FONT COLOR="#0000ff">$$$YES</FONT><FONT COLOR="#000000">), </FONT><FONT COLOR="#0000ff">$system</FONT><FONT COLOR="#008080">.OBJ</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">Compile</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$classname</FONT><FONT COLOR="#000000">(),</FONT><FONT COLOR="#008000">"cu-d"</FONT><FONT COLOR="#000000">)
</FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">args</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"00123AB"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"123AB" </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">%SQL.Statement</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%ExecDirect</FONT><FONT COLOR="#000000">(,</FONT><FONT COLOR="#008000">"select * from dc.test where bar=?"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">args</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%Display</FONT><FONT COLOR="#000000">() </FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#000000">!!
}
}</FONT>
Result:USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">dc.test</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">Test</FONT><FONT COLOR="#000000">()</FONT> ID bar 1 00123AB1 Rows(s) Affected
ID bar 1 00123AB
1 Rows(s) Affected
REST, JDBC - of course.
And what you are not satisfied with the native classes %Stream.FileBinaryGzip, %Stream.FileCharacterGzip?