go to post Robert Cemper · Apr 16, 2023 there was some GOLF work to do set o="" for set o=$zobjnext(o) quit:(o="")||($p(o,"?")=x)
go to post Robert Cemper · Apr 16, 2023 it is possible. but an OREF is always a LOCAL reference !see this example SAM>kill SAM>set a=##class(Sample.Person).%OpenId(2) SAM>set b=##class(Sample.Person).%OpenId(12) SAM>set c=##class(Sample.Person).%OpenId(111) SAM>set x="3@Sample.Person" ;what we look for SAM>set o="" ;this will be our OREF SAM>zw a=<OBJECT REFERENCE>[4@Sample.Person] b=<OBJECT REFERENCE>[3@Sample.Person] c=<OBJECT REFERENCE>[2@Sample.Employee] o="" x="3@Sample.Person" SAM>;; now we convert our String x to OREF o SAM>for set o=$zobjnext(o) quit:(o="")||($p(o,"?")=x) SAM>zw ;; we did it a=<OBJECT REFERENCE>[4@Sample.Person] b=<OBJECT REFERENCE>[3@Sample.Person] c=<OBJECT REFERENCE>[2@Sample.Employee] o=<OBJECT REFERENCE>[3@Sample.Person] x="3@Sample.Person" SAM> The key-oneliner:for set o=$zobjnext(o) quit:(o="")||($p(o,"?")=x)
go to post Robert Cemper · Apr 16, 2023 I'll think it over. I have some dirty ideas. need to check itit's kind of useful golf for me.
go to post Robert Cemper · Apr 16, 2023 you just can copy an already existing reference SET rerf=a from the example above to show all open objects:Do $System.OBJ.ShowObjects()Oref Class Name Ref Count---- ---------- ---------1 Sample.Person 12 Sample.Person 13 Sample.Employee 14 Sample.Company 1 OR Do $System.OBJ.ShowObjects("/detail=1")Oref Class Name Ref Count---- ---------- ---------1 Sample.Person 1+----------------- general information ---------------| oref value: 1| class name: Sample.Person| %%OID: $lb("2","Sample.Person")| reference count: 1+----------------- attribute values ------------------| %Concurrency = 1 <Set>| DOB = 32225| Name = "Ubertini,Brian S."| SSN = "231-12-5250"+----------------- swizzled references ---------------| i%FavoriteColors = "" <Set>| r%FavoriteColors = "" <Set>| i%Home = $lb("9177 First Court","Bensonhurst","SC",42658) <Set>| r%Home = "" <Set>| i%Office = $lb("260 First Place","Larchmont","NV",99593) <Set>| r%Office = "" <Set>| i%Spouse = ""| r%Spouse = ""+--------------- calculated references ---------------| Age <Get>+----------------------------------------------------- 2 Sample.Person 1+----------------- general information ---------------| oref value: 2| class name: Sample.Person| %%OID: $lb("12","Sample.Person")| reference count: 1+----------------- attribute values ------------------| %Concurrency = 1 <Set>| DOB = 33423| Name = "Waal,Jeff V."| SSN = "137-61-1656"+----------------- swizzled references ---------------| i%FavoriteColors = "" <Set>| r%FavoriteColors = "" <Set>| i%Home = $lb("3872 Washington Place","Newton","NJ",80886) <Set>| r%Home = "" <Set>| i%Office = $lb("4339 Second Drive","Albany","PA",79202) <Set>| r%Office = "" <Set>| i%Spouse = ""| r%Spouse = ""+--------------- calculated references ---------------| Age <Get>+----------------------------------------------------- 3 Sample.Employee 1+----------------- general information ---------------| oref value: 3| class name: Sample.Employee| %%OID: $lb("111","Sample.Employee")| reference count: 1+----------------- attribute values ------------------| %Concurrency = 1 <Set>| DOB = 50109| Name = "Yezek,Chelsea F."| SSN = "227-72-8394"| Salary = 69426| Title = "Executive WebMaster"+----------------- swizzled references ---------------| i%Company = 2 <Set>| r%Company = "" <Set>| i%FavoriteColors = ""|i%FavoriteColors(1) = "Blue"|i%FavoriteColors(2) = "Yellow"| r%FavoriteColors = "" <Set>| i%Home = $lb("7573 Main Drive","Bensonhurst","MA",97453) <Set>| r%Home = "" <Set>| i%Notes = "" <Set>| r%Notes = "" <Set>| i%Office = $lb("7403 Oak Place","Vail","NH",46047) <Set>| r%Office = "" <Set>| i%Picture = "" <Set>| r%Picture = "" <Set>| i%Spouse = 89| r%Spouse = ""+--------------- calculated references ---------------| Age <Get>+-----------------------------------------------------4 Sample.Company 1+----------------- general information ---------------| oref value: 4| class name: Sample.Company| %%OID: $lb("9","Sample.Company")| reference count: 1+----------------- attribute values ------------------| %Concurrency = 1 <Set>| Mission = "Leaders in dynamic nano-application development instruments for the desktop."| Name = "BioDyne LLC."| Revenue = 928565856| TaxID = "X6668"+----------------- swizzled references ---------------| i%Employees = $lb("Sample.Employee","Company",4,"many",1,1) <Set>| r%Employees = "" <Set>+----------------------------------------------------- Then you can use %%OID to generate your own OREF like set ref=##class(%Persistent).%Open($lb("9","Sample.Company"))It's not really comfortable
go to post Robert Cemper · Apr 16, 2023 Grazie @Luca Ravazzolo !You hit the point: could create security vulnerability my intention was to see the license capacity used for this type of service
go to post Robert Cemper · Apr 16, 2023 @ is just a separatorwhile n is just an internal sequence number within your partitionsee this example SAMPLES>s a=##class(Sample.Person).%OpenId(2) SAMPLES>s b=##class(Sample.Person).%OpenId(12) SAMPLES>s c=##class(Sample.Employee).%OpenId(111) SAMPLES>s d=##class(Sample.Company).%OpenId(9) SAMPLES>zw a=<OBJECT REFERENCE>[1@Sample.Person] b=<OBJECT REFERENCE>[2@Sample.Person] c=<OBJECT REFERENCE>[3@Sample.Employee] d=<OBJECT REFERENCE>[4@Sample.Company] SAMPLES>
go to post Robert Cemper · Apr 16, 2023 I try to test contributions to the contestbut IRIS Cloud SQL just shows Deployment Pendingfor HOURS !!And no contact or mail to report this breakdownIt is really disappointing!
go to post Robert Cemper · Apr 14, 2023 I googled "JSON max property size" and found So whoever is the recipient, there will be troubles with larger propertiesI'd look for something to chop it into smaller pieces. (elephant approach)
go to post Robert Cemper · Apr 13, 2023 Could be a practical use of embedded python.https://www.w3schools.com/python/ref_string_split.aspa little more typing if you use $LOCATE function
go to post Robert Cemper · Apr 12, 2023 with studio, I open 1 for each namespace and then drag and drop it from 1 NS to the otherworks single or multiplenot so useful for 300. ns %ALL looks more promising
go to post Robert Cemper · Apr 11, 2023 Not that impressive. My skin is just pale and hairy. Model OLD WHITE MAN
go to post Robert Cemper · Apr 10, 2023 other SQL tools. confirmed: I used ODBC + SQLGateway for access and operation from local IRISworks perfectly.
go to post Robert Cemper · Apr 10, 2023 read docu • classmethod CompileList(ByRef list As %String = "", qspec As %String = "", ByRef errorlog As %String, ByRef updatedlist As %String) as %Status Compile a list of items specified in 'list' and separated by commas, or an array list("item.MAC")="". You can also use ? or * wild cards and if you wish to exclude items pass ' before the item name which also supports wild card, e.g. "User.*.cls,'User.T*.cls". Each item on the list is sufixed by the type of item it is so to compile a class and a routine you could specify 'class.cls,routine.mac' The order of compilation is INT, CLS, MAC, CSR, CSP.qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. Note that while /mapped=0 qualifier applies to the pattern passed in by only searching the default routine database, however any compile is done in the current namespace. So it is possible a routine/class found with /mapped=0 may not be visible in the current namespace or may be a different version if there are complicated package mappings.
go to post Robert Cemper · Apr 9, 2023 ACCOUNT SOLVED: with a new account name. may be a typo in the e-mailTHOUGH OPEN: where is the admin contact
go to post Robert Cemper · Apr 9, 2023 I tried to create an account on https://portal.sql-contest.isccloud.io/account/login Just the welcome mail never arrived.the page proposed to contact admin in this case Note: If you do not receive an email, it might be that the username or email address entered is not registered for an account. If you are unable to remember the username or email address you used to sign up for an account, please contact your system administrator for assistance. No further notice. Who is that system admin? Which mail ?Not so impressive
go to post Robert Cemper · Apr 9, 2023 from docs:If you are using a UNIX® or Linux system, you can provide a list of alias definitions which the Terminal will set automatically at the start of every session. Define these aliases (one per line) in a file named .iris_init in the home directory.never tried this. I rarely work on *X
go to post Robert Cemper · Apr 9, 2023 Do ##class(Security.Users).UnExpireUserPasswords("*") or set Prop("Password")=NewPassword set tSC=##class(Security.Users).Modify(Username,.Prop) Classref1 Classref2
go to post Robert Cemper · Apr 8, 2023 USER>:? :<number> Recall command # <number> :? Display help :py Do $system.Python.Shell() :mdx Do $system.DeepSee.Shell() :sql Do $system.SQL.Shell() :tsql Do $system.SQL.TSQLShell() :alias Create/display aliases :clear Clear history buffer :history Display command history :unalias Remove aliases HTH
go to post Robert Cemper · Apr 8, 2023 Thanks a lot!So team working in the actual contest has to be organized differently