Article Eduard Lebedyuk · Oct 18, 2016 7m read Macros in the InterSystems Caché 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. #Beginner #Best Practices #Caché #Compiler #Terminal #ObjectScript #Tips & Tricks 9 3 0 2.2K
Article Eduard Lebedyuk · Oct 6, 2016 3m read Tips & Tricks - Automatic removal of system methods from codebase Recently I wrote about automatic removal of system methods from the codebase. Today, I'm ready to present you a working solution (codename: SMR) for this task. #Caché #Change Management #Code Snippet #ObjectScript #Tips & Tricks 4 5 0 700
Article Eduard Lebedyuk · Oct 3, 2016 3m read Tips & Tricks - SQL to Excel End users sure love Excel tables. So, how can you deliver the second to the first? Read this post to find out. #Caché #Code Snippet #SQL #Tips & Tricks 6 6 1 2.5K
Question Eduard Lebedyuk · Sep 28, 2016 How do I get display value of a property via ODBC I have a class with a string property with DISPLAYLIST and VALUELIST parameters specified.When I query this class via ODBC I receive logical value as it is and not a display value.Is there any way (without stored procedure) to get display value? #ODBC #SQL #Caché 0 3 0 573
Question Eduard Lebedyuk · Sep 26, 2016 Automatic removal of system methods from codebase As we've all heard 2016.2 draws near and brings the removal of system methods with it.There are two ways to make the code compatible with 2016.2:Replace system methods with new methodsReplace system methods with macros #Caché #Compatibility #ObjectScript 1 1 0 391
Article Eduard Lebedyuk · Sep 26, 2016 2m read Tips & Tricks - Export object to global We're developing Ensemble PoC and one day our frontend developer (who doesn't have Ensemble production running) said that Populate just doesn't cut it and he needs to see the real data. He needed only one object, but the problem was - it's a big object. Still, I checked ids of everything related and wrote this command (parts omitted, but you get the idea): #Code Snippet #Globals #Key Value #Object Data Model #Tips & Tricks #Caché 2 1 0 653
Question Eduard Lebedyuk · Sep 16, 2016 Exporting global nodes to xml Let's say I have a global named ^a and I need to export its nodes 1, 2, 3, 5 only. Currently I write something like this: Write $SYSTEM.OBJ.Export("a(1).gbl,a(2).gbl,a(3).gbl,a(5).gbl", "C:\Users\eduard\Desktop\a.xml") Is there a way to write it shorter? I want to write global node once and list all the subscripts I need. #Caché #Globals 1 1 0 647
Article Eduard Lebedyuk · Sep 13, 2016 7m read User authentication using Arduino with RFID In the previous article, I had just started working with Arduino, and got a meteorological station to show as a result. In this article, let's go further: we will set up authentication via RFID cards and Arduino against the InterSystems Caché application. #Authentication #Security #Terminal #Access control #Caché 8 3 1 4.7K
Article Eduard Lebedyuk · Sep 6, 2016 2m read Some considerations when creating objects with >1 level of serial objects 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. #Object Data Model #SQL #Caché 4 2 0 407
Question Eduard Lebedyuk · Aug 10, 2016 How do I invoke Ensemble testing service for requests with %ArrayOfDataTypes property from SMP I have the following Ensemble request: Class MyApp.MyRequest Extends (%Persistent, Ens.Request) { Property idToTokenArray As %ArrayOfDataTypes; } On SMP Testing service page it looks like this: But my attempts to set idToTokenArray have not yielded any positive results so far. How do I need to fill it? #Ensemble #Business Service 2 2 0 464
Article Eduard Lebedyuk · Aug 9, 2016 2m read Tips & Tricks - Process-private Globals as a class storage Process-private Globals can be used as a data global in storage definition. That way, each process can have its own objects for the class with ppg storage. For example lets define a pool, which can:add elements to a pool (ignoring duplicates)check if an element exists in the poolHere's the class: #Code Snippet #Data Model #Globals #Object Data Model #ObjectScript #Tips & Tricks #Caché 4 2 0 889
Article Eduard Lebedyuk · Aug 1, 2016 2m read Tips & Tricks - ByRef object passing Today, I was reading some source code, and encountered the following method signature: Method SendRequestSync(pRequest As %Library.Persistent, ByRef pResponse As %Library.Persistent) And I immediately thought, why is there a ByRef? #Object Data Model #Tips & Tricks #Caché 6 4 1 2K
Question Eduard Lebedyuk · Jul 14, 2016 How to set compilation flags/qualifiers? I have the following problem: There are several classes with method generators, which needs to be compiled during every compilationI have "ckub" qualifiers enabled in studioI don't want to remove "u" qualifier because I need it very much in another namespaces So how do I force classes with method generators to recompile when "u" qualifier is present? #Caché #Compiler #Studio #ObjectScript 0 2 0 1.2K
Article Eduard Lebedyuk · Jul 5, 2016 3m read Useful auto-generated methods For each defined property, query or an index, several corresponding methods would be automatically generated on a class compilation. These methods can be very useful. In this article, I would describe some of them. #Best Practices #Code Snippet #Object Data Model #Caché #InterSystems IRIS 9 15 8 4K
Article Eduard Lebedyuk · Jul 1, 2016 1m read After scrolling to the page footer more results are loaded but the view jumps back to the beginning Go to My Content -> Collaborations and scroll down. After hitting the bottom of the page, the more results are loaded and the page becomes longer, but the view jumps back to the beginning of the page.Expected behavior: the view stays where it was after loading more results. #DC Feedback 1 3 0 201
Article Eduard Lebedyuk · Jun 28, 2016 1m read Calculate class or package length in sloc Here's a code snippet to calculate the length of a class or a package in lines of code: #Code Snippet #Object Data Model #Caché 1 3 0 451
Question Eduard Lebedyuk · Jun 23, 2016 How do I compact database? Long story short, I created some test data, then deleted it. The database (cache.dat) is 67 GB in size (was around 1 GB before tests).How do I compact that? #Caché #System Administration 0 4 0 2.2K
Question Eduard Lebedyuk · Jun 23, 2016 How to keep Cache table synchronized with an external table? I have a MySQL server with "posts" table. I also have a Caché server with "downloadedposts" table. They are connected from Caché to MySQL via SQL Gateway I want to keep Caché table synced with MySQL one (MySQL "posts" table is a master copy), so periodically Caché queries MySQL server and downloads data. So far so good, and if a record appears or changes in MySQL table, Caché downloads the changes. The problem I'm encountering is that sometimes rows would be deleted from MySQL "posts" table. How do I synchronize deletions? #Interoperability #JDBC #ODBC #SQL #Caché 2 4 0 1.1K
Question Eduard Lebedyuk · Jun 9, 2016 Cheap object hashing? Problem: Caché instance connects periodically to an Oracle database via jdbc and downloads data. Sometimes data on a remote server would change. #Business Service #JDBC #Object Data Model #ODBC #Caché 2 9 0 1.5K
Question Eduard Lebedyuk · Jun 6, 2016 Opening Business Process in studio When I open a Business Process in Studio I am shown a BPL diagram. I want to see a class definition directly. Is there any way to achieve that behaviour in Studio? #Business Process (BPL) #Studio #Ensemble 0 4 0 352