发布新帖

Pesquisar

摘要
· 一月 25

InterSystems 开发者社区中文版:每周摘要(1月19日-25日)

一月 19 - 25, 2026Week at a GlanceInterSystems Developer Community
文章
· 一月 25 阅读大约需 4 分钟

Ways to store and query lists and arrays in IRIS

As mentioned in the previous article, it is possible to configure the way you wish your collections to be stored and queried in SQL.

To set this up, you will need to use the following field parameters and settings:

The STORAGEDEFAULT parameter tells the IRIS compiler which physical data structure to use when writing a collection to a Global.

For a list of properties, the default value is "list", meaning that the data is serialized into a single string using $LISTBUILD (an internal binary format). It is stored as part of the main object’s data node in the global.

For an array of properties, the default value is "array", meaning that each element is stored in a separate global subnode. This essentially creates a "child" structure on the disk. It is best for large collections where you need to update or delete single items without rewriting the entire record.

But, at the same time, you can toggle these settings, and you can force a List to act like an Array (and vice versa) for performance reasons. For example,

Property Notes As list of %String (STORAGEDEFAULT = "array");

This will store the list in subnodes, making individual item updates much faster.

To go further, you can tell the system how you wish your data to be mapped in SQL. For this, use the field parameter SQLPROJECTION. It is the most powerful tool for making collections "visible" to SQL.

Value SQL Representation Description
"column" Single Column The entire collection appears as one field. Lists show up as a delimited string or $LIST.
"table" Child Table IRIS automatically generates a secondary table linked by a Foreign Key (the parent's ID).
"table/column" Dual Projection The property appears both as a field in the main table and as a separate child table.

You can set both column and table setting to both list and array.

Beyond the big two, several parameters influence the nuances of how these collections behave in SQL.

SqlListType  (for list properties only), as mentioned in the previous article, defines the format of the data when it is projected as a single column, and can get one of the following values:

  • LIST (default) returns the internal IRIS $LIST format. Best for IRIS-to-IRIS integrations.
  • DELIMITED returns a string separated by a character (defined by SqlListDelimiter ). Best for legacy CSV exports or simple reporting.
  • SUBNODE - the data is physically stored in subnodes (like an array) but seen in SQL as a single field.

When SQLPROJECTION =  "table" is used, these determine the naming convention:

  • SQLTABLENAME - name of the generated child table (e.g., Employee_Phones)
  • SQLFIELDNAME - name of the value column within that child table

Now let's look at the example. Let's say we have the following class:

Class CRM.Contact Extends (%Persistent, %Populate) [ SqlRowIdName = Contact_PK ]
{

/// 1. Standard Property: Custom SQL field name
Property FullName As %String(MAXLEN = 100) [ SqlFieldName = Contact_Name ];

/// 2. Simple List: Projected as a single column
/// Reason: Use this for small sets of data where you just need to see them in one cell.
/// Goal: Compatibility with legacy tools using comma-delimited strings.
Property Tags As list Of %String [ SqlFieldName = Category_Tags, SqlListType = DELIMITED ];

/// 3. Performance-Optimized List: Projected as a Child Table
/// Reason: 'STORAGEDEFAULT = array' ensures that adding a 10th phone number 
///         doesn't require rewriting the whole contact record (O(1) vs O(N)).
/// Goal: Allow BI tools to JOIN on phone numbers without complex parsing.
Property PhoneNumbers As list Of %String(SQLPROJECTION = "table", SQLTABLENAME = "Contact_Phones", STORAGEDEFAULT = "array");

/// 4. Key-Value Array: Projected as a Table
/// Reason: Arrays are naturally stored as subnodes. Projecting as a table 
///         allows SQL users to query specific keys easily.
Property Metadata As array Of %String(SQLPROJECTION = "table", SQLTABLENAME = "Contact_Metadata");
}

If we now create 10 instances of this class, we can execute the following queries and see the results:

SELECT *
  FROM CRM.Contact

So we can see that the FullName field is called Contact_Name, the primary field is called Contact_PK and the only other field we have is Category_Tags that is a delimited list.

At the same time, we have 2 additional tables: CRM.Contact_Metadata and CRM.Contact_Phones

If we execute the query

SELECT *
  FROM CRM.Contact_Phones

we will see that our list of PhoneNumbers actually looks like it's an array with the primary key from the main table (CRM.Contact), primary key of this table which is a composition of the Contact PK and position of the data in the list, list data and the position of the data in the list:

If we execute the query

SELECT *
  FROM CRM.Contact_Metadata

we will see a usual table with the primary key from the main table (CRM.Contact), primary key of this table, which is a composition of the Contact PK and array key, array key, and array data:

So basically, the difference between the last two results is that for the list represented as a table, the element_key is the position of the element in the list, and for the array - it's the actual key.

Hopefully, this will help you to make an informed decision on how you would like to store and represent your collections!

讨论 (0)0
登录或注册以继续
文章
· 一月 25 阅读大约需 2 分钟

Reviews on Open Exchange - #63

If one of your packages on OEX receives a review, you get notified by OEX only of YOUR own package.   
The rating reflects the experience of the reviewer with the status found at the time of review.   
It is kind of a snapshot and might have changed meanwhile.   
Reviews by other members of the community are marked by * in the last column.

I also placed a bunch of Pull Requests on GitHub when I found a problem I could fix.    
Some were accepted and merged, and some were just ignored.     
So if you made a major change and expect a changed review, just let me know.
 

# Package Review Stars IPM Docker *
1 IRIS OpenTelemetry Demo impressive 7 containers concert 5.5   y  
2 DBdashboard impressive catch 5.0   y *
3 DBfree super multi instance monitoring 5.0   y *
4 IRIS-EchoServer-WebSockets echo inside IRIS 5.0   y *
5 iris-health-fhir-agentic-demo not just big but great 5.0   y *
6 ML Made Easy : IntegratedML an excellent training for beginners 5.0   y  
7 restoreUI a pleasure to work with 5.0 y y  
8 WebSocketsSample hidden treasure detected 5.0      
9 CSV-to-MS-OFX rare subjects 4.8   y *
10 GeoDatas works partially 3.5   y  
11 CommunityEns requires some adjustments 3.3   y  
12 ALPHA LOGISTICS partner posting *      
13 ERP Plenum partner posting *      

 

NOTE:
If some review is not readable for you, it might still wait for approval by OEX admins.

讨论 (0)1
登录或注册以继续
讨论
· 一月 25

Global Masters - Random Coffee Chat - Asia & Pacific

Hi Community! 👋

You’ve asked for easier ways to connect with other Global Masters and we heard you!
Random Coffee Chat is an easy way for Global Masters to connect and have an informal 1:1 conversation. ☕

🗓 When: January 26 – February 9

This thread is for participants based in Asia, Australia and New Zealand who’d like to connect and schedule a short coffee chat directly with each other.

 
☕ How it works

  • Leave a comment in this thread to join
  • Reply to someone’s comment if you’d like to connect
  • Continue the conversation in Direct Messages and schedule a 30-minute quick call

You choose who to connect with and when.

Participants connect directly with each other via Direct Messages on the Developer Community and choose a time that works best for both sides.

☕ After your coffee chat, share a quick screenshot from your call in the Random Coffee Chat ASK on Global Masters, and earn 100 Global Masters points as a thank-you for participating.

💬 Example comment (copy & paste)

Hi! I’m in for a random coffee chat ☕
Location: Australia
Availability: Wed–Fri, 10:00–13:00
Happy to chat about: getting to know each other, AI & automation, READY 2026 plans

🧠 Suggested topics & ice breakers

  • Just getting to know each other and what you enjoy outside of work 
  • AI, automation, and agent-based solutions
  • Developer tools, productivity, and workflows
  • Community contributions and favorite DC topics
  • InterSystems READY plans and past event experiences

⏱ Format

  • 30-minute informal video or audio call
  • Any tool that works for both of you

Looking forward to seeing new connections happen here 🚀

讨论 (0)1
登录或注册以继续
讨论
· 一月 25

Global Masters - Random Coffee Chat - Americas

Hi Community! 👋

You’ve asked for easier ways to connect with other Global Masters and we heard you!
Random Coffee Chat is an easy way for Global Masters to connect and have an informal 1:1 conversation. ☕

🗓 When: January 26 – February 9

This thread is for participants based in North, Central, and South America who’d like to connect and schedule a short coffee chat directly with each other.

 
☕ How it works

  • Leave a comment in this thread to join
  • Reply to someone’s comment if you’d like to connect
  • Continue the conversation in Direct Messages and schedule a 30-minute quick call

You choose who to connect with and when.

Participants connect directly with each other via Direct Messages on the Developer Community and choose a time that works best for both sides.

☕ After your coffee chat, share a quick screenshot from your call in the Random Coffee Chat ASK on Global Masters, and earn 100 Global Masters points as a thank-you for participating.

💬 Example comment (copy & paste)

Hi! I’m in for a random coffee chat ☕
Location: USA
Availability: Wed–Fri, 10:00–13:00
Happy to chat about: getting to know each other, AI & automation, READY 2026 plans

🧠 Suggested topics & ice breakers

  • Just getting to know each other and what you enjoy outside of work 
  • AI, automation, and agent-based solutions
  • Developer tools, productivity, and workflows
  • Community contributions and favorite DC topics
  • InterSystems READY plans and past event experiences

⏱ Format

  • 30-minute informal video or audio call
  • Any tool that works for both of you

Looking forward to seeing new connections happen here 🚀

讨论 (0)1
登录或注册以继续