User bio

元androidエンジニアです。

Member since Mar 29, 2021
Posts:
Yuji has not published any posts yet.
Replies:

Hi,

You need use Persistent class.
https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic....

Community article.
https://community.intersystems.com/post/art-mapping-globals-classes-1-3

Like this.(Display ^Hban global on Dbeaver what used SQL.)

Class Gbl.Hban Extends %Persistent [ SqlRowIdPrivate, StorageStrategy = MyGlobalStorage ]
{

/// Index
Index KeyIndex On (year, key) [ IdKey, Unique ];

/// first key
Property year As %Integer [ Required, SqlColumnNumber = 2 ];

/// second key
Property key As %String [ Required, SqlColumnNumber = 3 ];

/// third key
Property data As %String;

Storage MyGlobalStorage
{
<Description>
<![CDATA[]]></Description>
<SQLMap name="GblMap">
<Data name="data">
<Delimiter>"^"</Delimiter>
<Piece>1</Piece>
</Data>
<Global>^Hban</Global>
<RowIdSpec name="1">
<Expression>{L1}</Expression>
<Field>year</Field>
</RowIdSpec>
<RowIdSpec name="2">
<Expression>{L2}</Expression>
<Field>key</Field>
</RowIdSpec>
<Subscript name="1">
<Expression>{year}</Expression>
</Subscript>
<Subscript name="2">
<Expression>{key}</Expression>
</Subscript>
<Type>data</Type>
</SQLMap>
<StreamLocation>^Gbl.TestS</StreamLocation>
<Type>%Storage.SQL</Type>
}

}

Certifications & Credly badges:
Yuji has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Yuji has no followers yet.
Following:
Yuji has not followed anybody yet.