Article
· Dec 23, 2015 1m read
Caché ObjectScript Quick Reference

In the Caché Foundations course, students are learning about Caché Development and ObjectScript syntax at the same time. To help students complete the exercises, we provide an ObjectScript Quick Reference (aka "the Cheat Sheet").

It is not a reference for all of ObjectScript! It is a list of the ObjectScript commands and functions that students use during the course, along with common syntax for objects, collections, etc. It also contains some useful macros.

7 6
0 1.3K
Article
· Mar 3, 2016 2m read
Class Projections and Projection Classes

The purpose of this post is to raise the profile of a powerful mechanism that has long been available to us, and to open a discussion about ways in which it can be used or abused.

You can read more detail about the mechanism here. To summarize, your class definition can use the Projection keyword to reference one or more projection classes. A projection class can implement methods that get invoked at key points in the lifecycle of your class.

8 18
0 1.4K
Article
· Feb 15, 2021 17m read
Four Database APIs

A concurrent session in IRIS:
SQL, Objects, REST, and GraphQL

Kazimir Malevich, "Athletes" (1932)

"But of course you don't understand! How can a person who has always traveled in a horse-drawn carriage understand the feelings and impressions of the express traveler or the pilot in the air?"

Kazimir Malevich (1916)

Introduction

We’ve already addressed the topic of why object/type representation is superior to SQL for implementing subject area models. And those conclusions and facts are as true now as they have ever been. So why should we take a step back and discuss technologies that drag abstractions back to the global level, where they had been in the pre-object and pre-type era? Why should we encourage the use of spaghetti code, which results in bugs that are hard to track down, and which relies only on virtuoso developer skills?

There are several arguments in favor of transmitting data via SQL/REST/GraphQL-based APIs as opposed to representing them as types/objects:

9 2
4 870

In my previous article, we reviewed possible use-cases for macros, so let’s now proceed to a more comprehensive example of macros usability. In this article we will design and build a logging system.

Logging system

Logging system is a useful tool for monitoring the work of an application that saves a lot of time during debugging and monitoring. Our system would consist of two parts:

  • Storage class (for log records)
  • Set of macros that automatically add a new record to the log

15 6
9 2.8K

Hi Developers!

Here're the technology bonuses for the InterSystems Multi-Model Contest that will give you extra points in the voting:

  • InterSystems Globals (key-value)
  • InterSystems SQL
  • InterSystems Objects
  • Your data model
  • ZPM Package deployment
  • Docker container usage

See the details below.<--break->

0 3
1 217

We are trying to convert some of our SQL Service Integration Service jobs from Visual Studio to Ensemble. If we execute a Stored Procedure within SQL Server Management Studio it is returning approx 12,000 rows. However when Ensemble executes the same Stored Procedure it is only returning 250 rows.

Is there a limitation to EnsLib.SQL.Snapshot?

This is how we are calling the Stored procedure

0 4
0 787
Article
· Feb 5, 2016 11m read
Class Queries in InterSystems IRIS

Class Queries in InterSystems IRIS (and Cache, Ensemble, HealthShare) is a useful tool that separates SQL queries from Object Script code. Basically, it works like this: suppose that you want to use the same SQL query with different arguments in several different places.In this case you can avoid code duplication by declaring the query body as a class query and then calling this query by name. This approach is also convenient for custom queries, in which the task of obtaining the next row is defined by a developer. Sounds interesting? Then read on!

17 17
6 6.9K

Edit:

May have found the issue but not the solution.

"SELECT * FROM wmhISTORYdETAIL" runs as a passthrough without asking for the DNS.

but

'SELECT Count([wmhISTORYdETAIL].[HistHMNumber] AS CountOfHistHMNumber FROM [wmhISTORYdETAIL] WHERE ((([wmhISTORYdETAIL].[HistMovType])='Receipt') AND (([wmhISTORYdETAIL].[HistMovDate])>=Date()-1) AND (([wmhISTORYdETAIL].[HistMovDate])<Date()));'

asks for the DNS but both are linked to a table that has the password saved.

Any Ideas please?

Rob

Hi

0 1
0 327

Let's say we have two serial classes, one as a property of another:

Class test.Serial Extends %SerialObject
{
Property Serial2 As test.Serial2;
}

Class test.Serial2 Extends %SerialObject
{
Property Property As %String;
}

And a persistent class, that has a property of test.Serial type:

Class test.Persistent Extends %Persistent
{

Property Datatype As %String;

Property Serial As test.Serial;

}

So it's a serial, inside a serial, inside a persistent object.

4 2
0 401

In this article I'd like to share with you a phenomena that is best you avoid - something you should be aware of when designing your data model (or building your Business Processes) in Caché or in Ensemble (or older HealthShare Health Connect Ensemble-based versions).

3 2
0 342
Article
· Jul 21, 2020 1m read
Snapshot to JSON

This is a sample to use %JSON.Adaptor class available in IRIS to produce a snapshot of your object.

The sample consists of 2 classes that are variations of what was known in Caché/SAMPLES as Sample.Person.
Be aware that the possibilities are limited by %JSON.Adapter and how you make use of it.

Once in place, you create some test data by Populate().
You select an object and take a snapshot.
You apply changes to your object and take another snapshot.
And see the difference.

BINGO!

10 0
0 628