Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be 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 Service"

m (Category changed)
(Replaced content with "The Scout documentation has been moved to https://eclipsescout.github.io/.")
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{ScoutPage|cat=Server}}
+
The Scout documentation has been moved to https://eclipsescout.github.io/.
 
+
The SqlService provides access to a database.
+
 
+
* implements {{ScoutJavadoc|ISqlService|I}}
+
* extends {{ScoutJavadoc|AbstractSqlService|C}}
+
 
+
==Description==
+
{{Note|TODO|Add a description}}
+
 
+
==Minimal configuration==
+
To be able to connect to a database, these properties needs to be configured:
+
* {{ScoutProp|JdbcDriverName}} the qualified name of the JDBC driver.
+
* {{ScoutProp|JdbcMappingName}} the JDBC path <code>"jdbc:..."</code>.
+
* {{ScoutProp|Username}} the user name to connect to the database.
+
* {{ScoutProp|Password}} the password to connect to the database.
+
* {{ScoutProp|SqlStyle}} provides the class of the {{ScoutLink|Concepts|SqlStyle|Sql Style}} that should be used.
+
 
+
 
+
==SQL convenience class==
+
Scout proposes a convenience singleton class to access the default SqlService: {{ScoutJavadoc|SQL|C}}
+
 
+
Here a simple example:
+
<source lang="java">
+
    SQL.update(
+
        " update      actor " +
+
        " set        first_name = :firstName," +
+
        "            last_name = :lastName " +
+
        " where      actor_id = :id ",
+
        formData
+
        );
+
</source>
+
 
+
== See also ==
+
* {{ScoutLink|Concepts|SqlStyle|Sql Style}}
+
* {{ScoutLink|Concepts|Server Plug-In|Server Plug-In}}
+
* {{ScoutLink|HowTo|Write_a_jdbc_connection_bundle|How To write a JDBC connection bundle}}
+

Latest revision as of 05:26, 14 March 2024

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

Back to the top