Currently, the SQL privileges (SELECT, INSERT, UPDATE, DELETE) are managed at the tables level, which can be very tedious when you have to administer many roles in an organization, and need to keep them sync with a constantly evolving data models.
By managing privileges at the schemas level, will allow to give SELECT and other DML privileges to *all* or *several schemas* to a role|user, fixing the need to manually synchronize the new tables|views to the roles.

0 6
0 166

I am sure I came across this in the past with Cache and just saw this again in IRIS.

When rebuilding or swapping a DAT file for a database it retains the Resource of the DAT file, not the Resource of the Database it is being used for.

For instance, if I have a local Database called APP with a resource %DB_APP and I want to refresh the data from another Database called TEST that has a Resource %DB_TEST I can just copy the DAT file from the TEST folder to the APP folder.

0 5
0 177

Let's consider you would like to efficiently store your historical data in a similar structure than the one used for your current data, but without sharing the same physical storage (ie : not in the same global). What is the most efficient way to do it ?

Below a simple class of your current data :

3 9
0 345

The goal is to construct a comma separated string, using a loop but the same way $listtostring(var,",") would do (i.e. "a,b,c,d,e,f,g,h" without starting or ending comma).

What is the best way to do it, concerning the readability of the code and its performances?

To do so, there are more than 5 methods, but in this example we will test 4 :

1) using a "if" in the loop

3 9
0 418

When I'm asked questions about SQL, I like Intersystems staff at the WRC, generally ask about the Query Plan. My feeling is that even before you run a query you should examine the results of Show Plan to confirm that the code is going to give me the results in the manner I would expect. If I expect it to leverage an index and I see that it is not then I go back and look at what I might have done incorrectly and try to re-write the query to get the index behavior I'm looking for. To that end, there's a poll below to ask you if think moving the Show Plan button as the first button would be

0 0
0 142

We've been tasked with developing a file upload module as part of our wider system, storing scanned documents against a patients profile. Our Intersystems manager suggested storing those files in the DB as streams would be the best approach and it sounded like a solid idea, it can be encrypted, complex indexes, optimized for large files and so on. However the stake holder questioned why would we want to do that over storing them in windows folders and that putting it in the DB was nuts.

2 25
2 1K
Discussion
· Jan 25, 2021
web service api consumed license

1) Does web service access consume license?

2) In web service program, we used a connection pool to reuse the session id, but it doesn’t work, the license consume increased quickly, it seems connection pool didn’t work, do you have any sample to do it?

1 1
0 196

Hi Developers!

Want to raise security discussion today!

Let's discuss how InterSystems security for applications works. In general, the concept is clear: we have Resources (what to protect), Roles which combine a set of privileges and accesses to Resources and Users which can have this or that Role.

But there is also a concept of Application which also could have a Role.

So you either provide a Role for a User or for an Application.

What do you use in production? What is your strategy and why? Pros, cons?

0 4
0 212
Discussion
· Nov 10, 2020
Why change?

I have already asked a question about migrating an Oracle database to Caché, and I was promptly answered. Now, I have one more question, however it is more conceptual. In general, any tool defends its benefits, and looking at Caché's, among many, there is a lot of talk about speed. The question is, if I already have a database, and at the moment, its performance is not a problem, I would like to know what else could influence the change of this database? Remembering that it is functional and without any apparent problem.

8 2
1 246
Discussion
· Sep 28, 2020
%Status usage in ObjectScript

Hi developers!

Want to discuss with you the case of %Status.

If you familiar with ObjectScript you know what is it. I'd love to hear the history of the case why it had appeared in ObjectScript but it turned out that almost every system/library classmethods return %Status and there is a whole set of tools to deal with it.

What is does it gives you the responsibility to check the value or %Status of every system method you call.

E.g. if you save the data of the persistent class, you should never call like this:

do obj.%Save()

you need to call:

set sc=obj.%Save()

if $$$ISERR(sc) do // something or quit.

1 19
0 938
Discussion
· Sep 21, 2020
Unit Testing Naming Convention

Hi Developers!

Recently we discussed the naming convention on packages we deploy and even made some choices.

Here I want to have a conversation on the naming convention for unit tests.

Of course, we wish every good library has unit tests. Here is the documentation and some good articles(one, two, three) regarding it on the Developer Community.

Let's decide on the naming of UnitTests packages?

The suggestion is that unit test classes will all start with the UnitTest package name.

E.g. if your library's class name is:

johndoe.lib.class

The related unit test class will be:

UnitTest.johndoe.lib.class

What about folders?

The suggestion is that unit test classes will live separately from source classes, e.g. in /tests directory.

Here is the example of a repository with unit tests that are named and placed according to the proposal.

What do you think?

5 6
0 306

The use of Source Code Control systems in development is important. And there are a few systems known in the world, like GIT, SVN (Subversion), Perforce, Mercurial. Where the most popular nowadays is the git. Using it is very useful in many cases, but mostly it depends on the code as text, which can be compared between commits, branches, or versions of releases and so on.

1 0
0 281

This is a lesson learned, which I would like to share with community.


Recently I ran into an issue, where I was using %ConstructClone and it kept cloning extra records, which were not needed. The record for which I was trying to run a clone had many-to-one relationships.

The solution to this issue was using param -1. If you run %ConstructClone(-1) it will not clone relationships, but rather just clone single oref as desired in this case.


I hope this information helps someone who is working with similar records.

4 0
0 377

Hi All,

We have few queries which are simple selects . For simplicity let's say there is a query that joins two tables and gets few columns and both tables have no indexes.

Select Tab1.Field1, Tab2.Field2
From Table1 Tab1
Join Table2 Tab2
On Tab2.FK = Tab1.PK

When we do query plan for this it shows approx 6 million, however if we make a simple adjustment to the query

0 5
0 240

HI,

I am planning to build a WebApp that will have tons of data to display in tables, ability to add comments on that table rows and may be some few more small features as we move on.

1. It has to be Secure

2. It has to be fast

3. It has to be Non CSP / Non Zen

4. Will have Cache DB to pull records from but should be flexible to do that from any odbc resource

5. Version 2018 Ensemble

My first step would have been to investigate different options for technologies that would make it work and best suited with Ensemble 2018

0 18
1 435

Hello, InterSystems community!

Lately, you have probably heard of the new InterSystems Package Manager - ZPM. If you're familiar with it or with such package managers as NPM, Dep, pip/PyPI, etc. or just know what is it all about -- this question is for you! The question I want to arise is actually a system design question, or, in other words, "how should ZPM implement it".

4 14
0 314