No edit summary |
No edit summary |
||
(19 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<message>Write the content here to display this box</message> | |||
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: | We use OCLps in MDriven here: | ||
* SearchExpressions Nestings in ViewModels | * SearchExpressions Nestings in ViewModels | ||
* All ViewModel Columns starting with PSExpression_ | * [[Documentation:OCLOperators PSEval|PSEval]], [[Documentation:OCLOperators PSEvalValue|PSEvalValue]], [[Documentation:OCLOperators PSEvalTuples|PSEvalTuple]] '''new ways to access DB data directly''': [[Documentation:OCLOperators_PSEval|OCLOperators_PSEval]] | ||
* All ViewModel Columns starting with PSExpression_ (deprecated by [[Documentation:OCLOperators PSEval|PSEval]], [[Documentation:OCLOperators PSEvalValue|PSEvalValue]], [[Documentation:OCLOperators PSEvalTuples|PSEvalTuple]]) | |||
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: | |||
In MDriven all the 3 types of OCL ( OCL, EAL, OCLps) are dynamically | |||
[[File:Cross Reference.png|frameless|308x308px]] | [[File:Cross Reference.png|frameless|308x308px]] | ||
Running the ModelCheck also cross- | 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]] | ||
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. | |||
[[Category:Intermediate]] | [[Category:Intermediate]] | ||
[[Category:OCL]] | [[Category:OCL]] | ||
[[Category:OCLPS]] | |||
{{Edited|July|12|2025}} |
Latest revision as of 05:58, 25 March 2025
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
- PSEval, PSEvalValue, PSEvalTuple new ways to access DB data directly: OCLOperators_PSEval
- All ViewModel Columns starting with PSExpression_ (deprecated by PSEval, PSEvalValue, PSEvalTuple)
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:
Running the ModelCheck also cross-references your model so that you can see where things are used:
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.