Dmitry Maslennikov · Nov 17, 2023 go to post

Any transactions that not committed, will be rollbacked in case if systems shutdowns

When system was terminated unexpectedly, during the start it checks if any transactions were left uncommitted and rollbacks them

it needs for logical integrity of the data

Dmitry Maslennikov · Nov 15, 2023 go to post

<PROTECT> means that you don't have enough permissions to read this database

And there is no simple answer to it, the easiest way is to add %All role to the user, which tries to access data.

Dmitry Maslennikov · Nov 13, 2023 go to post

I don't have any requests for any improvements for the plugin if you wish to try and have some ideas what needs to be added, you are welcome in issues

Dmitry Maslennikov · Nov 10, 2023 go to post

So, this means that customers not migrated yet from Caché to IRIS, now need to add additional upgrades for servers. That would not help them. Or they will just stick to the 2023.* versions.

Dmitry Maslennikov · Nov 10, 2023 go to post

Does this mean IRIS will refuse to install/start if it detects an unsupported processor?

Apple's processors M* specifically were not mentioned, but I suppose it's as part of ARM64v8 support?

xkcd: Standards

FHIR is only a part of the journey, the most important is that so many competing software are already on the market. The issue appears in cases when some applications could get updates and support for anything new, some not. Still, both of them would be required to communicate with each other and it will keep using some way or another some old standards anyway.

$list is a binary format, quite complex actually. And you don't need to know this for your scenario

you can use this functions, which may help you with the task

$listvalid - check if the string is a $list, while $listvalid("") is also true

$listlength - counts listitems in $list

$listfind - search for particular item in the presented $list

Yes, you can do it, with tag <Invoke>, which can call any classmethod, which will do what you want

There is no direct way of setting environment variables using ObjectScript. And there are some caveats to doing it. 

Have a look at this project, it's quite tricky, it uses callout in c, to make it working

I would recommend finding another way of doing what you would want to achieve, instead of using environment variables 

This command will only create file CACHE.DAT on Caché, or IRIS.DAT for IRIS, and to be able to see it in portal, you have to create Config.Database as well

But, I would recommend using %Installer Manifest, it's available for many years, and in Caché as well

The simplest installer would look like this

XData setup
{
<Manifest>
  <Default Name="Namespace" Value="IRISAPP"/>
  <Default Name="database" Value="irisapp"/>
  
  <Namespace Name="${Namespace}" Code="${Namespace}" Data="${Namespace}" Create="yes" Ensemble="no">

    <Configuration>
      <Database Name="${Namespace}" Dir="${mgrdir}${database}/data" Create="yes" Resource="%DB_${Namespace}"/>
    </Configuration>
  </Namespace>
</Manifest>
}

You can find more examples on GitHub

well, this is a good hack, but there are a few notes worth mentioning

  • it will affect the performance of the code
  • it will not work on processes that running not from Terminal

So, it is only suitable for debugging purposes, do not use in production

Dmitry Maslennikov · Oct 31, 2023 go to post

Well, I did some notes about Vectors in my article, about the project I tried to implement.

Basically, it's possible by using neural network based algorithms calculate vectors for any texts, index them in the database, and search using vector search for any text query. The results in this case will not find texts which are exact to the search query, but with using similarity, the closest to the query. And it can be used with mostly any language, types of the texts, files and so on, even pictures, or videos.

Dmitry Maslennikov · Oct 31, 2023 go to post

FYI, incorrect login/password should be status 401
403 when access to something above the granted roles

use Status property in %CSP.Response

set %response.Status = 401
// or
set %response.Status = 403
Dmitry Maslennikov · Oct 30, 2023 go to post

Yeah, telnet obviously not recommended, and It's recommended to use SSH instead. Can be configured on Windows as well. Find any realization of SSH server for Windows, and use command to enter into Cache/IRIS using

iris terminal IRIS

or 

ccontrol terminal cache

Dmitry Maslennikov · Oct 30, 2023 go to post

Well, the example you used uses ClassMethod, which is like an any static method in other languages, and can be called directly with no issues. So, this definitely will work

ClassMethod AnotherMethod()
{
  do ##class(MyClass).Foo()
}

If you would want to do the same, but using instance methods, it can be done as well

Assuming the super class, like this

Class dc.MyClass Extends %RegisteredObject
{

Property Value As %String;

Method Foo()
{
  Write !,"MyClass:Foo - ", ..Value
}

}

and child class

Class dc.SubClass Extends MyClass
{

Method Foo()
{
  Write !,"SubClass:Foo - ", ..Value
}

ClassMethod AnotherClassMethod()
{
  set obj = ..%New()
  set obj.Value = "demo"

  Do obj.Foo()
  
  Write !,"-----"
  Do ##class(dc.MyClass)obj.Foo()

  Write !,"-----"
  Do obj.AnotherMethod()
}

Method AnotherMethod()
{
  Do ##class(dc.MyClass)$this.Foo()
}

}

The output will be this

USER>do ##class(dc.SubClass).AnotherClassMethod() 
SubClass:Foo - demo
-----
MyClass:Foo - demo
-----
MyClass:Foo - demo

And as you can see, the last two calls are working from a super class, and it keeps access to the object

Dmitry Maslennikov · Oct 24, 2023 go to post

Instead of doing it this way, you can make it even with less code, using Python Embedded

import iris

status = iris.cls('%SYSTEM.OBJ').Load("Production.cls","ck")

# It could be just like this, but OBJ not there 
# https://github.com/intersystems-community/embedded-python-bugreports/issues/2
# iris.system.OBJ.Load("Production.cls","ck")
Dmitry Maslennikov · Oct 24, 2023 go to post

$view, as far as I know has nothing to do with the question, view together with $view operates with Database blocks, read, and the dangerous part is to write to, if you wrongly use parameters, you can destroy the database file. 

Dmitry Maslennikov · Oct 24, 2023 go to post

No, do not touch $View and View, if you don't know what you are doing, this is low-level work, and you can damage the database file.

Dmitry Maslennikov · Oct 22, 2023 go to post

In my example, and recommended way, Python application supposed to go as a separate container, and logs of this container should be enough

Dmitry Maslennikov · Oct 22, 2023 go to post

ge=0, what do you expect from it? 

I suppose, you expect it to fail to insert values that less than 0. And this probably supposed to be implemented by using CHECK CONSTRAINTS, which IRIS SQL does not have. So, the only option right now is to implement it on Python side

Dmitry Maslennikov · Oct 19, 2023 go to post

Are you sure, you need Java 6? This version was released in 2006, why do you need such an old version,, I’m not even sure that version was even supported back than at all.

You would need Cache as old as this Java too, then

Dmitry Maslennikov · Oct 10, 2023 go to post

While we have multiple architectures, it makes now it quite tricky to make IRIS for both x64 and arm64

You can look at this example, where we build IRIS Community with ZPM

IRIS ARM64 does not work in emulated arm64, so, when you use some CI, which supports only x64 and offers qemu emulation to run ARM64 it will probably not work

So, you may try do not start iris inside ARM64 builder, but just add some binires required