Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scout/Concepts/Sql Lookup Service"

(New page: {{ScoutPage|cat=Concepts}} A '''SQL lookup Service''' is a specific type of {{ScoutLink|Concepts|Lookup_Service|Lookup Service}} that works with a database. * implements: {{ScoutJavadoc|...)
 
m (Properties)
Line 28: Line 28:
 
Depending on the function that is called (by key, by text, by all, by rec) only the portion of the SQL query beetween the corresponding tag is keept.
 
Depending on the function that is called (by key, by text, by all, by rec) only the portion of the SQL query beetween the corresponding tag is keept.
  
The <code>getDataByKey(LookupCall call)</code> is attachted to the query as binding. Therefore all getter on the call, are available in the query.
+
The <code>getDataByKey(LookupCall call)</code> is attached to the query as binding. Therefore all getters on the call, are available in the query.
  
 
<source lang="sql">
 
<source lang="sql">
select language_id, name, null, null, null, null, null, 1, null, 1 from language " +
+
select language_id, name, null, null, null, null, null, 1, null, 1  
 +
from language
 
<key>where language_id = :key</key>
 
<key>where language_id = :key</key>
 
<text>where upper(name) like upper('%'||:text||'%')</text>
 
<text>where upper(name) like upper('%'||:text||'%')</text>
Line 40: Line 41:
  
 
{{note|TODO|TODO: SortColumn}}
 
{{note|TODO|TODO: SortColumn}}
 
  
 
== Events ==
 
== Events ==

Revision as of 18:36, 21 March 2011

The Scout documentation has been moved to https://eclipsescout.github.io/.

A SQL lookup Service is a specific type of The Scout documentation has been moved to https://eclipsescout.github.io/. that works with a database.


Description

A SQL lookup Service provide a way to implement a The Scout documentation has been moved to https://eclipsescout.github.io/. that is very efficient to configured, if the The Scout documentation has been moved to https://eclipsescout.github.io/. is resolved with a database.

Instead of implementing the 4 methods (getDataByKey(LookupCall call), getDataByText(LookupCall call), getDataByAll(LookupCall call), getDataByRec(LookupCall call)), it is possible to defined the behavior of the lookup service with some configuration properties and events.


Properties

Defined with The Scout documentation has been moved to https://eclipsescout.github.io/. methods.

The Scout documentation has been moved to https://eclipsescout.github.io/.

Note.png
TODO
SqlSelect: what should be the result


Possibility to use some special tags:

  • key
  • text
  • all
  • rec

Depending on the function that is called (by key, by text, by all, by rec) only the portion of the SQL query beetween the corresponding tag is keept.

The getDataByKey(LookupCall call) is attached to the query as binding. Therefore all getters on the call, are available in the query.

SELECT language_id, name, NULL, NULL, NULL, NULL, NULL, 1, NULL, 1 
FROM LANGUAGE
<key>WHERE language_id = :key</key>
<text>WHERE UPPER(name) LIKE UPPER('%'||:text||'%')</text>


The Scout documentation has been moved to https://eclipsescout.github.io/.

Note.png
TODO
TODO: SortColumn


Events

Defined with The Scout documentation has been moved to https://eclipsescout.github.io/. methods.

Template:ScoutEvt

Note.png
TODO
TODO: LoadLookupRows


See Also

Back to the top