Skip to main content
Jump to: navigation, search

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

(New page: {{ScoutPage|cat=Concepts}} The SqlService provides access to a database. * implements {{ScoutJavadoc|ISqlService|I}} * extends {{ScoutJavadoc|AbstractSqlService|C}} ==Description== {{No...)
 
m (Category changed)
Line 1: Line 1:
{{ScoutPage|cat=Concepts}}
+
{{ScoutPage|cat=Server}}
  
 
The SqlService provides access to a database.
 
The SqlService provides access to a database.

Revision as of 11:14, 3 November 2011


Scout
Wiki Home
Website
DownloadGit
Community
ForumsBlogTwitterG+
Bugzilla
Bugzilla


The SqlService provides access to a database.

  • implements I obj.pngISqlService
  • extends C obj.pngAbstractSqlService

Description

Note.png
TODO
Add a description


Minimal configuration

To be able to connect to a database, these properties needs to be configured:

  • JdbcDriverName the qualified name of the JDBC driver.
  • JdbcMappingName the JDBC path "jdbc:...".
  • Username the user name to connect to the database.
  • Password the password to connect to the database.
  • SqlStyle provides the class of the Sql Style that should be used.


SQL convenience class

Scout proposes a convenience singleton class to access the default SqlService: C obj.pngSQL

Here a simple example:

    SQL.update(
        " update      actor " +
        " set         first_name = :firstName," +
        "             last_name = :lastName " +
        " where       actor_id = :id ",
        formData
        );

See also

Back to the top