Page History
Info | ||
---|---|---|
This page explains the SQL Adapter in Bridge context. If you were looking for the same information regarding the PAS Designer, refer to SQL Adapter in the Designer guide. | ||
Version | ||
| ||
Added in Builder 6.0 |
The following figure shows a component diagram that features an SQLLite database. The database type and name are given as tagged values (dbType and dbConnectionString). More details are found in section Refer to Database Server-Specific Notes for SQL Adapters for more details.
Figure: SQL Component Diagram Showing Connection Options
...
The <<SQLAlias>> Employee connects the xUML service with the sql database. Each <<SQLAdapter>> referencing the same <<Alias>> alias connects to the same database. The options of this these database connections are given as tagged values on the dependency to the database artifactalias :
Multiexcerpt include | |||||
---|---|---|---|---|---|
|
...
Version | ||
---|---|---|
| ||
|
...
title | Click here to read the documentation of the sql deployment used in E2E Builder releases before 6.0 .. |
---|
The following figure shows a component diagram that features an SQLServer database. The database type is given as <<SQLService>> component name (SQLServer), the database name is the name of the <<SQLDatabase>> interface (SQLEXPRESS). The artifact manifesting the <<SQLDatabase>> interface may hold a connection string. In this example, the Bridge connects to the testhost\SQLEXPRESS@DCS database. The syntax of this expression depends on the database type. More details are found in section Database Server-Specific Notes for SQL Adapters .
Figure: SQL Component Diagram Showing Connection Options
The <<SQLAdapterDependency>> connecting the configuration artifact with the <<SQLDatabase>> interface uses an <<Alias>> artifact (TEST). Each <<SQLAdapter>> referencing the same <<Alias>> artifact connects to the same database. The options of this database connections are given as tagged values on the dependency to the database artifact:
Tagged Value | Description | |||||
---|---|---|---|---|---|---|
user | DB user. Optional the password can be given after a '/'. However, this is recommended for development purposes only. | |||||
maxConnectionReuse | This tagged value controls the SQL connection pooling. For instance, if you set a value of 100, all 99 database requests after the first one will reuse the connection. You save the time to make a new connection. For the 101. request, a new connection will be done. The pooling is switched off if maxConnectionReuse is set to 0 (default). Value -1 means the connection will be reused forever. In this case you should define reasonable values for maxConnectionAge or maxConnectionIdleTime (see below).
| |||||
maxConnectionAge | After a given connection age the connection will be closed and removed from the pool. | |||||
maxConnectionIdleTime | Connections not used for maxConnectionIdleTime will be closed and removed from the pool. | |||||
schema | String that prefixes tables and stored procedures. For example, if schema is set to S1, all tables accessing the current DB are prefixed by S1. | |||||
tableQualifier | String that prefixes tables. For example, if tableQualifier is set to TQ1, all tables accessing the current DB are prefixed by TQ1. If schema and table qualifier are given, all tables will become: <schema>.<tableQualifier>.<tableName>. | |||||
options | This tagged value can hold a comma separated list of <name>=<value> pairs. These list elements are interpreted as native options. The possible name-value pairs depend on the database type. A comprehensive list can be found at http://www.sqlapi.com/ServerSpecific/index.html |
Any database uses a charset to encode Strings. If the database uses UNICODE charsets (UTF-8, UTF-16, UTF-32), encoding is handled automatically. If the database is not UNICODE compliant, the Bridge assumes 7-bit ASCII by default. However, in many cases it necessary to define the charset explicitly. This is done by the tagged value charset as shown below. The charset needs to be the same as defined at the database settings. All possible charset definitions are listed in section Charset Definitions .
Figure: Tagged Value Charset of a SQL Service Artifact
...