OCLps

OCL expressions are usually 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 OCL "PS" – where "PS" stands for Persistent Storage.

We use OCLps in MDriven here:

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

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

MDriven relies heavily on OCL which is a very powerful tool to describe constraints, actions, and transformations in your model.

OCLps differences

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.

This page was edited 5 days ago on 06/17/2024. What links here