OCLOperators sqlLike
No edit summary
No edit summary
Line 5: Line 5:
SqlLike enables you to match part of strings like this:
SqlLike enables you to match part of strings like this:
  Person.allinstances->select(a|a.Identity.sqlLike('%'+vSeekParam+'%'))->orderby(identity)
  Person.allinstances->select(a|a.Identity.sqlLike('%'+vSeekParam+'%'))->orderby(identity)
Add a % to say that "could be anything here."
Add a <code>%</code> to say that "could be anything here."


See also: [[OCLOperators sqlLikeCaseInsensitive|sqlLikeCaseInsensitive]]
See also: [[OCLOperators sqlLikeCaseInsensitive|sqlLikeCaseInsensitive]]
[[Category:OCLOperators]]
[[Category:OCLOperators]]

Revision as of 06:46, 20 June 2023

In SQL databases, you have the Like operator. In OCL, we added this same functionality as SqlLike.

SqlLike works both in OCL and in OCL-PS.

SqlLike enables you to match part of strings like this:

Person.allinstances->select(a|a.Identity.sqlLike('%'+vSeekParam+'%'))->orderby(identity)

Add a % to say that "could be anything here."

See also: sqlLikeCaseInsensitive

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