go to post Kyle Baxter · Feb 8, 2017 Cache 2010.2 does not support Java 7:http://docs.intersystems.com/cache20102/csp/docbook/DocBook.UI.Page.cls?...You'll need to use an older version of Java or a newer version of Caché.Note: Java 7 was released in July 2011, so obviously we couldn't support it a year before its release.P.S. Sorry it took you so long to get an answer! If ever you need something more quickly, please feel free to contact the WRC at support@intersystems.com.
go to post Kyle Baxter · Feb 3, 2017 Example! Class: ------------------------------------------ Class Jiri.RegisteredObject extends %RegisteredObject { Property p1; Property p2; } ------------------------------------------ Terminal: ------------------------------------------ SAMPLES>s j=##class(Jiri.RegisteredObject).%New() SAMPLES>s j.p1="test" SAMPLES>s j.p2="json" SAMPLES>w ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(.stream,j) 1 SAMPLES>w stream.Read() { "_class":"Jiri.RegisteredObject", "p1":"test", "p2":"json" } ------------------------------------------
go to post Kyle Baxter · Feb 3, 2017 Do your CSP Files show up in the Server Explorer portion of Atelier? Also, what is your Atelier version (Atelier->About Atelier)?P.S. I think that was the most I've ever written "Atelier" in a short time.
go to post Kyle Baxter · Feb 1, 2017 I'm pretty sure you need to return an oref to get this working. Here's one that I was able to get working: Class Sample.SerialGet Extends %Persistent { Property Address as Sample.Address [calculated]; Method AddressGet() as Sample.Address { set a=##class(Sample.Address).%New() set a.City="Cambridge" set a.State="MA" set a.Zip="02142" set a.Street="1 Memorial Drive" quit a } } Terminal: SAMPLES>s reader=##class(%XML.Reader).%New() SAMPLES>w reader.OpenFile("/users/kbaxter/downloads/testopensinglequote.xml") 1 SAMPLES>s x=##class(Sample.SerialGet).%New() SAMPLES>w x.Address 5@Sample.Address SAMPLES>w x.Address.Street 1 Memorial Drive
go to post Kyle Baxter · Dec 28, 2016 I think the best way to do this would be to write something in COS, write a class query with it, and use that as a Table Valued Function. While there might be a relational way to do this, it seems like it'd be messy.
go to post Kyle Baxter · Dec 27, 2016 Caché does NOT support SQL-92 in its full implementation, so please refrain from saying so. Example:SELECT 3+3*3Result: 18Clearly, by not following order of operations we are violating the standard. Moreover, despite not conforming perfectly to SQL-92 we do support plenty of extensions, such as Table-Valued Functions.That said, Caché does not support WITH in the way you describe. However, you can accomplish the same thing by using subqueries, VIEWs, or multiple queries. You can also JOIN each record with its parent and filter on that. If you give some more information I'd be happy to point you in the right direction.
go to post Kyle Baxter · Dec 15, 2016 If you want to investigate the performance of the query you can always open a WRC Case (wrc.intersystems.com :-D).Otherwise, send out your class definition and query plan and I can take a cursory look at it.
go to post Kyle Baxter · Dec 15, 2016 I actually baked a cake to commemorate this occasion, and totally not because I'm fat and wanted cake.
go to post Kyle Baxter · Dec 2, 2016 Well, if you want good performance in SQL Queries, you need indexes. What do your tables look like? We can definitely get fast performance on a 50M row table, it might just take some work (which we're happy to help with).
go to post Kyle Baxter · Nov 21, 2016 Sure - you can try to merge it off before deleting it:m ^KMB = ^%sqlcq("NSP","SMPQueryHistory") And then you have your query history in a different global, which you can reference when needed.
go to post Kyle Baxter · Nov 18, 2016 Well, that's a new one. Do you have Long Strings enabled on this installation? If not, you should. It will fix this problem, but also increases the max size a string can be from 32KB to something like 3.1MB, which allows a lot more flexibility in your development decisions. But that's another thing.To delete your query history you can run the following code in Caché terminal:NSP>k ^%sqlcq("NSP","SMPQueryHistory")Where NSP is the name of your namespace that's having this problem. You can also clear history from the Management Portal, though I expect you cannot get there with this error. Let me know if this works - if not I would advise you to open a new WRC issue by going to wrc.intersystems.com, emailing support@intersystems.com, or calling 617-621-0700. If you're lucky, you might even get to talk to me! :-)
go to post Kyle Baxter · Nov 16, 2016 When I want to run a bunch of statements I find it easier to open the SQL Shell and parameterize the queries. Like so:SAMPLES>d $SYSTEM.SQL.Shell()SQL Command Line Shell----------------------------------------------------The command prefix is currently set to: <<nothing>>.Enter q to quit, ? for help.SAMPLES>>update sample.person set name=? where name=?1. update sample.person set name=? where name=?Enter the value for parameter '1': KyleEnter the value for parameter '2': Testerexecuting statement with parameter values: set %tResult=%tStatement.%Execute("'Kyle'","'Test'")1Rows Affectedstatement prepare time(s)/globals/lines/disk: 0.1260s/4915/70580/0ms execute time(s)/globals/lines/disk: 0.0033s/10/110/0ms cached query class: %sqlcq.SAMPLES.cls14---------------------------------------------------------------------------SAMPLES>># 1. update sample.person set name=? where name=?SAMPLES>>#1update sample.person set name=? where name=?1. update sample.person set name=? where name=?Enter the value for parameter '1': Sexy Ginger GodEnter the value for parameter '2': Kyleexecuting statement with parameter values: set %tResult=%tStatement.%Execute("'Sexy Ginger God'","Kyle")1 Rows Affectedstatement prepare time(s)/globals/lines/disk: 0.0002s/5/98/0ms execute time(s)/globals/lines/disk: 0.0002s/5/113/0ms cached query class: %sqlcq.SAMPLES.cls14---------------------------------------------------------------------------SAMPLES>>Some notes: 1) Note that entering the hash/pound/tic-tac-toe sign (#) gives you a list of statements that have been run 2) You can run these statements by following that sign with the number. So #1 runs the first statement from this session (it's actually saved by process) 3) Parameterized queries do not need quotes, and can be easily rerun 4) Not allowing multiple statements per line is a way to help us be more resilient against SQL Injection attacks (that said, parametrization is still key).
go to post Kyle Baxter · Nov 14, 2016 The second option will be faster because we don't need to take in the whole object and put it into memory. The first option does have to do that. Here's a quick test that shows the second way is faster:SAMPLES>s ts = $P($ZTS,",",2) f i=1:1:100000 { s name= ##class(Sample.Person).NameGetStored(1) } w "Time: "_(($P($ZTS,",",2))-ts)Time: .139673SAMPLES>s ts = $P($ZTS,",",2) f i=1:1:100000 { s p= ##class(Sample.Person).%OpenId(1) s name=p.Name } w "Time: "_(($P($ZTS,",",2))-ts)Time: .504776Now, if you want to go SUPER-fast, you can skip all this objects mumbo-jumbo and get that info right from the global:SAMPLES>s ts = $P($ZTS,",",2) f i=1:1:100000 { s name = $LG(^Sample.PersonD(1),2)} w "Time: "_(($P($ZTS,",",2))-ts)Time: .029287However, this has no safeguards built in, and should only be used for your most dire of performance needs.
go to post Kyle Baxter · Nov 2, 2016 You could dump it out to a file on the filesystem and just view it in your browser/favorite editor.
go to post Kyle Baxter · Oct 6, 2016 Hi Scott,Nope! The issue here is probably caching. While things are in memory they are fast, and it is slow when they have to get off of disk. So when you get the next 100,000 rows you need to read data off of the disk and that takes some time. If everything is in memory or on disk then you might get a proportional increase.
go to post Kyle Baxter · Oct 5, 2016 Hi David,Well you're in luck, because you're almost done! First you have to link the table. To do this go to the Management Portal: System Explorer->SQL. Then go to Actions->Linked Table Wizard. Choose the SQL Gateway connection from the drop down and choose your table. Go through the couple of screens where you can normally accept the defaults. Once you link a table, then you can interact with it as if it were local! That is, you can pretend the table is not linked, and use the SQL and/or Object access you're used to in Caché, and access the data in the remote tables. If you are having ANY trouble with this, contact the WRC and one of us will be happy to walk you through the procedure.
go to post Kyle Baxter · Sep 21, 2016 I want to take a moment here and advise you to be very careful with iKnow. iKnow is NOT a solution, it is a way for you to develop your own solutions (much like Caché and Ensemble, actually). While iKnow can give structure to your free text fields, it cannot tell you what to do with that information once you gather it. So before implementing iKnow and developing a solution, you need to know what it is you want to look for, the purpose of putting the iKnow structure on your data, and what you are going to display or show off once you get it.
go to post Kyle Baxter · Sep 21, 2016 Jason - if you haven't sen Dave's response below, please do so. If you want this investigated further I recommend opening an issue with InterSystems Worldwide Response Center (WRC... a.k.a. Support Department) by going to wrc.intersystems.com. We would be happy to help you figure out what happened, why it happened, and how to prevent it in the future.