go to post Warlin Garcia · Feb 3, 2021 You should be able to use the $SYSTEM.SQL.DATEADD("hh",1,$H) It returns a timestamp you'd need to convert back to $H format if that's what you need.
go to post Warlin Garcia · Jan 8, 2021 Can you show the query plan? Usually this issue "shows" when indices are out of sync. Maybe try rebuilding indices.
go to post Warlin Garcia · Jun 18, 2020 The list of steps depend on how is your current application built (e.g. are you using direct global access vs. SQL). Depending on which direction you want to go you could simply wrap your existing objectscript code in either stored procs or services and access them from Java or rewrite all your existing logic in Java. Again, the steps would depend on what exactly you're trying to accomplish and your current app makings.
go to post Warlin Garcia · Mar 19, 2020 The "||" is used to concatenate. So that's why it makes sense those are the ones used in the SQL you pasted instead of "!!".
go to post Warlin Garcia · Mar 19, 2020 Never seen that before. Are you sure those are ! and not ||? the latter makes sense as it's the concatenate operator.
go to post Warlin Garcia · Mar 6, 2020 CREATE GLOBAL TEMPORARY TABLE <mytable> {} has similar effects as process-private globals...
go to post Warlin Garcia · Feb 18, 2020 Your index is a bitmap index, have you tried changing it to a regular index just for testing if the behavior changes? There are restrictions on when to use a bitmap index. Wondering if the engine is considering the bitmap to be slower than full table scan in this situation.
go to post Warlin Garcia · Feb 3, 2020 It depends what you're trying to do. Lists are exposed through SQL as comma delimited strings (default). You can change how lists are projected to mimic how arrays are projected which is as a "child" table (default). Keep in mind, this all depends on how Settings is defined/stored. e.g. if it's a separate table with its own ID, then the settings list on the config.item table will only contain the IDs and that's all your getting.
go to post Warlin Garcia · Dec 30, 2019 What are you referring as invalid column name in this scenario? Why are you checking with invalid columns in the first place? If you know you can have invalid columns then you'd need to add proper error handling for it. You either check the metadata first for valid columns or add exception handling for it. As for why %SQL.Statement* classes are preferred is due to the improvements these classes contains in terms of usability and performance when compared with the "legacy" %Library.ResultSet.
go to post Warlin Garcia · Dec 24, 2019 How are you running both scenarios? The error you're getting is mostly a symtom of the Cache JDBC jar not being present in the classpath. When you run locally it may be present in your IDE but it's not being included in your build thus the REST code is failing.
go to post Warlin Garcia · Dec 19, 2019 While this is certainly possible, you'd be breaking the "contract". %OnNew() is expected to return a %Status that will be handled by %New(). This means the exception will be thrown by %OnNew() but %New() won't care about it and still return an object (unless something else prevents it from doing so).
go to post Warlin Garcia · Dec 19, 2019 The error should be in the %objlasterror variable. You would have to check: if %New() returned a new instance, if not then check the value of %objlasterror. Then perform any error handling you'd like to do. try/catch doesn't work because %New() doesn't throw any exceptions.
go to post Warlin Garcia · Nov 18, 2019 It's hard to tell what's wrong without all (or more) details. Are you getting an error? If you're not getting an error, are you passing the correct values (values that should return records)? Also, have you tried creating a very basic stored proc in Oracle (select current_date from dual or something like that) and try to use that from IRIS? The exercise will help you eliminate variables for possible issues.
go to post Warlin Garcia · Nov 15, 2019 You can map an Oracle Stored procedure to IRIS method using the SQL Gateway. Once the mapping is done, you can expose it with a service or any other means IRIS provides.
go to post Warlin Garcia · Nov 6, 2019 Thank you. I'll check on it. Do you have any tips to make csp changes flow in realtime the same as classes do? I've modified the dockerfile to copy the contents of my csp directory into the container, however my edits to CSPs are not flowing realtime which forces me to rebuild the container everytime to get my updates.
go to post Warlin Garcia · Nov 6, 2019 OK, I'll give it a try and create a PR once I have a new config file. Thanks!
go to post Warlin Garcia · Nov 6, 2019 First, thanks for this. It go me up and running pretty fast (as title says!). Couple of things: - The notes/documentation say that code will be loaded into USER namespace, however it's actually being loaded into IRISAPP (as configured in docckerfiles). - The jason.config is pointing to USER namespace so any new files and changes to existing will be actually loaded into USER instead of IRISAPP - Make sure it's all consistent - The webapp (irisweb) is missing a config for the directory where to store files. I fixed this by modifying the app in management portal. Need to address the installation file/dockerfile - Haven't been able to make CSPs flow to the container the same as classes. I'm sure I'm missing something but haven't figured out what yet. Any tips? Maybe I'm placing files in the wrong location? Right now I created a csp/irisweb folder under src folder.
go to post Warlin Garcia · Sep 17, 2019 To add a new header, you need to create a subclass of %SOAP.Header with the property you need. Once you have that then you can add it to the appropriate array e.g.S myheader = ##class(MyNewHeader).%New()S myheader.mykeyproperty = <myvalue>D myservice.HeadersOut.SetAt(myheader,"MyNewHeader")This is assuming the header is not automatically generated from the XML schema.
go to post Warlin Garcia · Aug 15, 2019 Since you're using ObjectScript you should get the value from the list using something like $LISTGET(CList,i). That should return the correct value without control chars. If you still want to use $PIECE then SET CListString = $LISTTOSTRING(CList) and then use the $PIECE on the CListString