Caché

Syndicate content 122 

Hi all,

 

We faced a problem where we would like to map a $lb object to its corresponding data model structure in order to later on export it as JSON.

 

So imagin that we have something like this that actually maps to a persistent table with its structure. 

$lb("",,,,,"",,,"BOOLEAN","0",2,2,"1",,"bla",$lb(,,"bla","20050502123400"),"",1,"bla",,0)   

Is there a way to transform this $lb (without the need of openig the object itself) to a JSON object with the proper table fields as properties?

 

Many thanks

Last answer 14 July 2017 Last comment 14 July 2017
0   0 4
230

views

0

rating

Hy.

 

I set up cache in container, which is working fine. But when accessing managment portal the default user was alway Unknown user and no username or password were required. So i disabled the Unknow user in the Security section, but now i keep getting an error access denid. 

Last answer 12 January 2017 Last comment 14 July 2017
0   0 1
1558

views

0

rating

Hi!

I have a global-mapped class that I want to add a transient property through (or at least, not stored on the database). This property is the sum total of various charge classes that are linked to the class via child relationships.

I want this new transient property to be visible at least via SQL.

Last answer 28 June 2017 Last comment 13 July 2017
+ 1   0 2
267

views

+ 1

rating

Greetings,

How do I organize a wildcard search with respect to a database search?

Example of what I am trying to do:  s x=$o(^G("ABC","A*",x))

Trying to navigate through the ^G global for all occurrences of "ABC", and "A*" ("A"+wildcard) but I am new to M and don't know positively how to do this.  Perhaps I don't use an "*" at all, rather; another convention altogether.

Please advise.

Thanks in advance for everyone's assistance.

Last answer 13 July 2017
0   0 1
0

comments

261

views

0

rating

Hi, Community!

And so I continue with publishing of the tasks for the Final round of InterSystems Contest on InterSystems Caché and DeepSee as a part of IT Planet Student Championship in Sochi. This year we had about 2 000 participants in InterSystems Contest.

One of the tasks for the finals was to crack the black box and another to output 9876543210!

Here's the next task: gravity!

Last answer 11 July 2017 Last comment 13 July 2017
+ 1   0 2
167

views

+ 1

rating

I am working with Caché Relationships.

I know how to iterate through the One side of the relationship and for each One iterate through all the various Manys.

What I have been trying to figure out, is the code (I can put into a Class) that will start at the top of the Manys, iterate down and for each of the Manys, pull the associated One.

I can do this with SQL or Globals, but I want to use only Class type code.

Is that clear? Any help?

Last answer 11 July 2017 Last comment 12 July 2017
0   0 1
222

views

0

rating

You might find it useful or not. It depends on what you can imagine it to be used with, like I had to.

Either way, I created a lib that can fetch environment variables from a file or from the OS where Caché is running.

Mostly know as dotenv. Many languages have it, so why not Caché?

The usage is pretty simple:

If you want to use OS env vars exclusively, just use the method:

Last answer 11 July 2017 Last comment 11 July 2017
+ 1   0 1
225

views

+ 1

rating

Greetings,

I am working on the first of many triggers which will have identical code upon row insertion or update of a single column.  According to the document I should be able to define a multiple-event trigger using Cache SQL/DDL.

Here is a link to the current CREATE TRIGGER documentation.  Within the description section is the following paragraph:

Last answer 11 July 2017
0   0 0
0

comments

387

views

0

rating

Beginning - see Part 1.

 

3. Variants of structures when using globals

 

A structure, such as an ordered tree, has various special cases. Let's take a look at those that have practical value for working with globals.

 

 

 

 

3.1 Special case 1. One node without branches

 

Last comment 8 July 2017
+ 6   0 5
824

views

+ 6

rating

Quotes (1NF/2NF/3NF)ru:

Every row-and-column intersection contains exactly one value from the applicable domain (and nothing else).
The same value can be atomic or non-atomic depending on the purpose of this value. For example, “4286” can be
  • atomic, if its denotes “a credit card’s PIN code” (if it’s broken down or reshuffled, it is of no use any longer)
  • non-atomic, if it’s just a “sequence of numbers” (the value still makes sense if broken down into several parts or reshuffled)

This article explores the standard methods of increasing the performance of SQL queries involving the following types of fields: string, date, simple list (in the $LB format), "list of <...>" and "array of <...>".

+ 6   0 3
0

comments

393

views

+ 6

rating

I am experimenting with Relationships, both Parent to Child and One to Many.

I have done some SQL look-ups and have searched through the documentation, however not in a lot detail, but wonder if there are more and better ways to access both sides of Relationships through SQL?

Thank you in advance for any help provided.

Last answer 6 July 2017 Last comment 25 June 2017
0   0 7
711

views

0

rating

Hello,

I'm currently exploring alternatives to CSP/services and ODBC/Sql Maps for access to Caché. I'm not seeing a library which would interest me, so am considering creating one myself.

Does 'CacheConnection' in C# use RPC of some sort, or a defined protocol to communicate with Caché, or does it do so over telnet with scripted commands? I would assume the former. If so, is this a publicly documented protocol that can be implemented by library developers?

Any guidance in this area would be appreciated.

Last answer 6 July 2017 Last comment 6 July 2017
0   0 1
530

views

0

rating

hi

    I restored one database on Server B with EXTSELCT^DBREST command from   backup file (this backup file is taken from Server A).  

When I execute select some rows from one table,  it return error like this, 

the same select sql can return correct data  in server A

But when I select other rows from same table on Server B, it return correct data.

 

Why? maybe the backup file corrupted?

 

Thanks

 

 

 

 

 

 

   

Last answer 5 July 2017
0   0 1
0

comments

104

views

0

rating

Hello. I am a student from Syktyvakar Forest Institute(Russia). 

I need to make Research : "Databases for working with spatial data
Consider MySQL, PostgreSQL and 1 to choose from". I want to explore Cache with subject library of spatial data.

Help.

Does Someone from the developers write the libraries of spatial data?

Last answer 28 November 2016 Last comment 5 July 2017
0   0 1
238

views

0

rating

Caché offers a number of methods for going through a collection and doing something with its elements. The easiest method uses a while-loop and lets you fulfill the task in an imperative manner. The developer needs to take care of the iterator, jumping to the next element and checking if the loop is within the collection.

Last comment 4 July 2017
+ 13   0 3
1302

views

+ 13

rating

Good day, I have this issue. I have global like: ^myglobal(varX) = $LB(var1,var2). I need to delete all globals that have variable var1 in that list same without a need to iterate through all globals and checking their value.

Exact example:

- in database exist following:

Last answer 3 July 2017 Last comment 4 July 2017
0   0 1
448

views

0

rating

Good day, I would like to find out the size of Caché ObjectScript variable in order to guarantee that my program will not leak, equally in terminal and Caché globals.  For example how huge number I can store in that variable ? And what happen in Caché when variable will leak ? How is this behavior treated? (how much memory is reserved for common variable?)

Thanks  in advance for your answers.

Last answer 3 July 2017 Last comment 3 July 2017
0   0 1
327

views

0

rating