Question CM Wang · Jun 27, 2018 Parse binary data by InterSystems ObjectScript I am trying to read some binary data from a local file or through socket.The binary data is like H.264 codec, I need to read data BYTE by BYTE (even BIT by BIT) and decide the next step based on the data read so far.I check the documentation and it seems like most of the sample focus on human readable IO, ie: LINE by LINE.Could I achieve my goal through COS?Thanks. #Caché #ObjectScript 0 3 0 1.3K
Question CM Wang · Dec 27, 2017 the associativity when the INNER JOIN and LEFT JOIN are mixed select * from A left join B on A.x = B.x inner join C on B.y = C.ydoes Cache SQL treat the join path: LEFT_JOIN(A,INNER_JOIN(B.C)) also a valid candidate path?Thanks. #SQL #Caché 0 8 0 954
Question CM Wang · Aug 18, 2017 %Dictionary.StorageSQLMapDefinition I want to manipulate all the objects whose type is%Dictionary.StorageSQLMapDefinition by %OpenIdHowever, I don't know the exact id to feed into %OpenId, is there a way to query all the existing ids of %Dictionary.StorageSQLMapDefinition in a namespace?Thanks. #Caché 0 3 0 389
Question CM Wang · Aug 16, 2017 PROTECT error I try to run below two statements Set tRS = ##class(%ResultSet).%New("%Dictionary.ClassDefinition:SubclassOf") set tSC = tRS.Execute("%Persistent") and I always get <PROTECT>check+5^%Dictionary.ClassDefinitionQuery.1 The login user is _SYSTEM and should have all the permissions. I cannot run queries in the $SYSTEM.SQL.Shell(). I would get <PROTECT>%GenerateMetadata+16^%SQL.StatementMetadata.1 However, when I run the query through SMP, everything is fine. Any idea where could I start to investigate ? Thanks. #Caché 1 5 0 2.9K
Question CM Wang · Aug 16, 2017 How to get the number of global references for a dynamic sql statement In $system.SQL.Shell(), it would also report the number of global references for a given query.Is it possible that I could also get this statistics from the %SQL.Statement interface when I launch a dynamic sql?Thanks. #Object Data Model #Caché 0 4 0 328
Question CM Wang · Aug 15, 2017 How to get all the names of the classes which inherits %Persistent I want to retrieve all the names of classes which are %Persistent in a namespace by COS.Any suggestion, Thanks. #Object Data Model #Caché 0 8 0 973
Question CM Wang · Aug 2, 2017 How to log out from Cache terminal How could I log out from Cache terminal (connected through csession) and back to the system shell?Thanks. #Beginner #Caché #Terminal 1 6 0 2.4K
Question CM Wang · Jul 21, 2017 how to redirect IO I get a third party routine which outputs some messages to standard output during execution.Is it possible that I could direct the messages to other device so my terminal would never see this messages?Thanks. #Caché #Terminal 0 1 0 646
Question CM Wang · Jul 20, 2017 What is the most efficient way to store/retrieve the data into/from global Type 1: ^global(key1,key2,key3,val1) = "" ^global(key1,key2,key3,val2) = "" ^global(key1,key2,key3,valn) = "" Type 2: ^global(key1,key2,key3) = $lb(val1,val2,.....valn) the number of val may be just dozens, but also possible to 10K Thanks. #Caché 0 1 0 344
Question CM Wang · Jul 18, 2017 How to dynamically change the entry defined in SQL storage map I have a class and I would like to dynamically change its selectivity attribute in run-time and then call $system.OBJ.Compile torecompile the class. I have changed the selectivity to a global, but it seems like it does not work. Any suggestions? Thanks. #Caché #Compiler 0 3 0 395
Question CM Wang · Jul 16, 2017 How to configure the size for global buffer Below are the output messages when Cache start.Allocated 178MB shared memory: 1MB global buffers, 26MB routine buffersI try to configure the global buffer size by [System] -> [Configuration] -> [Memory and Startup] from SMP,but it seems like the changes does not apply to the global buffer.Thanks for your help. #Caché 0 4 0 1.4K
Question CM Wang · Jul 16, 2017 How to index a class Hi I have two persistent classes defined. Lets call it Parent and Child.Child class is one of the property of Parent Class.I would like to define a index on Child class.So what is the default behaviour I defined a index on a non simple data type member?Any possibility that I could customized the behaviour ? For example. Child class has three properties.Could I configure the index to index any combinations of these three properties?Thanks for your help. #Indexing #Object Data Model #Caché 0 1 0 626
Question CM Wang · Jul 14, 2017 How to specify the UrlMap for Rest call Hi,I have a UrlMap like the one below. <Route Url="/Results/:queryID" Method="POST" Call="QueryResults"/>What if I have to pass two parameters to QueryResults, how to do configure Url? #Object Data Model #Caché 0 1 0 653
Question CM Wang · Jul 14, 2017 The command to kill all globals given the namespace Hi,Is there any COS command could kill all the globals given the namespace?Thanks. #Object Data Model #Caché 0 8 0 785
Question CM Wang · Jul 5, 2017 stored procedure %SYSTEM.SQL_TableExists "SELECT %SYSTEM.SQL_TableExists('table name') "could work as expected under SQL shell,but for "CALL %SYSTEM.SQL_TableExists('table name')" does not work (not any error reported, it just show nothing).Is there any reason why CALL could not be applied to a stored procedure?Thanks. #Caché #SQL 0 7 0 486
Question CM Wang · Jul 3, 2017 How to escape the single quote in the single quoted string I have a stored procedure like below: Call USER.SP('select * from Sample.Person where SSN='aaaaa'','0','S') How could I escape the single quotes for aaaaa? I try double single quotes but in vain. Thanks you. #Object Data Model #SQL #Caché 0 11 0 2.4K
Question CM Wang · Jun 26, 2017 The COS APIs to get O.S version and the Cache installed directory Hi,I would like to retrieve the O.S version (Windows or Unix) and Cache installed directory.which COS apis should I use ?Thanks for your help. #API #Caché 0 2 0 790
Question CM Wang · Jun 26, 2017 How to execute external unix/windows commands from COS I would like to invoke some unix/windows commands from COS, any API could do that?Also, I would like to set up some Environment Variables for this process which would execute the above external command.Anyway to achieve that?Thanks for your help. #API #Callout #Caché 1 5 0 639
Question CM Wang · Jun 19, 2017 How to expose the specific database via ECP Hi,I want to attach one local namespace on instance A to the database on instance B.How could I use ECP to achieve my goal?Should I config instance B as ECP data server? If so, how could I explicitly specify which database on instance B could be exposed ?Thanks for your help. #ECP #Caché 0 4 0 518
Question CM Wang · Mar 15, 2017 How to check Cache is unicode or 8 bit installed Hi,Any COS API could detect the underlying system is supported unicode or not ?Thanks for your help. #Caché 0 1 0 1.2K