Hmm, it's system-wide, and now I see, that it's the wrong way. I can't use this. Are there any possibilities to have such option just for a process?

InterSystems DB-API Driver does not support it, yet, But yeah, this can solve it, and I like this way more.

sqlalchemy.exc.InterfaceError: (iris.dbapi._DBAPI.InterfaceError) Error parsing statement 'SET OPTION PKEY_IS_IDKEY = TRUE':

Found this way with IDENTITY and ALLOWIDENTITYINSERT=1

CREATE TABLE users (
	id identity NOT NULL,
	name VARCHAR(30) NOT NULL,
	PRIMARY KEY (id)
)
WITH %CLASSPARAMETER ALLOWIDENTITYINSERT = 1;

INSERT INTO users (id, name) VALUES (2, 'fred');
SELECT LAST_IDENTITY();

INSERT INTO users (name) VALUES ('ed');
SELECT LAST_IDENTITY();

Not sure if actually a good way to solve the issue

No reason to reinvent the wheel, just use imagemagick, no matter the OS, it works anywhere and with any format.

I suggest, that InterSystems, would finally do something, and continue developing and improving their drivers.

I could do such drivers too, and not just NodeJS only, any other languages as well. And I have my own realization for IRIS that way, but it's too simple. 

That way requires some sort of familiarity with IRIS, so, be able to load and run the server on the IRIS side. That's not what I expect, from drivers like this. You should be able to connect to any running instance, and it should not require installing something there, at maximum do some security configuration, such as adding users.

I see it in difficulty explaining of how to start using IRIS with NodeJS (actually with any supported language). It's not even simpler for NodeJS Developers who already familiar with IRIS and the complexity of getting drivers.

When on answer of how to start develop in NodeJS with IRIS, we could answer just install driver with npm and you are ready to go, then probably will be much more NodeJS based projects.

Dmitry Maslennikov · Oct 29, 2022 go to post

I see no reasons why it would not work. What about ports, in that case, you would need to add services for each listening port, that's how Kubernetes works, nothing special for Healthshare.

Dmitry Maslennikov · Oct 28, 2022 go to post

Maybe it's finally time to introduce at least preview tag, so, we will not have a pain every time when you delete previous images

Dmitry Maslennikov · Oct 28, 2022 go to post

btw, the recent version of ZPM 0.5.0, now supports requirements.txt, so, just place it in the root next to module.xml, and during load or install, it will install dependencies from that file too.

Dmitry Maslennikov · Oct 28, 2022 go to post

I've already patched DB-API as a workaround, and see that a fix in IRIS makes not so much sense since the issue still is in older versions. So, I would fix it on the driver's side.

Dmitry Maslennikov · Oct 27, 2022 go to post

And how it can help me, when I do SQL request through DB-API

SELECT id FROM table, gives me one type, and SELECT id FROM table ORDER BY id gives another type

In both cases, I expect the same time, both types I've asked for id, but the result is very different.

Dmitry Maslennikov · Oct 26, 2022 go to post

It has not been updated for a few years, so, yeah, I'm sure it's synchronous.

But I think most of the operations available through that API, should be synchronous. SQL could be asynchronous, but it does not support it.

I think I could make an asynchronous adapter, I have a driver which supports SQL, not async, yet, but I have not have such task yet.

Dmitry Maslennikov · Oct 24, 2022 go to post

Just curious how exactly you expect to see this support. I'm not so much into FHIR, but did something, and no idea how I would expect it to see there.

Dmitry Maslennikov · Oct 23, 2022 go to post

Yeah, it would be kind of ok, if I would have the option to write SQL Query. But in my case, it's not an option kind of.

For instance, using ORM in Python, the table above is defined this way

        Table(
            "some_table",
            metadata,
            Column("id", Integer, primary_key=True),
            Column("x", Integer),
            Column("y", Integer),
            Column("z", String(50)),
        )

Insert some data, into this table

        connection.execute(
            cls.tables.some_table.insert(),
            [
                {"id": 1, "x": 1, "y": 2, "z": "z1"},
                {"id": 2, "x": 2, "y": 3, "z": "z2"},
                {"id": 3, "x": 3, "y": 4, "z": "z3"},
                {"id": 4, "x": 4, "y": 5, "z": "z4"},
            ],
        )

And now, select that data. This code is a part of a test, but I hope the idea is quite clear. Where stmt will be compiled to SELECT id from some_table ORDER BY id

        table = self.tables.some_table
        stmt = (
            select(table.c.id)
            .order_by(table.c.id)
        )
        self._assert_result(
            stmt,
            [(1, ), (2,), (3,), (4,)],
        )

This particular test will fail. It gets [('1', ), ('2',), ('3',), ('4',)] while expects [(1, ), (2,), (3,), (4,)]

Dmitry Maslennikov · Oct 18, 2022 go to post

You don't suppose to touch the permissions of irisdb

the user should always be irisowner.

Why do you need SSH, and another user? What exactly are you trying to implement?

At least for the developer. Yes, the final package has no source code at all, it only delivers compiled code, so, that's why it requires the exact version of platform to build on and install

And generated code for those parameters

ROUTINE User.Test.G1 [Type=INT,Generated]
	;User.Test.G1
	;(C)InterSystems, method generator for class User.Test.  Do NOT edit.
	Quit
	;
pCOMPILETIME(%class,%parameter) public { New %classname Set %classname=%class
 Quit $ZDateTime($ZTimeStamp,,,3)
}
ROUTINE User.Test.1 [Type=INT,Generated]
 ;User.Test.1
 ;Generated for class User.Test.  Do NOT edit. 10/03/2022 07:50:07AM
 ;;3043524C;User.Test
 ;
ztest() public {
  Write !,"RunTime: ", ..#RUNTIME
  Write !,"CompileTime: ", ..#COMPILETIME
  hang .5
  Write !,"RunTime: ", ..#RUNTIME
  Quit 1 }
zRUNTIMEP() public {
	Quit ($ZDateTime($ZTimeStamp,,,3)) }

By default the value of the parameter is static. But you can define parameters that way that the value can be evaluated at RunTime or CompileTime

So, technically, you can define the Get method for Parameters

Why would you need it?

##class(class.name).#PARAMETER 

..#PARAMETER 

$parameter(“class.name”, “PARAMETER”)