Skip to main content
Jump to: navigation, search

Scout/Concepts/Sql Service

< Scout‎ | Concepts
Revision as of 03:42, 23 October 2011 by Dev.jmini.fr (Talk | contribs) (New page: {{ScoutPage|cat=Concepts}} The SqlService provides access to a database. * implements {{ScoutJavadoc|ISqlService|I}} * extends {{ScoutJavadoc|AbstractSqlService|C}} ==Description== {{No...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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

Copyright © Eclipse Foundation, Inc. All Rights Reserved.