OCLOperators PSEval
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Makes it possible use oclPS in any OCL expression. Using this you can "reach into" the database from OCL and action-language (EAL)

Expression template

SomeClass.PSEval(<ps-expression>,maxfetch,offset,<dependon>)

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.

Example

Uppdrag.PSEval(self.Uppdrag->select(u|u.Aktivt)->orderDescending(u|u.Startdatum),  1000, 0, self.Uppdrag)

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 , PSEvalValue

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