Question
· Jul 17, 2018
Cache Dynamic SQL Pagination

Would like to know if there is an alternative or better way to paginate through a dataset using dynamic SQL than what I am using below. The problem is that as the potential pool of data gets larger, this code slows down to the point of not being useable. In analyzing each line of code below, it appears the slow down is related to the initial rset.%Next() iteration. Is there anything available which does not require a subquery/%VID such as a simple LIMIT/OFFSET?

My code is similar to :

s sql=##class(%SQL.Statement).%New()

1 25
3 2.8K

What if you could serialize/deserialize objects in whatever format: JSON, XML, CSV,...; attending different criteria: export/import some properties and not others, transform values in this or that way before exporting/importing,...; and all of this without having to change the class definition? Wouldn't that be great??

Well, perhaps it's a goal too ambitious to reach 100% but, exploring this idea, I've developed a bunch of classes that I thought it was good to share. If you want to test, change, modify or improve the code, or just take a look at it, you can do it here. There you'll find a more detailed explanation (see Readme.md)

Be aware, this is a proof of concept for myself done in spare times, sure it's not robust enough or it can be done much better... but, I was just playing...ok, I could just wait to the new JSON Adaptor (coming soon!) that sure is going to resolve much more scenarios in a cleaner way, but... meanwhile... :-) ...

9 4
4 2.3K
Question
· Dec 3, 2018
Rest return 500 error

I have an application which is distributed across maybe 5 servers since it has over a thousand users at a time we had an upgrade to the application last week and I had an integration build that uses the REST service ( ##class(%Net.HttpResponse) but since the upgrade the integration has not be able to communicate with the application tried testing my URL through Postman and all seems ok but if I test direct I get a 500 error anything that I need to check on please or any advice on how to check what's going on.

0 2
0 448

Has anyone called any outside Javascript code from inside their class files? I asked a long time ago if there was a way to manipulate an image within Cache Object Script, and since Cache doesn't have any image libraries its not really possible. However I have found Javascript to resize an image and wonder how hard it would be to mesh the two together.

Can anyone share any examples?

Thanks

Scott

2 9
1 1.4K

This article was written as an attempt to share the experience of installing the InterSystems Caché DBMS for production environment.
We all know that the development configuration of a DBMS is very different from real-life conditions.
As a rule, development is carried out in “hothouse conditions” with a bare minimum of security measures, but when we publish our project online, we must ensure its reliable and uninterrupted operation in a very aggressive environment.

7 2
5 1.6K

Hello,

I am pretty stuck here and would appreciate any help or advice on an approach to this...

I have a single claim file, ingested that has 7 claims inside of it, I am pulling each claim out based on a qualifier, then want to remove all of the others and do something with the one that is left over.

My problem is I cant seem to figure out how to Remove the Claims programatically...

0 1
0 236

For each instance of an XML-enabled class I want to control whether a property is projected as an empty element or not projected at all. With string properties, I can set the value as $c(0) for an empty element, or an empty string for no projection. But it looks like this isn't consistent for properties with type %Boolean or %Integer. With booleans $c(0) gets projected as "false". With integers $c(0) stays as a zero-width space in the XML output (which gives me a SAX parser error if I try to read it).

Is there a way to do this that works for all datatype properties?

0 2
0 523

I need to dynamically create a class based on a parameter passed into a class method. Basically the method takes in a string that contains the name of the class I need to create a new instance of.

I need something along these lines.

ClassMethod someMethod(className As %String)
{
	set classObject = ##class(className).%New()

...
}

Trying to do this right results in a class not found error because it seems to be treating the variable as a literal string.

0 3
0 939

I downloaded and installed the trial version of Caché.
it is installed in c:\intersystems\Trycache
I changed the system environment settings so that
GLOBALS_PATH = c:\intersystems\Trycache
and PATH includes c:\intersystems\Trycache\bin
Caché works, and I can login, use the globals, etc...

0 1
0 313

I can directly order over a MultiDimensional property, e.g.

set key=$order(obj.prop(key))

However I have a generic method that has to use the $property method, if I know the keys then I can just fetch a value with...

set value=$property(obj,"prop","key")

But if I don't know the keys then I am not aware of a solution to do this, e.g.

set key=$order($property(obj,"prop",key))

will not work.

0 6
0 441

Hi,

I would like to know if anyone has had some experience in building systems for multiple end-users.

To keep things simple, in a hypothetical example, say an Event Booking System, where a Venue could sign up to use such a system and define it's Venue, costs, calendars, etc.. and then invite their customers to book the Venue on different days/times.

If I wish to offer such a system to many Venues, there are a number of options available.

0 6
0 1.7K