Evgeny Shvarov · Oct 25, 2025 go to post

This works like a charm, @David Hockenbroch !

I'd also add to a VSCode a convenient extra link to see all the errors of such like here:

"links": {
        "UnitTest Portal": "${serverUrl}/csp/sys/%25UnitTest.Portal.Home.cls?$NAMESPACE=IRISAPP",
        "Error Log": "${serverUrl}/csp/sys/op/UtilSysAppErrorNamespaces.csp"
      }
Evgeny Shvarov · Oct 20, 2025 go to post

Hi @Brett Saviano !

Tried it!

Here is the feedback:

1 - can we add the link to the VSCode extension to be installed? I spent some time before I understood that, besides InterSystems ObjectScript, I need to install a special ObjectScript Extension pack .

2 - to make a REST API call I need to fill all the fields manually. Even I have an Open API spec class. Is it possible to read from it and provide all the fields ready to for tests? Filed a task and an idea.

3. Wasn't able to start debugging: faced the following error:

Evgeny Shvarov · Oct 19, 2025 go to post

Also, often we want to switch to our own endpoint automatically instead of default one. 

These 3 lines in Dockerfile will do the thing.

RUN old=http://localhost:52773/crud/_spec && \
    new=http://localhost:52773/your/api/_spec && \
    sed -i "s|$old|$new|g" /usr/irissys/csp/swagger-ui/swagger-initializer.js
Evgeny Shvarov · Sep 27, 2025 go to post

I agree, makes total sense. Documentation also have a feedback button on every page IIRC

Evgeny Shvarov · Sep 24, 2025 go to post

Thanks @David Hockenbroch !

An almost ideal pattern to run an SQL query in ObjectScript. 

If you could also share with error handling around?

My typical pattern looks like this one below. Includes try-catch in case when I need to rollback something:

try {

set tStatement = ##class(%SQL.Statement).%New()

set query = "ALTER Table "_table_" ADD PRIMARY KEY ("_column_")"

$$$TOE(st,tStatement.%Prepare(query))

set rset=tStatement.%Execute()

if rset.%SQLCODE < 0 {

write "Error adding primary key: "_rset.%SQLCODE_" "_rset.%Message

set ex=##class(%Exception.SQL).CreateFromSQLCODE(rset.%SQLCODE,rset.%Message)

$$$ThrowStatus(ex.AsStatus())

}

}

catch ex {

set st=ex.AsStatus()

}
Evgeny Shvarov · Sep 1, 2025 go to post

Oh my god! What a drama!

Guys, you are maybe late for the Venice Film Festival 2025, but the Oscar 2026 nomination is yours!

And moreover, Dave Davidson is healthy and sound because of Interoperability and InterSystems! Thanks @Vishal Pallerla  and team! 

Evgeny Shvarov · Aug 23, 2025 go to post

Hi @Dmitrij Vladimirov ! This is pure ObjectScript AFAIK in an expression mode (think of it if you create a classmethod in ObjectScript in Expression mode), with options of %source to reference base class properties and %cube to reference Cube class methods.

Evgeny Shvarov · Aug 21, 2025 go to post

BTW, faced the same situation today to have an option of getting full sqlname for a class, and generated a classmethod in VSCode with AI (no my personal touch):

ClassMethod GetSQLTableName(pclass As %String) As %String
{
// returns the SQL table name for a class
set tablename = ##class(%DeepSee.Utils).%GetSQLTableName(pclass)
if tablename="" {
set tablename=$TR($P(pclass,".",1,*-1),".","_")_"."_$p(pclass,".",*)
}
return tablename
}

And its working. Not bad for a bot.

Evgeny Shvarov · Aug 20, 2025 go to post

Hi @Sam Duncan !

I think DC AI Bot answered right: if you try also add:

zpm "enable -community"

this will allow to install packages from a community registry

Evgeny Shvarov · Aug 19, 2025 go to post

I guess DC AI bot takes only the post body into the consideration thinking the title is a summary of the post. I this case title is one question and post body is another one.

Evgeny Shvarov · Aug 18, 2025 go to post

In anyways, there are folks on the community that can help even with these already undocummented stuff )

Evgeny Shvarov · Aug 18, 2025 go to post

$zel, $zlp - two new ObjectScript functions in one day after more than 10 years in InterSystems... Love this community! )

Evgeny Shvarov · Aug 18, 2025 go to post

Great app, @Raj Singh ! thanks for the contribution!

Adding two more "cents" for different LOAD DATA usage options:

1. csvgen app, which allows you to create a table and import data automatically as simply as:

do ##class(community.csvgen).Generate("/home/irisowner/dev/data.csv",",","package.class")

It will guess datatypes and use LOAD DATA under the hood.

2. And csvgen-ui - a web UI for csvgen by @Guillaume Rongier 

Also, if you are into embedded Python, take a look at csvgenpy, which uses not LOAD DATA, but sqlalchemy.