OCLOperators PSEval
No edit summary
No edit summary
Line 1: Line 1:
A way to switch from ocl to oclps in any expression.
Makes it possible use oclPS in any OCL expression.


SomeClass.PSEval(SomeClass.allinstances->select(x|x.name=vWhatever),maxfetch,offset,dependon) -  offers a way to reach into the database from ocl and action-lang - beware that we dont subscribe on sets from db, send things to subscribe on dependon.
Expression template
SomeClass.PSEval(SomeClass.allinstances->select(x|x.name=vWhatever),maxfetch,offset,dependon)
Using this you can "reach into" the database from OCL and action-language (EAL)
 
'''Note!'''  - PSEval don't subscribe on sets from db. To make the operator auto-updating, provide an expression in "dependon" that when changed should also rerun the PSEval expression. This can for example be a timer.


For example this expression from a method having "userName" as a parameter
For example this expression from a method having "userName" as a parameter
  SysUser.PSEval(SysUser.allinstances->select(su|su.Username=userName),2,0,<nowiki>''</nowiki>)
  SysUser.PSEval(SysUser.allinstances->select(su|su.Username=userName),2,0,<nowiki>''</nowiki>)
See also [[OCLOperators Sqlpassthrough|Sqlpassthrough]]
See also [[OCLOperators Sqlpassthrough|Sqlpassthrough]]

Revision as of 17:22, 4 March 2022

Makes it possible use oclPS in any OCL expression.

Expression template

SomeClass.PSEval(SomeClass.allinstances->select(x|x.name=vWhatever),maxfetch,offset,dependon)

Using this you can "reach into" the database from OCL and action-language (EAL)

Note! - PSEval don't subscribe on sets from db. To make the operator auto-updating, provide an expression in "dependon" that when changed should also rerun the PSEval expression. This can for example be a timer.

For example this expression from a method having "userName" as a parameter

SysUser.PSEval(SysUser.allinstances->select(su|su.Username=userName),2,0,'')

See also Sqlpassthrough

This page was edited 47 days ago on 02/10/2024. What links here