Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WDESIGNER and version 24.0
Div
Classe2e-refDiv

Otp
Floatingfalse

Rp

Stereotype Attributes

SQL Alias

Multiexcerpt
MultiExcerptNamesql_alias
AttributeDescriptionAllowed Values / Examples
NameSpecify a name for the alias.any string

Standard

Anchor
sql_standard
sql_standard

userSpecify the database user. Optionally, the password can be given after a '/', however, this is recommended for development purposes only.

db_user/db_password

dbTypeType of the database.Oracle, SQLServer, InterBase, SQLBase, ODBC, DB2, Informix, Sybase, MySQL, PostgreSQL, SQLite, DBTypeVariable
optionsThis attribute 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 https://www.sqlapi.com/ApiDoc/servers/

SSPROP_INIT_ENCRYPT=VARIANT_TRUE

Anchor
dbTypeVariable
dbTypeVariable
dbTypeVariable

If the attribute dbType is set to DBTypeValue, the dbTypeVariable attribute is used to define the type of the database. The dbType then can be defined by a setting variable.
This is to handle the case, that you not want to hard code the  dbType , but to configure it at runtime via the PAS integration component (Bridge).
See Bridge Guide > Using Global Setting Variables.

Info
iconfalse

Use one of the listed dbTypes in the settings variable. If you configure an unknown dbType via the PAS integration component (Bridge), the xUML Runtime will throw an error on service startup.

Any global setting variable from the PAS integration component (Bridge):

{{my_setting_variable}}

Advanced
tableQualifier

Specify a string that prefixes tables. For example, if tableQualifier is set to TQ1, all tables accessing the current database are prefixed by "TQ1", e.g. TQ1Customers. If schema and table qualifier are both given, all tables will become: <schema>.<tableQualifier><tableName>.

Multiexcerpt
MultiExcerptNametable_hint
Info
iconfalse

This works only if the tables are marked using the TABLE:: keyword, e.g TABLE::Customers in SQL statements. If you do not prefix the table name by TABLE::, the table name is used as it is.


schema

Specify a string that prefixes tables and stored procedures. For example, if schema is set to S1, all tables accessing the current database are prefixed by "S1.".

Multiexcerpt include
MultiExcerptNametable_hint
PageWithExcerptSQL

charsetAny database uses a charset to encode strings. If the database uses UNICODE charsets (like UTF-8, UTF-16, UTF-32), encoding is handled automatically. If the database is not UNICODE compliant, the xUML Runtime assumes 7-bit ASCII by default.
However, in many cases it necessary to define the charset explicitly. This is done by the attribute charset. The charset needs to be the same as defined in the database settings. All possible charset definitions are listed in section Charset Definitions.

UTF-8

See Charset Definitions for a list of possible values.

timezone

Specify a valid time zone or the value local, which uses the time zone of the xUML service. See Time Zones for a list of possible values. If timezone does not contain any content (is NULL), UTC is used.

local (default)

"Australia/Melbourne", "CET", "Etc/GMT+10"

dbConnectionStringSpecify the database connection string. The format depends on the type of the database. For more details see Database Server-Specific Notes for SQL Adapters.
transactionIsolationLevel

Specify here the required transaction isolation level of the SQL connection according to SQL-92 standard. Refer to Wikipedia for a detailed description of the available isolation levels.

Info
iconfalse

Please note:

  • that not all databases support all levels. In this case a database-specific mapping will occur.
  • that for persistent state databases no other than <UNSPECIFIED> and DBMS default are allowed.
DBMS defaultUse the default isolation level of the connected database system (default).
Read uncommittedLowest isolation level. Dirty reads allowed,  SQL adapter may fetch not-yet-committed changes of other transactions.
Read committedLock-based concurrency control.
Repeatable readLock-based concurrency control.
SerializableHighest isolation level. Lock-based concurrency control.
unicodeMode

Specify the encoding for database access.

Info
iconfalse

We recommend to use the Platform default unless you suspect an encoding incompatibility (see Troubleshooting the SQL Adapter).

Platform default

Use the platform default mode (default). This is

  • Unicode: for Windows systems
  • non-Unicode: for all others

This option is backwards compatible to older Runtimes.

UnicodeForce Unicode mode.
non-UnicodeForce non-Unicode mode.
Pooling

maxConnectionAge

Multiexcerpt
MultiExcerptNamemaxConnectionAge

Specify a maximum connection age in minutes. After this period of time, the connection will be closed and removed from the pool.

an integer value

15

Keep the connection for 15 minutes (default).

-1

Keep the connection forever.

maxConnectionIdleTime



Multiexcerpt
MultiExcerptNamemaxConnectionIdleTime

Specify a maximum idle time in minutes. Connections not used for the time specified will be closed and removed from the pool.
This is useful for connections going through firewalls because such connections might be cut off after some time.

an integer value
60Close the connection after 60 minutes of idle time.

maxConnectionReuse

Multiexcerpt
MultiExcerptNamemaxConnectionReuse
This attribute controls how often a connection can be reused. After the connection has been reused the number of times specified with maxConnectionReuse, it will be closed and not put back into the pool.
This feature has been introduced because some databases might have problems if one connection is reused too often. Value -1 means the connection will be reused forever. In this case you should define reasonable values for maxConnectionAge or maxConnectionIdleTime (see above).
Multiexcerpt
MultiExcerptNamemaxConnectionReuse_2
Info
iconfalse

Note that a pooling defined with connectionPooling (see below) is implicitly switched off, if maxConnectionReuse is set to 0.

an integer valueThe number of connections to be pooled.
1000Allow for a pool size of 1000 connections (default).

0

Pooling is implicitly switched off.

-1Connections are pooled forever.
connectionPooling
Multiexcerpt
MultiExcerptNameconnectionPooling

This attribute controls the connection pooling. If true, each connection is put into a pool after use.

If an SQL adapter requires a connection, it is taken from the pool. If no connection is available, a new connection is being created and put into the pool after use. The time the connection is kept in the pool depends on the other pooling parameters.

trueDatabase connections are pooled (default).
falseDatabase connections are not pooled.

SQL Adapter

AttributeDescriptionAllowed Values
aliasSpecify the SQL alias resp. the database the adapter should use to establish the connection.any valid SQL alias
sql
Specify the SQL statement to be performed on the database, or specify a commit or rollback command.any valid SQL statement as a string
commitExplicitly commit the recent changes to the database.
rollbackExplicitly rollback the recent changes to the database.
dbTypeOverwrite the database type defined in the SQL alias.
action
Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNameinfo_alias_attribute_action
PageWithExcerptINTERNAL:_designer_excerpts

SQL Adapter Operations

closeHandle Operation
Anchor
close
close

Multiexcerpt
MultiExcerptNameclose_operations
  • closeHandle ( handle : SQLHandle )
Multiexcerpt
MultiExcerptNameclose
AttributeTypeDirectionDescriptionAllowed Values / Examples
handleSQLHandlein

Multiexcerpt include
MultiExcerptNamehandle
PageWithExcerptSQL


execute Operations 
Anchor
execute
execute

Multiexcerpt
MultiExcerptNameexecute_operations
  • execute ( affectedRows : Integer, result : Any, sql : String )
  • execute ( affectedRows : Integer, result : Any[], sql : String )


Multiexcerpt
MultiExcerptNameexecute
AttributeTypeDirectionDescriptionAllowed Values / Examples
sql
Stringin
Multiexcerpt
MultiExcerptNamesql

Use this parameter to provide a dynamic SQL statement.



resultAny or Array of Anyout
Multiexcerpt
MultiExcerptNameresult

Result set of the database query.
The SQL adapter tries to match the table column names with the attribute names of the output class. For information on type mapping refer to Database-Specific Mappings.

Use execute with result : Any when you expect only one row to be return, Use execute with result : Any[] when you expect multiple rows.


affectedRowsIntegerout
Multiexcerpt
MultiExcerptNameaffected_rows

This parameter returns the number of rows affected by the SQL statement.


fetchNext Operation
Anchor
fetch
fetch

Multiexcerpt
MultiExcerptNamefetch_operations
  • fetchNext ( handle : SQLHandle, result : Any )
AttributeTypeDirectionDescriptionAllowed Values / Examples
handleSQLHandlein

Multiexcerpt include
MultiExcerptNamehandle
PageWithExcerptSQL


resultAnyout

Multiexcerpt include
MultiExcerptNameresult
PageWithExcerptSQL


getHandle Operation
Anchor
get
get

Multiexcerpt
MultiExcerptNameget_operations
  • getHandle ( affectedRows : Integer, handle : SQLHandle, sql : String )
Multiexcerpt
MultiExcerptNameget
AttributeTypeDirectionDescriptionAllowed Values / Examples
sqlStringin

Multiexcerpt include
MultiExcerptNamesql
PageWithExcerptSQL


handleSQLHandleout
Multiexcerpt
MultiExcerptNamehandle

An SQL connection handle. The connection handle identifies a structure that contains connection information.


affectedRowsIntegerout

Multiexcerpt include
MultiExcerptNameaffected_rows
PageWithExcerptSQL


SQL Adapter Parameter Types

SQLHandle

NameTypeDescription
idStringID of the SQL connection handle.
Panel
titleOn this Page:
Table of Contents

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNameSQLAdapter_Example
PageWithExcerptINTERNAL:_designer_examples

Panel
titleRelated Pages: