Class Queries in InterSystems Caché is a useful tool that separates SQL queries from 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!
Compiler
Last comment 9 December 2016
As a developer, you have probably spent at least some time writing repetetive code. You may have even found yourself wishing you could generate the code programmatically.
Last comment 22 November 2016
In this article I would like to tell you about macros in InterSystems Caché. A macro is a symbolic name that is replaced with a set of instructions during compilation. A macro can “unfold” in various instruction sets each time it is called, depending on the parameters passed to it and activated scenarios. This can be both static code and the result of ObjectScript execution. Let's take a look at how you can use them in your application.
Last comment 24 July 2017
This is a translation of the following article. Thanks @Evgeny Shvarov for the help in translation.
Let's assume that you wrote a program that shows "Hello World!", for example:
write "Hello, World!"
The program works and everyone is happy.
With time, however, your program becomes more complex, gets more features and you eventually need to show the same string in different languages. Moreover you don't know the number and names of these languages.
The spoiler below contains a description of how the task of multi-language localization is solved in Caché.
Last comment 20 May 2017
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
Last comment 24 March 2017
Greetings! This article describes yet another simple way of creating installers for the solutions based on InterSystems Caché. The topic covers applications, which can be installed or completely removed from Caché with one action only. If you are still documenting installation instructions that have more than one step to do to install your application — it’s high time you automated this process.
Last comment 10 May 2016
In most cases, if one class depends on another, the class compiler will detect this and determine the correct compilation order. For example:
Last comment 31 January 2019
Beginner, Caché, Caché Objects, Code snippet, Compiler, Development Environment, ObjectScript, System Administration
Here you have an easy way to write and execute COS code from your unix scripts. This way one does not need to write routines or even open Studio or Atelier.
Last comment 14 October 2016
So another topic that has been of interest to a number of people since the beta was put up last week is in regard to Studio Hooks and Atelier.
Last comment 3 March 2016
Hi all!
I'm developing a mini-framework to implement annotations in Cache. I want to support two kind of annotations: metadata and method decorators. I've got stuck trying to implement the second one.
Last answer 25 January 2017 Last comment 26 January 2017
Due to a new project I'm getting involved inside %Installer stuff deeper than ever I'd be happy to.
Last answer 28 March 2017 Last comment 28 March 2017
Hi -
I'm trying to create a method that will automatically create something I can save and use later, which will let me automate data migration from one version of a class to the next.
Last answer 5 April 2016 Last comment 7 April 2016
When I try to compile through Atelier (Compile Project), I noticed that in compilation with error it returns this message 'Failed to read /api/atelier/v1/ ...':
Last comment 24 July 2018
Using our cool new debugging extension for Visual Studio Code I'm trying to debug a CreateProjection method of a class, but when I compile it the work apparently gets done in one of the worker jobs, so my breakpoi
Last answer 2 October 2018 Last comment 4 October 2018
The class %Compiler.UDL.TextServices arrived in 2015.1, bringing us methods for exporting a class in UDL format (i.e. looking just like we're used to seeing it in Studio), and importing a UDL format definition back into a namespace. Some source control tools including our Deltanji are now able to use UDL format, resulting in diffs that are easier to understand.
Last comment 1 February 2017
Is there a way to manually compile a class or package without having to save?
Using the perforce integration I did a "Undo Check Out" and the code was revered but not compiled.
Last answer 19 April 2016 Last comment 20 April 2016
I have just imported our Ensemble project (not a really big one, like two man-years) into my MacBook Air Ensemble 2016.3 instance to test many things (document model, etc.), Atelier among the others.
Last answer 6 December 2018
I'm looking at adding multilingual support to a couple of open source projects I'm working on. The solutions are already developed in CSP so I am not looking for alternative approaches.
Last answer 11 May 2017 Last comment 12 September 2017
Hi community!
Is there any way to create new method keywords?
For example:
Last answer 12 June 2018 Last comment 14 June 2018
Hi all,
I was wondering if there is any way to trigger the compilation of a class based on the compilation of another (unrelated) class. For example:
Class 1 = test.class
Last answer 18 July 2017 Last comment 19 July 2017
I am using &html<> to output some CSS to my page (which is a class-based and not a tag-based page), and the selectors contain the '>' character which the compiler chokes on.
Last answer 20 November 2015 Last comment 20 November 2015
I have a class and I would like to dynamically change its selectivity attribute in run-time and then call $system.OBJ.Compile to
Last answer 18 July 2017 Last comment 18 July 2017
Hi All,Can you please any one tell me how to find the last compilation date of routine.
Last answer 15 November 2016 Last comment 8 November 2016
I am trying to import the SalesForce Enterprise WSDL in InterSystems Ensemble Studio using the SOAP Add-In. However, when I do so I receive a class dependency loop, Error #5316 during compilation.
Last answer 15 August 2017 Last comment 15 August 2017
Hello, I just noticed that the following query is not allowing when using cached queries.
Last answer 4 September 2017 Last comment 5 September 2017
The definitions of these two compiler keywords looks very similar to me.
Is there any difference between these two keywords ?
Last answer 27 September 2017