OCLps
No edit summary
No edit summary
Line 1: Line 1:
Normally the OCL expressions are executed in memory – but it is a common need to query large quantities of data in the database. Normally SQL is used in databases. To avoid having multiple query languages in MDriven we provide a subset of the OCL language that we can translate to SQL. We call this subset for OCLps – where ps stands for Persistent Storage.  
Normally, OCL expressions are executed in memory – but it is a common need to query large quantities of data in the database. SQL is often used in databases. To avoid having multiple query languages in MDriven, we provide a subset of the OCL language that we can translate to SQL. We call this subset for OCLps – where ps stands for Persistent Storage.  


We use OCLps in MDriven here:
We use OCLps in MDriven here:
* SearchExpressions Nestings in ViewModels
* SearchExpressions Nestings in ViewModels
* All ViewModel Columns starting with PSExpression_
* All ViewModel Columns starting with PSExpression_
OCLps is a subset of OCL. No side effects, and you cannot use your methods even if they are marked with IsQuery. The collect, groupby and other operators that return tuples are not supported. The reason is that the main use of OCLps is to return a list of identities based some criteria’s from select or difference or the like. Once MDriven has the set of identities we will load the corresponding objects – then you can take over with normal OCL.
OCLps is a subset of OCL. There are no side effects and you cannot use your methods even if they are marked with IsQuery. The Collect, Groupby and other operators that return tuples are not supported. The reason is that the main use of OCLps is to return a list of identities based on some criterias from select or difference or the like. Once MDriven has the set of identities, we will load the corresponding objects – then you can take over with normal OCL.


In MDriven all the 3 types of OCL ( OCL, EAL, OCLps) are dynamically typed checked whenever the model is loaded, saved or if you initiate a model check manually by clicking the mode check:
In MDriven, all the 3 types of OCL (OCL, EAL, OCLps) are dynamically typed checked whenever the model is loaded, saved or if you initiated a model check manually by clicking the ModelCheck:


[[File:Cross Reference.png|frameless|308x308px]]
[[File:Cross Reference.png|frameless|308x308px]]


Running the ModelCheck also cross-reference you model so that you can see where things are used:
Running the ModelCheck also cross-references your model so that you can see where things are used:


[[File:Cross reference 2.png|frameless|348x348px]]
[[File:Cross reference 2.png|frameless|348x348px]]
[[Category:Intermediate]]
[[Category:Intermediate]]
[[Category:OCL]]
[[Category:OCL]]

Revision as of 11:16, 28 February 2023

Normally, OCL expressions are executed in memory – but it is a common need to query large quantities of data in the database. SQL is often used in databases. To avoid having multiple query languages in MDriven, we provide a subset of the OCL language that we can translate to SQL. We call this subset for OCLps – where ps stands for Persistent Storage.

We use OCLps in MDriven here:

  • SearchExpressions Nestings in ViewModels
  • All ViewModel Columns starting with PSExpression_

OCLps is a subset of OCL. There are no side effects and you cannot use your methods even if they are marked with IsQuery. The Collect, Groupby and other operators that return tuples are not supported. The reason is that the main use of OCLps is to return a list of identities based on some criterias from select or difference or the like. Once MDriven has the set of identities, we will load the corresponding objects – then you can take over with normal OCL.

In MDriven, all the 3 types of OCL (OCL, EAL, OCLps) are dynamically typed checked whenever the model is loaded, saved or if you initiated a model check manually by clicking the ModelCheck:

Cross Reference.png

Running the ModelCheck also cross-references your model so that you can see where things are used:

Cross reference 2.png

This page was edited 8 days ago on 05/09/2024. What links here