OCLOperators PSEval
This page was created by Hans.karlsen@mdriven.net on 2022-01-11. Last edited by Stephanie@mdriven.net on 2025-02-06.

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,'')

Always remember that your SQL-server might also need indexes and other performance settings to be able to execute your expression efficient.

See also Sqlpassthrough

MDriven Chat

How would you like to chat today?

Setting up your conversation…

This may take a few moments