Searching
mNo edit summary
(Added Edited template with July 12, 2025.)
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Edited|July|12|2025}}
<message>Write the content here to display this box</message>
<message>Write the content here to display this box</message>
We created a Seeker that translates OCL to SQL for searching in databases of any size using OCLPS. We look at derivations, constraints, and validation rules.<syntaxhighlight>
We created a Seeker that translates OCL to SQL for searching in databases of any size using [[Documentation:OCLps|OCLps]]. We look at derivations, constraints, and validation rules. We need [[Documentation:OCLps|OCLps]] to seek the database without instantiating the objects in memory in the prototyper.<syntaxhighlight>
selfVM.Search
selfVM.Search
</syntaxhighlight>Triggers search functionality using search expressions in your ViewModel and populates the vSeekerResult.
</syntaxhighlight>Triggers search functionality using search expressions in your [[Documentation:ViewModel|ViewModel]] and populates the vSeekerResult.


==== See also: [[https://wiki.mdriven.net/index.php?title=Documentation:OCLOperators_Search&veaction=edit&section=1 edit] | [https://wiki.mdriven.net/index.php?title=Documentation:OCLOperators_Search&section=1&veaction=editsource edit source]] ====
Create a ViewModel and right click on it, select '''Add Nested ViewModel class''' and choose '''Add Search Expressions''': [[File:Documentation Searching 1729490219452.png|thumb|none|846x846px]]


* [[/wiki.mdriven.net/Documentation:Search result pages|Search result pages]]
<br />Search Expression: The criteria OCLps a subset of SQL, its main purpose is to be easily transformed to SQL and executed as SQL in the database.<syntaxhighlight>
A Seeker View Model will consist of 3 columns: <syntaxhighlight>
Contract.allinstances->select(a|a.Name.sqllikecaseinsensitive(vSeekParam+'%') or a.Description.sqlLikeCaseInsensitive(vSeekParam +'%') or a.State.sqlLikeCaseInsensitive(vSeekParam+'%'))
SeekValue: vSeekParam
</syntaxhighlight>vSeekParam is a variable, thus you can create multiple variables and several search criteria as represented by the orange section of the ViewModal class:
Search: EAL: selfVM.Search
[[File:Documentation Searching 1729492243556.png|thumb|676x676px|none]]
SearchResults: vSeekerResult
 
</syntaxhighlight>
<br />Search Results - vSeekerResult: This is used to display the result of the search expression in our ViewModel[[File:Documentation Searching 1729492574785.png|thumb|849x849px|none]]
[[File:Documentation Searching 1729486729246.png|thumb|300x300px]]
 
<br />'''See also:'''
* [[Documentation:Search result pages|Search result pages]]
[[Category:Searching]]

Latest revision as of 06:34, 20 January 2025

This page was created by Stephanie@mdriven.net on 2024-04-05. Last edited by Edgar on 2025-01-20.


We created a Seeker that translates OCL to SQL for searching in databases of any size using OCLps. We look at derivations, constraints, and validation rules. We need OCLps to seek the database without instantiating the objects in memory in the prototyper.

selfVM.Search

Triggers search functionality using search expressions in your ViewModel and populates the vSeekerResult. Create a ViewModel and right click on it, select Add Nested ViewModel class and choose Add Search Expressions:

Documentation Searching 1729490219452.png


Search Expression: The criteria OCLps a subset of SQL, its main purpose is to be easily transformed to SQL and executed as SQL in the database.

Contract.allinstances->select(a|a.Name.sqllikecaseinsensitive(vSeekParam+'%') or a.Description.sqlLikeCaseInsensitive(vSeekParam +'%') or a.State.sqlLikeCaseInsensitive(vSeekParam+'%'))

vSeekParam is a variable, thus you can create multiple variables and several search criteria as represented by the orange section of the ViewModal class:

Documentation Searching 1729492243556.png


Search Results - vSeekerResult: This is used to display the result of the search expression in our ViewModel

Documentation Searching 1729492574785.png


See also: