Question Timothy Leavitt · Feb 1, 2024 IRIS file manipulation and long file paths on Windows Looking at enabling long file paths (see https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path...) on some Windows machines - does anyone know offhand if IRIS plays well with this in all respects? #Microsoft Windows #ObjectScript #InterSystems IRIS 0 1 0 130
Question Timothy Leavitt · Sep 12, 2023 Scoping OID / OREF map It's a feature of ObjectScript (perhaps widely known, perhaps not) that if you open the same object ID multiple times, you end up with the same OREF. For example: USER>set obj1 = ##class(Sample.Person).%OpenId(1) USER>set obj2 = ##class(Sample.Person).%OpenId(1) USER>w obj1,!,obj2 1@Sample.Person 1@Sample.Person Generally speaking, this is an important feature - you won't end up accidentally modifying the same record via multiple paths and losing some of the changes. #Key Question #ObjectScript #InterSystems IRIS 2 10 2 384
Question Timothy Leavitt · May 10, 2023 Is it possible to define an *instance* method in tag-based CSP? In a tag-based CSP page, I can define (e.g.): <script method="Foo" language="cache" runat="server"> #CSP #Caché #InterSystems IRIS 0 12 0 255
Question Timothy Leavitt · May 1, 2023 Errors in docker run Has anyone seen this before? I'm new/bad at Docker and not even sure how to debug. $ sudo docker logs <container>[INFO] Starting InterSystems IRIS instance IRIS...[INFO] Unable to read the startup.last file to identify the location of the writeimage journal file (IRIS.WIJ) that was last in use by this instance. Pleasefix the permissions of the startup.last file. ** Startup aborted ** #Containerization #Docker #InterSystems IRIS 0 7 0 324
Question Timothy Leavitt · Mar 10, 2023 Reading a chunked HTTP response in chunks I'm trying to read the response to a long (indefinitely) running HTTP response with Transfer-Encoding: chunked. Ideally I'd be able to read the individual chunks from the response and do something with them as they arrive rather than needing to wait for the response to finish (because it never will) - ultimately I'm thinking to wrap these back up over a WebSocket connection which seems cleaner from an API perspective. So far it looks like my options are: #ObjectScript #InterSystems IRIS 1 3 0 1K
Question Timothy Leavitt · Jan 3, 2023 Putting standard CSP login in front of a web application with a REST dispatch class Has anybody ever enabled the standard CSP login page for a web application with REST dispatch class? Any ideas how to do this? (Context: I'm using %CSP.REST with other stuff behind it, not actually a REST API.) #CSP #REST API #InterSystems IRIS 0 4 1 446
Question Timothy Leavitt · Aug 31, 2022 Weird file encoding issue with %CSP.BinaryStream / CSP file upload Consider the simplest possible CSP file upload/download page - you upload a file, it's saved in the database, and the file is immediately re-download via %CSP.StreamServer: #CSP #InterSystems IRIS 0 2 1 239
Question Timothy Leavitt · Jul 20, 2022 Converting POSIX to ODBC timestamp in SQL I'm getting wrapped around the axle with CAST and CONVERT and can't seem to find a way to do this (short of adding a stored procedure wrapping $zdt($zdth(posix,-2),3), which I'm refusing to do on principle, because there has to be some way to make this work). Any ideas? #SQL #Caché 1 4 0 269
Question Timothy Leavitt · Apr 25, 2022 Serving .woff/.woff2 over CSP I have a .woff2 file I'm trying to serve over CSP. If I set:^%SYS("CSP","DefaultFileCharset")="UTF8" Then it "just works" - but I'd rather not do something so heavy-handed/instance-wide, on principle. (This is for something that will ultimately be published on the Open Exchange.) A more granular option, it seems, is described in the %CSP.StreamServer class reference: #CSP #Web Gateway #InterSystems IRIS 0 2 0 294
Question Timothy Leavitt · Apr 6, 2022 Returning an HTTP 403 from %CSP.SessionEvents:OnStartRequest Is there a way, given a %CSP.SessionEvents subclass, to simply return an HTTP 403 error status from OnStartRequest? If I return an error %Status from the method, it'll go to the error page; if I don't, it's always a 200 OK and the page continues to render. #CSP #InterSystems IRIS 0 3 0 604
Question Timothy Leavitt · Feb 2, 2022 How to wait for OS command run with $zf(-100,"/ASYNC") to finish I'm trying to write a method that runs an OS command with $zf(-100,"/ASYNC") and then waits for it to finish before returning, but I can't figure out how to check if the child process (in $zchild) is still running. $System.Process.State($zchild) always returns "RUN" even once the child process is gone. Is there some better way to check this, short of running another OS-specific command and processing the output (which is just really annoying and unelegant)? #ObjectScript #InterSystems IRIS 0 8 0 466
Question Timothy Leavitt · Dec 14, 2021 Outputting a %SQL.StatementResult to CSV Is there some generic way to output a %SQL.StatementResult to CSV? #ObjectScript #SQL #Caché #InterSystems IRIS 1 6 0 893
Question Timothy Leavitt · Nov 9, 2021 SQL update with %IGNOREINDEX I'm in a tricky situation where a new required property is being added to a class, along with an index on it. The existing data has nulls, so the index build fails. I can't run a query to update the rows where there are nulls, because it tries to use the index, which hasn't been built yet. #InterSystems IRIS 0 3 0 247
Question Timothy Leavitt · Jul 28, 2021 %SIMILARITY variations (Okapi BM25+) and iKnow/iFind I'm working in an application that uses %SIMILARITY to find matches among a set of documents that vary greatly in length. It's generally good but I've noticed issues with ranking short partially-matching documents over longer documents that match the search string entirely. #iFind #SQL #InterSystems Natural Language Processing (NLP, iKnow) #InterSystems IRIS 0 3 0 470
Question Timothy Leavitt · Mar 8, 2019 Quick way to check if an SSL/TLS configuration name is valid? Is there a quick way to see if an SSL/TLS configuration name is valid, short of switching over to %SYS and checking Security.SSLConfigs:Exists? #REST API #Caché #InterSystems IRIS 1 7 0 608
Question Timothy Leavitt · May 18, 2018 Datatype class for global reference Is there a datatype class with validation for global references? I can't find one in a brief scan of the documentation / class reference. #Object Data Model #Caché 0 4 0 435
Question Timothy Leavitt · Dec 11, 2017 Validating XML Problem:I want to be able to import XML (say, using %XML.Reader) to Caché objects permissively (ignoring invalid/unexpected tags/attributes), but also to validate the same XML and list any/all invalid tags/attributes that it contains. #Object Data Model #XML #Caché 2 3 0 1.2K
Question Timothy Leavitt · Jul 11, 2017 Utility to find differences between databases? Does anyone know of a utility to compare two databases (i.e., CACHE.DAT files) and find globals/subscripts that are different between them?If not, I'll write one and share it. #Caché #Databases #Globals #Deployment 1 6 0 824
Question Timothy Leavitt · Mar 15, 2017 Equivalent to $System.OBJ.MakeClassDeployed for routines? Is there an equivalent to $System.OBJ.MakeClassDeployed (see documentation) that has the same effect for routines, deleting the .mac/.int but not the .obj? #Caché 0 3 0 415
Question Timothy Leavitt · Jan 11, 2017 Web application with dispatch class (%CSP.REST) also serving static files Suppose I have a web application named "/my/api", with a dispatch class configured (a subclass of %CSP.REST), and I want to be able to respond to:GET /my/api/something/:idby loading an object with the specified ID and returning it as JSONGET /my/api/another-thing/data.js #REST API #Frontend #Caché 0 9 0 1.5K