go to post Vitaliy Serdtsev · Jan 25, 2023 See Deploying code to production site especially the section Limitations for DeployToFile() and InstallFromFile()
go to post Vitaliy Serdtsev · Jan 25, 2023 There are a couple of points: what's wrong with users, roles, privileges, applications, etc.? %SYS>do ^SECURITY 1) User setup 2) Role setup 3) Service setup 4) Resource setup 5) Application setup 6) Auditing setup 8) SSL configuration setup 9) Mobile phone service provider setup 10) OpenAM Identity Services setup 11) Encryption key setup 12) System parameter setup 13) X509 User setup 14) KMIP server setup 15) Exit Option? 12 1) Edit system options 2) Edit authentication options 3) Edit LDAP options 4) Display system options 5) Export All Security settings 6) Import All Security settings 7) Exit Option? 5 Export ALL security records? Yes => Yes Warning: Before importing SSL configurations into a different configuration the same certificate directories and certificate files must exist in the new configuration, otherwise the import will fail. Export to file name SecurityExport.xml => Parameters? "WNS" => Confirm export of selected security records to SecurityExport.xml? No => yes Exported x Application security records Exported x DocDB security records Exported x Event security records Exported x KMIPServer security records Exported x LDAPConfig security records Exported x OpenAMIdentityService security records Exported x PhoneProvider security records Exported x Resource security records Exported x Role security records Exported x SQLPrivileges security records Exported x SSLConfig security records Exported x Service security records Exported x System security records Exported x User security records Exported x X509Credential security records Exported x X509Users security records Export complete 1) Edit system options 2) Edit authentication options 3) Edit LDAP options 4) Display system options 5) Export All Security settings 6) Import All Security settings 7) Exit Option? to transfer JDBC/ODBC settings, you can still use external tools, for example DbVisualizer or SQL Data Lens, where you can choose the data format (CSV, XML, JSON, Excel, etc.), the necessary fields and much more.
go to post Vitaliy Serdtsev · Jan 25, 2023 Did you copy/paste the query correctly here? Select Books.nam,Books.print,Books.Relativename,Books.Firstpage,Books.Lastpage,Books.trn,Books.lastissue, Books.firstissue,Books.person,Books.author,Books.price,Books.cd,Books.ab,Books.pf,Books.ju,Books.er, Books.qw,Books.qt,Books.mn, Records.qw,Records.er,Records.ty,Records.ui,Records.op,Records."as", OrderBooks.mn,OrderBooks.bv, OrderRecords.sd,OrderRecords.fg,OrderRecords.hj, Orders.lastdate From SQLUser.Books Books INNER JOIN SQLUser.Records Records ON Books.id=Recordsid INNER JOIN SQLUser.OrderedBooks OrderBooks ON Books.id=OrderBooks.id INNER JOIN SQLUser.OrderedRecords OrderRecords ON Books.id=OrderRecords INNER JOIN SQLUser.Orders Orders ON Books.id=Orders.id where ((Records.qw=OrderBooks.qw) and (Records.er is null))In addition to tuning tables, I would first look at the query plan and, accordingly, the indexes involved in it.
go to post Vitaliy Serdtsev · Jan 24, 2023 If you select the text with the mouse, you will see spaces on the right in the second "Output". In general, I think that such details should be enclosed in quotation marks.
go to post Vitaliy Serdtsev · Jan 24, 2023 Ok. If the nuances of formatting spaces and line feed are unimportant, then can yet shorten Robert's code: size = 40 ClassMethod Build(f As %Integer) { s a="#" f i=f:-1:1 w !?i,a s a=a_"##" }
go to post Vitaliy Serdtsev · Jan 23, 2023 It is necessary to take into account the following points: according to the documentation should be // add the columns to export Do mgr.ColumnNames.Insert("Closed") Do mgr.ColumnTypes.Insert("N") Do mgr.ColumnNames.Insert("DocumentType") Do mgr.ColumnTypes.Insert("S") Do mgr.ColumnNames.Insert("StatusCode") Do mgr.ColumnTypes.Insert("N") Do mgr.ColumnNames.Insert("StatusLastUpdated") Do mgr.ColumnTypes.Insert("TS") StringQuote only affects when escaping the corresponding characters, for example: Set mgr.StringQuote = $c(34) // double quotes a"b -> "a""b" Set mgr.StringQuote = $c(39) // ' a'b -> 'a''b' DateFormat and TimeFormat are applicable only for fields of type D and T, respectively, but you have a field of type TS TimeStampFormat is applicable only for import, but not for export
go to post Vitaliy Serdtsev · Jan 23, 2023 I hope that Eduard will be formulate the conditions of the task more carefully in the future. PS: Robert, you shouldn't have rushed to remove your solution. In any case, your solution was the best.
go to post Vitaliy Serdtsev · Jan 23, 2023 You are absolutely right.There should be no discrepancies in the description of the task and in the code for checking the solution.
go to post Vitaliy Serdtsev · Jan 23, 2023 I suggest waiting for an answer from @Eduard Lebedyuk, the author of the discussion, who knows how really should be.
go to post Vitaliy Serdtsev · Jan 23, 2023 I'm looking at the output validation code, not Output, where there are no spaces at all on the right. It is a pity that there is confusion because of this! Class codeGolf.test.Pyramid Class codeGolf.test.Pyramid Extends %UnitTest.TestCase { ClassMethod openDisplay(Output filename As %String) { Set dir=##class(%SYSTEM.Process).CurrentDirectory() Set filename=dir_"temp.txt" Open filename:("NRW"):5 USE filename } ClassMethod getResult(filename As %String, Output list As %ListOfDataTypes) { Set list = ##class(%ListOfDataTypes).%New() Set file = ##class(%File).%New(filename) Set sc = file.Open( "R" ) If $$$ISERR(sc) quit While 'file.AtEnd { Do list.Insert(file.ReadLine()) } Do file.Close() Do ##class(%File).Delete(filename) } Method TestSimple() { Do ..openDisplay(.filename) Do ##class(codeGolf.Pyramid).Build(3) CLOSE filename Do ..getResult(filename, .result) Do $$$AssertEquals(result.GetAt(1), " # ") Do $$$AssertEquals(result.GetAt(3), "#####") } Method TestComplex() { Do ..openDisplay(.filename) Do ##class(codeGolf.Pyramid).Build(40) CLOSE filename Do ..getResult(filename, .result) Do $$$AssertEquals(result.GetAt(1), " # ") Do $$$AssertEquals(result.GetAt(23), " ############################################# ") Do $$$AssertEquals(result.GetAt(40), "###############################################################################") } }
go to post Vitaliy Serdtsev · Jan 23, 2023 size = 50 ClassMethod Build(f As %Integer) { s a="#" f i=f:-1:1 w ?i-1,a,?f*2-1,! s a=a_"##" } PS: if you look at the class codeGolf.test.Pyramid, you can see that the format of the output data for f=3 should be as follows: " # " " ### " "#####" So be careful.
go to post Vitaliy Serdtsev · Dec 21, 2022 Your example does not take into account which element is selected. For example, if you select the last element, then the list wins instead of the delimited string. s L=1e4,N=1e5,a="1",b=$lb(1) f i=2:1:L s a=a_"_"_i,b=b_$lb(i) s t=$zh f i=1:1:N s c=$p(a,"_",L) w $zh-t," s.",! s t=$zh f i=1:1:N s c=$li(b,L) w $zh-t," s.",!
go to post Vitaliy Serdtsev · Dec 21, 2022 I'll put in my five cents too. Firstly, Apache for Windows is installed very easily: you just need to unpack the archive and, if necessary (this is done once), register the service. Secondly, it is not difficult to find the Apache distribution for Windows, for example here: Apache Haus Downloads Thirdly, I always remove PWS and use my own Apache, so I welcome removing PWS from the IRIS distribution
go to post Vitaliy Serdtsev · Dec 1, 2022 It is not entirely clear that you are using Caché or IRIS 2021.1: #Caché I have two tables: one a local table using cache and the other is via an SQL gateway.. Product version: IRIS 2021.1 The presence/absence of restrictions on the execution of heterogeneous queries depends on this: Caché 2018.1.7: All the tables listed in the FROM clause of an SQL query must come from the same data source. Queries that join data from heterogeneous data sources are not allowed. IRIS 2021.1: Queries that join data from heterogeneous data sources are only supported for ODBC connections. When using JDBC, all tables listed in the FROM clause of an SQL query must come from the same data source.
go to post Vitaliy Serdtsev · Nov 11, 2022 size = 79 ClassMethod Order(a As %String) As %String { s r=a f i=1:1:5e5{s s=$p(a," ",i),w=$tr(s,1e20/17),$p(r," ",$tr(s,w))=w} q r }
go to post Vitaliy Serdtsev · Oct 24, 2022 Have you looked at the type of fields in the metadata? For me, the INTEGER type (4) is returned for ID, and the BIGINT type (-5) is returned for %ID. Try SELECT id, x, y, z FROM some_table order by %id and d rs.%GetMetadata().%Display() What are the default values for AdaptiveMode, AllowRowIDUpdate, IdKeyCPF, PKEY_IS_IDKEY ? Try disabling AdaptiveMode.
go to post Vitaliy Serdtsev · Oct 24, 2022 There is a faster way without opening the object: Class dc.test Extends %Persistent { ClassMethod Test() { s classname="dc.test", storagename="Default" w $$$defMemberKeyGet(classname,$$$cCLASSstorage,storagename,$$$cSDEFdatalocation) } Storage Default { <Data name="testDefaultData"> <Value name="1"> <Value>%%CLASSNAME</Value> </Value> </Data> <DataLocation>^abc.1</DataLocation> <DefaultData>testDefaultData</DefaultData> <IdLocation>^dc.testD</IdLocation> <IndexLocation>^dc.testI</IndexLocation> <StreamLocation>^dc.testS</StreamLocation> <Type>%Library.CacheStorage</Type> } }Result: ^abc.1