OCLps
No edit summary
No edit summary
Line 4: Line 4:
* 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. 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.
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:
In MDriven, all the 3 types of OCL (OCL, EAL, OCLps) are dynamically type-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]]
Line 15: Line 15:
[[Category:Intermediate]]
[[Category:Intermediate]]
[[Category:OCL]]
[[Category:OCL]]
[[Category:OCLPS]]

Revision as of 06:33, 31 March 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 type-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