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/SqlStyle"

m (Category changed)
(Replaced content with "The Scout documentation has been moved to https://eclipsescout.github.io/.")
 
Line 1: Line 1:
{{ScoutPage|cat=Server}}
+
The Scout documentation has been moved to https://eclipsescout.github.io/.
 
+
SqlStyle is a Scout concept used to have SQL code that is independent from the database engine.
+
 
+
{{ScoutJavadoc|AbstractSqlStyle|C}}
+
 
+
==Description==
+
{{Note|TODO|Add a description}}
+
 
+
=== Test connection ===
+
Eclipse Scout needs to check if the database is available or not. There is no simple SQL statement that works on every database engine. That is the reason why this is delegated the SQL Style method <code>testConnection(Connection conn)</code>
+
 
+
For Derby:
+
<source lang="SQL">
+
SELECT 1 FROM SYSIBM.SYSDUMMY1
+
</source>
+
 
+
For MySql, Oracle:
+
<source lang="sql">
+
SELECT 1 FROM DUAL
+
</source>
+
 
+
For Microsoft :
+
<source lang="sql">
+
SELECT count(1) FROM dbo.sysobjects
+
</source>
+
 
+
 
+
== Included SqlStyle ==
+
Eclipse Scout is shipped with some SqlStyles:
+
* DB2SqlStyle
+
* DerbySqlStyle
+
* MSSQLSqlStyle
+
* OracleSqlStyle
+
 
+
 
+
== See also ==
+
* {{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