go to post Dmitry Maslennikov · Dec 6, 2022 I don't see anything like the list of all available tools in the Documentation. Just from experience, tools like this, not complete list (in %SYS namespace) Do ^Integirty Do ^DATABASE Do ^JOURNAL Do ^MIRROR Managed to find, something here
go to post Dmitry Maslennikov · Dec 5, 2022 Well, I've asked about it through the ideas portal, and you mentioned some flexibility It's ObjectScript, so, it has some flexibility. The only issue is login and password, and using OS-based auth, is a good way to solve this, obviously if OS-level is protected enough. For instance, you can raise issues just by terminating the process with an exit code higher than 0 with $system.Process.Terminate irisowner@ca22f45b16b1:~/temp$ cat commands.txt _SYSTEM SYS write "hello world" write "I'm: ", $username if $g(condition,1) Do $system.Process.Terminate(,2) write "terminated?" halt irisowner@ca22f45b16b1:~/temp$ cat commands.txt | iris session iris; echo Status: $? Node: ca22f45b16b1, Instance: IRIS Username: Password: USER> hello world USER> I'm: _SYSTEM USER> Status: 2 If you call some InterSystems internal interactive tools. So, most such tools have non-interactive endpoints, so, you can call them directly, and no interactivity is needed.
go to post Dmitry Maslennikov · Dec 5, 2022 The hardest part of this is a login and password, and I would recommend configuring OS-based Authorization for %Service_Terminal, so, it will not require login and password. Everything else is quite simple if your script is not supposed to answer questions there. cat commands.txt | iris session iris > output.log and, the content of commands.txt, is something like this write "hello world" write "I'm: ", $username halt Important to finish the script with halt command, and if you still wish to keep login and password, the first two lines should contain login and password irisowner@ca22f45b16b1:~/temp$ cat commands.txt _SYSTEM SYS write "hello world" write "I'm: ", $username halt irisowner@ca22f45b16b1:~/temp$ cat commands.txt | iris session iris Node: ca22f45b16b1, Instance: IRIS Username: Password: USER> hello world USER> I'm: _SYSTEM USER>
go to post Dmitry Maslennikov · Nov 24, 2022 Such a strange task. If you need to store some sensitive information, do not store it in the code. Store it as settings somewhere, so it will be accessible during runtime with checking rights.
go to post Dmitry Maslennikov · Nov 24, 2022 And you can pull image for desired platform anywhere, but it tries to download exactly the same layers for not matter of platform $ docker pull --platform linux/arm64 containers.intersystems.com/intersystems/iris-community:2022.3.0.545.0 2022.3.0.545.0: Pulling from intersystems/iris-community 405f018f9d1d: Already exists 2cbbd12e515b: Pulling fs layer fe60bfd0c5ab: Pulling fs layer 4ea6673a83ee: Downloading [> ] 35.91kB/3.369MB c51907c154c9: Waiting 9a2e0e6b825d: Waiting $ docker pull --platform linux/amd64 containers.intersystems.com/intersystems/iris-community:2022.3.0.545.0 2022.3.0.545.0: Pulling from intersystems/iris-community 405f018f9d1d: Already exists 2cbbd12e515b: Pulling fs layer fe60bfd0c5ab: Pulling fs layer 4ea6673a83ee: Pulling fs layer c51907c154c9: Waiting 9a2e0e6b825d: Waiting And with arm64 URL, as expected new layers $ docker pull containers.intersystems.com/intersystems/iris-community-arm64:2022.3.0.545.0 2022.3.0.545.0: Pulling from intersystems/iris-community-arm64 4a3049d340b7: Pulling fs layer d37582f21e47: Pulling fs layer 7c3186685c0a: Pulling fs layer 9f6c8eb3bd1d: Waiting 95e5fce820f5: Waiting 789164791b8b: Waiting
go to post Dmitry Maslennikov · Nov 24, 2022 That's because they still do not support it that way. Manifest for images "supposed" to support both platforms, returns only one bunch of layers $ docker manifest inspect containers.intersystems.com/intersystems/iris-community:2022.3.0.545.0 { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "config": { "mediaType": "application/vnd.docker.container.image.v1+json", "size": 13258, "digest": "sha256:09058e9a4d31a2ba75f0549f15f3b770e3da41b2909c713bf07795034a37c83b" }, "layers": [ { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 30423715, "digest": "sha256:405f018f9d1d0f351c196b841a7c7f226fb8ea448acd6339a9ed8741600275a2" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 277372845, "digest": "sha256:2cbbd12e515b4bff4242c44f77538debfef426759723d7fe6910d3b3953cad8c" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 435700999, "digest": "sha256:fe60bfd0c5abc79baa15ef5a2af58e8ff118cffcfefe4eebd94c319a7cf32d68" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 3369232, "digest": "sha256:4ea6673a83eec852f096d1ea2717cfda67b1048faa6ff91a45831dd151d64358" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 320, "digest": "sha256:c51907c154c959f056e0511665961ac2356ff7f828324024f8cd3ad2ed7463cf" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 475828, "digest": "sha256:9a2e0e6b825d6abeb9ff888a483fe0935d32a4a61923eb466eb2baaccff49896" } ] } While it's expected to be this way when it explicitly mentions both supported platforms $ docker manifest inspect intersystemsdc/iris-community:preview { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 2421, "digest": "sha256:5bccfba5c1b9877635ac3e1108ed99070c9ba0c7fdd39db32d08d84f367035ca", "platform": { "architecture": "arm64", "os": "linux", "variant": "v8" } }, { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 2421, "digest": "sha256:05f1b866524d0183f3cb6d3830b7b50a601a199a6e8f56e398d04e3226d1c349", "platform": { "architecture": "amd64", "os": "linux" } } ] }
go to post Dmitry Maslennikov · Nov 22, 2022 set buf = ##class(%xsd.hexBinary).JSONToLogical("02010605166E2A0923100950205450524F424520303030323730") write $sconvert(buf, "U2", /*big*/1, /*pos*/8) / 100
go to post Dmitry Maslennikov · Nov 22, 2022 set bufHex = "02010605166E2A0923100950205450524F424520303030323730" set buf = "" for i=1:2:$l(bufHex) set buf = buf _ $char($zhex($extract(bufHex, i, i+1))) write $sconvert(buf, "U2", /*big*/ 1, /*pos*/ 8) / 100
go to post Dmitry Maslennikov · Nov 22, 2022 I think more details are needed, looks like it is JDBC or ODBC connection, which one? Depending on a particular task, probably there are various other options to make it even faster.
go to post Dmitry Maslennikov · Nov 19, 2022 Have a look at sqlalchemy-iris, with it you can use pandas and access tables through SQL
go to post Dmitry Maslennikov · Nov 14, 2022 Implemented it this way, as a workaround. But not sure in it. def visit_delete(self, delete_stmt, **kw): if not delete_stmt._where_criteria and delete_stmt.table.foreign_keys: table = delete_stmt.table nocheck = False for fk in table.foreign_keys: nocheck = not fk.ondelete and fk.parent.table == table if not nocheck: break if nocheck is True: delete_stmt = delete_stmt.prefix_with('%NOCHECK', dialect='iris') text = super().visit_delete(delete_stmt, **kw) return text
go to post Dmitry Maslennikov · Nov 14, 2022 And looks like, I have no way to check if I could add %NOCHECK for a particular DELETE query. It may cause integrity issues, in case if it uses another table, not the same one.
go to post Dmitry Maslennikov · Nov 14, 2022 Yes, it will work, but it will just ignore the checks and will be an issue if I have where If I add %NOCHECK, it will delete these items, while it should fail DELETE %NOCHECK FROM nodes where name in ('n11', 'n12', 'n13');
go to post Dmitry Maslennikov · Nov 11, 2022 Nope, it's it will require changes in the language itself. And I'm sure there is no reasons for it.
go to post Dmitry Maslennikov · Nov 8, 2022 Well, looks like the result of getGeneratedKeys() exactly the same as LAST_IDENTITY()
go to post Dmitry Maslennikov · Nov 8, 2022 Great news about RETURNING, yeah, that will help a lot, especially for external adapters. And thanks for the tip with getGeneratedKeys
go to post Dmitry Maslennikov · Nov 8, 2022 "scheme": "https", Are you sure, that you need https, not plain http? Seems like, it's the issue
go to post Dmitry Maslennikov · Nov 7, 2022 Well, then, the latest 2022.2, should be able to start on up to 20 cores.
go to post Dmitry Maslennikov · Nov 7, 2022 Save it as file ObjectScript.RightTriangle.cls, and do the command Do $system.OBJ.Load("ObjectScript.RightTriangle.cls", "ck") Where, c - compile k - keep generated code, INT routines