## Preface

This document describes the functionality provided by the database plugin.

See the Deployit Reference Manual for background information on Deployit and deployment concepts.

## Overview

The database plugin is a Deployit plugin that supports deployment of SQL files and folders to a database client.

### Features

- Runs on Deployit 3.6 and up.
- Supports deployment to MySQL, Oracle, MS SQL and DB/2.
- Deploys and undeploys SQL files and folders.

## Requirements

- Deployit requirements

  - Deployit: version 3.9+
  - Other Deployit Plugins: None

- Infrastructural requirements

  - User credentials for accessing the database client executables on the host running the database.

## Plugin Concepts

### SQL Scripts

The SqlScripts CI encompasses a folder containing SQL scripts that are to be executed on a database. SQL scripts come in two flavors, namely installation scripts and rollback scripts. Installation scripts are used to execute changes on the database, such as creation of a table or inserting data. Each installation script is associated with a rollback script which undoes the actions performed by it's companion installation script. Rollback scripts must have the exact same name as the installation script they are associated with and have the moniker `-rollback` attached to it. Executing an installation script followed by the accompanying rollback script should leave the database in an unchanged state.

SQL scripts are ordered lexicographically based on their filename. This is an example of ordering of several installation scripts:

- 1-create-user-table.sql
- 1-create-user-table-rollback.sql
- 10-drop-user-index.sql
- 10-drop-user-index-rollback.sql
- 2-insert-user.sql
- 2-insert-user-rollback.sql
- ...
- 9-create-user-index.sql
- 9-create-user-index-rollback.sql

Note that in this example, the tenth script, 10-drop-user-index.sql would be incorrectly executed after the first script, 1-create-user-table.sql.

When upgrading a SqlScripts CI, only those scripts that were not present in the previous package version are executed. For example, if the previous SqlScripts folder contained script1.sql and script2.sql, and the new version of SqlScripts folder contains script2.sql and script3.sql, then only script3.sql will be executed as part of the upgrade.

When undeploying a SqlScripts CI, all rollback scripts are executed in reverse lexicographical order.

Additionally, since Deployit 3.9.3, scripts whose content has been modified are also executed. The old behaviour, where only the names of the scripts were taken into consideration, can be re-enabled by setting the hidden property `sql.ExecutedSqlScripts.executeModifiedScripts` is to `false`. If a rollback script is provided for that script, it will be run before the new script is run. This behaviour can be disabled by setting the hidden property `sql.ExecutedSqlScripts.executeRollbackForModifiedScripts` to `false`.

### Dependencies

It is also possible to include dependencies together with the SQL scripts. Dependencies are included in the package using sub-folders. Sub-folders that have the same name as the script (without the file extension) are uploaded with the scripts in the sub-folder along with the main script to the target machine. The main script can then execute the dependent scripts in the same connection.

Common dependencies can be included in a sub-folder called `common` and will be available to all scripts.

Take this folder with Oracle scripts as an example:

    mysqlfolder
    |
    |__ 01-CreateTable.sql
    |
    |__ 02-CreateUser.sql
    |
    |__ 02-CreateUser
    |   |
    |   |__ create_admin_users.sql
    |   |
    |   |__ create_power_users.sql
    |
    |__ common
        |
        |__ some_other_util.sql
        |
        |__ some_resource.properties

The `02-CreateUser.sql` script can use it's dependencies or common dependencies as follows:

    --
    -- 02-CreateUser.sql
    --

    INSERT INTO person2 (id, firstname, lastname) VALUES (1, 'xebialabs1', 'user1');
    -- Execute a common dependency
    @some_other_util.sql
    -- Execute script-specific dependency: Create Admin Users
    @create_admin_users.sql
    -- Execute script-specific dependency: Create Power Users
    @create_power_users.sql
    COMMIT;

### SQL Client

The SqlClient CIs are containers to which SqlScripts can be deployed. The plugin ships with SqlClient for the following databases:

- MySQL
- Oracle
- MS SQL
- DB/2

When SQL scripts are deployed to an SQL client, each script to be executed is run against the SQL client in turn. The SQL client can be configured with a username and password that is used to connect to the database. The credentials can be overridden on each SQL script if required.

## Usage in Deployment Packages

The following is a manifest snippet that shows how SQL file and folder CIs can be included in a deployment package. The SQL scripts CI refers to a folder, sql, in the deployment package.

    <udm.DeploymentPackage version="2.0" application="PetClinic-ear">
        <jee.Ear name="PetClinic" file="PetClinic-2.0.ear"/>
        <sql.SqlScripts name="sql" file="sql" />
    </udm.DeploymentPackage>

## Using the deployables and deployeds

The following table describes which deployable/container combinations are possible.

### Deployable vs. Container table

Deployable | Container | Generated deployed
--- | --- | ---
sql.SqlScripts | sql.OracleClient, sql.MySqlClient, sql.Db2Client | sql.ExecutedSqlScripts

The following table describes the effect a deployed has on it's container.

### Deployed Actions Table

Deployed | Actions performed for operations
--- | ---
| Create | Destroy | Modify
sql.ExecutedSqlScripts | For each installation script in the folder (ordered lexicographically by name, ascending): Run script through template engine Copy script to container Execute script | For each rollback script in the folder (ordered lexicographically by name, descending): Run script through template engine Copy script to container Execute script | For each installation script in the folder that was not part of the deployment being upgraded (ordered lexicographically by name, ascending): Run script through template engine Copy script to container Execute script

# CI Reference

## Configuration Item Overview

### Deployables

### Deployeds

### Containers

### Other Configuration Items

## Configuration Item Details

### sql.Db2Client

Type Hierarchy | sql.SqlClient >> generic.Container >> generic.BaseGenericContainer >> udm.BaseContainer >> udm.BaseConfigurationItem
Interfaces | udm.Taggable, udm.ConfigurationItem, udm.Container, generic.GenericContainer, overthere.HostContainer

IBM DB2 client

|  | Parent
--- | --- | ---
|  | host : CI<overthere.Host>
|  | Host upon which the container resides

|  | Public Properties
--- | --- | ---
|  | databaseName : STRING
|  | The name of the DB2 database to connect to
|  | db2Home : STRING
|  | The directory that contains the DB2 installation
|  | envVars : MAP_STRING_STRING
|  | Environment variables for container
|  | password : STRING
|  | If set, the password to use if none is set on the deployed sql.ExecutedSqlScripts
|  | stopStartRestartConnection : CI<overthere.Host>
|  | If set, the connection settings to use to connect to the target system to execute start, stop, restart etc. operations for the container.
|  | tags : SET_OF_STRING
|  | If set, only deployables with the same tag will be automatically mapped to this container.
|  | username : STRING
|  | If set, the user name to use if none is set on the deployed sql.ExecutedSqlScripts

|  | Hidden Properties
--- | --- | ---
|  | clientWrapperScript : STRING = sql/Db2Client
|  | The OS-specific wrapper script that calls the SQL client
|  | restartOrder : INTEGER = 90
|  | The order of the restart container step in the step list.
|  | restartWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container restart action.
|  | startOrder : INTEGER = 90
|  | The order of the start container step in the step list.
|  | startWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container start action.
|  | stopOrder : INTEGER = 10
|  | The order of the stop container step in the step list.
|  | stopWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container stop action.
|  | inspectClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the inspect script.
|  | inspectScript : STRING
|  | Classpath to the script used to inspect the generic container.
|  | inspectTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the inspect script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | restartClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the restart script.
|  | restartScript : STRING
|  | Classpath to the script used to restart the generic container.
|  | restartTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the restart script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | startClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the start script.
|  | startScript : STRING
|  | Classpath to the script used to start the generic container.
|  | startTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the start script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | stopClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the stop script.
|  | stopScript : STRING
|  | Classpath to the script used to stop the generic container.
|  | stopTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the stop script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.

### sql.ExecutedSqlScripts

Type Hierarchy | generic.ExecutedFolder >> generic.AbstractDeployed >> udm.BaseDeployed >> udm.BaseConfigurationItem
Interfaces | udm.EmbeddedDeployedContainer, udm.Artifact, udm.Deployed, udm.ConfigurationItem, udm.DerivedArtifact

SQL scripts executed on an SQL client

|  | Parent
--- | --- | ---
|  | container : CI<udm.Container>
|  | The container on which this deployed runs.

|  | Public Properties
--- | --- | ---
|  | deployable : CI<udm.Deployable>
|  | The deployable that this deployed is derived from.
|  | password : STRING
|  | If set, the password to use. Falls back to the optional default password set on the sql.SqlClient container
|  | placeholders : MAP_STRING_STRING
|  | A key/value pair mapping of placeholders in the deployed artifact to their values. Special values are and
|  | username : STRING
|  | If set, the user name to use. Falls back to the optional default user name set on the sql.SqlClient container

|  | Hidden Properties
--- | --- | ---
|  | commonScriptFolderName : STRING = common
|  | Common folder that should be uploaded to the working directory.
|  | createOptions : SET_OF_STRING = [uploadArtifactData, uploadClasspathResources, uploadTemplateClasspathResources]
|  | Options for the create step (1 or more of: none,uploadArtifactData,uploadClasspathResources,uploadTemplateClasspathResources).
|  | createOrder : INTEGER = 50
|  | The order of the step in the step list for the create operation.
|  | createVerb : STRING = Run
|  | Create Verb
|  | destroyOptions : SET_OF_STRING = [uploadArtifactData, uploadClasspathResources, uploadTemplateClasspathResources]
|  | Options for the destroy step (1 or more of: none,uploadArtifactData,uploadClasspathResources,uploadTemplateClasspathResources).
|  | destroyOrder : INTEGER = 40
|  | The order of the step in the step list for the destroy operation.
|  | destroyVerb : STRING = Rollback
|  | Destroy Verb
|  | executorScript : STRING = ${deployed.container.clientWrapperScript}
|  | Name of the executor script that will be executed for each script found in the folder.
|  | modifyOptions : SET_OF_STRING = [uploadArtifactData, uploadClasspathResources, uploadTemplateClasspathResources]
|  | Options for the modify step (1 or more of: none,uploadArtifactData,uploadClasspathResources,uploadTemplateClasspathResources).
|  | modifyOrder : INTEGER = 50
|  | The order of the step in the step list for the modify operation.
|  | modifyVerb : STRING = Modify
|  | Modify Verb
|  | noopOptions : SET_OF_STRING = [uploadArtifactData, uploadClasspathResources, uploadTemplateClasspathResources]
|  | Options for the noop step (1 or more of: none,uploadArtifactData,uploadClasspathResources,uploadTemplateClasspathResources).
|  | noopOrder : INTEGER = 50
|  | The order of the step in the step list for the noop operation.
|  | noopVerb : STRING = Modify
|  | Noop Verb
|  | rollbackScriptPostfix : STRING = -rollback.sql
|  | A script's associated rollback script is derived by using the 1st group identified by the scriptRecognitionRegex and then appending this postfix to it. e.g give name '01-myscript.sql', regex '([0-9]*-.*)\.sql' and rollback script postfix '-rollback.sql', we can derive the name of the associated rollback script to be '01-myscript-rollback.sql'
|  | rollbackScriptRecognitionRegex : STRING = [0-9]*-(.*)-rollback\.sql
|  | Regular expression used to identify a rollback script in the folder. A successful match should returns a single group, ie the logical script name. e.g. [0-9]*-.*-rollback\.sql
|  | scriptRecognitionRegex : STRING = (?!.*-rollback\.sql)([0-9]*-.*)\.sql
|  | Regular expression used to identify a script in the folder. A successful match should returns a single group to which the rollbackScriptPostfix can be appended in order to find the associated rollback script or the script's dependent subfolder. e.g.([0-9]*-.*)\.sql
|  | checkpointAfterFirstScript : BOOLEAN = true
|  | If set to true, the checkpoint is set after the first script in a folder has been executed. Otherwise the checkpoint is set after the last script in a folder has been executed.
|  | classpathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the script.
|  | executeModifiedScripts : BOOLEAN = true
|  | If set to true, modified scripts are also executed on a MODIFY or a NOOP.
|  | executeRollbackForModifiedScripts : BOOLEAN = true
|  | If set to true, rollback scripts for modified scripts are also executed on a MODIFY or a NOOP.
|  | inspectClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the inspect script.
|  | inspectScript : STRING
|  | Classpath to the script used to inspect the generic container.
|  | inspectTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the inspect script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | restartRequired : BOOLEAN = false
|  | The generic container requires a restart for the action performed by this deployed.
|  | restartRequiredForNoop : BOOLEAN = false
|  | The generic container requires a restart for the NOOP action performed by this deployed.
|  | templateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.

### sql.MsSqlClient

Type Hierarchy | sql.SqlClient >> generic.Container >> generic.BaseGenericContainer >> udm.BaseContainer >> udm.BaseConfigurationItem
Interfaces | udm.Taggable, udm.ConfigurationItem, udm.Container, generic.GenericContainer, overthere.HostContainer

Microsoft SQL Server client

|  | Parent
--- | --- | ---
|  | host : CI<overthere.Host>
|  | Host upon which the container resides

|  | Public Properties
--- | --- | ---
|  | serverName : STRING
|  | The name of the MS SQL Server to connect to
|  | additionalOptions : STRING
|  | Any additional options that need to be passed when connecting to the MS SQL Server.
|  | databaseName : STRING
|  | The name of the MS SQL database to connect to
|  | envVars : MAP_STRING_STRING
|  | Environment variables for container
|  | password : STRING
|  | If set, the password to use if none is set on the deployed sql.ExecutedSqlScripts
|  | stopStartRestartConnection : CI<overthere.Host>
|  | If set, the connection settings to use to connect to the target system to execute start, stop, restart etc. operations for the container.
|  | tags : SET_OF_STRING
|  | If set, only deployables with the same tag will be automatically mapped to this container.
|  | username : STRING
|  | If set, the user name to use if none is set on the deployed sql.ExecutedSqlScripts

|  | Hidden Properties
--- | --- | ---
|  | clientWrapperScript : STRING = sql/MsSqlClient
|  | The OS-specific wrapper script that calls the SQL client
|  | restartOrder : INTEGER = 90
|  | The order of the restart container step in the step list.
|  | restartWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container restart action.
|  | startOrder : INTEGER = 90
|  | The order of the start container step in the step list.
|  | startWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container start action.
|  | stopOrder : INTEGER = 10
|  | The order of the stop container step in the step list.
|  | stopWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container stop action.
|  | inspectClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the inspect script.
|  | inspectScript : STRING
|  | Classpath to the script used to inspect the generic container.
|  | inspectTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the inspect script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | restartClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the restart script.
|  | restartScript : STRING
|  | Classpath to the script used to restart the generic container.
|  | restartTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the restart script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | startClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the start script.
|  | startScript : STRING
|  | Classpath to the script used to start the generic container.
|  | startTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the start script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | stopClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the stop script.
|  | stopScript : STRING
|  | Classpath to the script used to stop the generic container.
|  | stopTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the stop script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.

### sql.MySqlClient

Type Hierarchy | sql.SqlClient >> generic.Container >> generic.BaseGenericContainer >> udm.BaseContainer >> udm.BaseConfigurationItem
Interfaces | udm.Taggable, udm.ConfigurationItem, udm.Container, generic.GenericContainer, overthere.HostContainer

MySQL client

|  | Parent
--- | --- | ---
|  | host : CI<overthere.Host>
|  | Host upon which the container resides

|  | Public Properties
--- | --- | ---
|  | databaseName : STRING
|  | The name of the MySQL database to connect to
|  | mySqlHome : STRING
|  | The directory that contains the MySQL installation
|  | envVars : MAP_STRING_STRING
|  | Environment variables for container
|  | password : STRING
|  | If set, the password to use if none is set on the deployed sql.ExecutedSqlScripts
|  | stopStartRestartConnection : CI<overthere.Host>
|  | If set, the connection settings to use to connect to the target system to execute start, stop, restart etc. operations for the container.
|  | tags : SET_OF_STRING
|  | If set, only deployables with the same tag will be automatically mapped to this container.
|  | username : STRING
|  | If set, the user name to use if none is set on the deployed sql.ExecutedSqlScripts

|  | Hidden Properties
--- | --- | ---
|  | clientWrapperScript : STRING = sql/MySqlClient
|  | The OS-specific wrapper script that calls the SQL client
|  | restartOrder : INTEGER = 90
|  | The order of the restart container step in the step list.
|  | restartWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container restart action.
|  | startOrder : INTEGER = 90
|  | The order of the start container step in the step list.
|  | startWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container start action.
|  | stopOrder : INTEGER = 10
|  | The order of the stop container step in the step list.
|  | stopWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container stop action.
|  | inspectClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the inspect script.
|  | inspectScript : STRING
|  | Classpath to the script used to inspect the generic container.
|  | inspectTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the inspect script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | restartClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the restart script.
|  | restartScript : STRING
|  | Classpath to the script used to restart the generic container.
|  | restartTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the restart script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | startClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the start script.
|  | startScript : STRING
|  | Classpath to the script used to start the generic container.
|  | startTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the start script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | stopClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the stop script.
|  | stopScript : STRING
|  | Classpath to the script used to stop the generic container.
|  | stopTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the stop script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.

### sql.OracleClient

Type Hierarchy | sql.SqlClient >> generic.Container >> generic.BaseGenericContainer >> udm.BaseContainer >> udm.BaseConfigurationItem
Interfaces | udm.Taggable, udm.ConfigurationItem, udm.Container, generic.GenericContainer, overthere.HostContainer

Oracle SQL*Plus client

|  | Parent
--- | --- | ---
|  | host : CI<overthere.Host>
|  | Host upon which the container resides

|  | Public Properties
--- | --- | ---
|  | oraHome : STRING
|  | The directory that contains the Oracle installation
|  | sid : STRING
|  | The Oracle SID to connect to
|  | envVars : MAP_STRING_STRING
|  | Environment variables for container
|  | password : STRING
|  | If set, the password to use if none is set on the deployed sql.ExecutedSqlScripts
|  | stopStartRestartConnection : CI<overthere.Host>
|  | If set, the connection settings to use to connect to the target system to execute start, stop, restart etc. operations for the container.
|  | tags : SET_OF_STRING
|  | If set, only deployables with the same tag will be automatically mapped to this container.
|  | username : STRING
|  | If set, the user name to use if none is set on the deployed sql.ExecutedSqlScripts

|  | Hidden Properties
--- | --- | ---
|  | clientWrapperScript : STRING = sql/OracleClient
|  | The OS-specific wrapper script that calls the SQL client
|  | restartOrder : INTEGER = 90
|  | The order of the restart container step in the step list.
|  | restartWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container restart action.
|  | startOrder : INTEGER = 90
|  | The order of the start container step in the step list.
|  | startWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container start action.
|  | stopOrder : INTEGER = 10
|  | The order of the stop container step in the step list.
|  | stopWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container stop action.
|  | inspectClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the inspect script.
|  | inspectScript : STRING
|  | Classpath to the script used to inspect the generic container.
|  | inspectTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the inspect script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | restartClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the restart script.
|  | restartScript : STRING
|  | Classpath to the script used to restart the generic container.
|  | restartTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the restart script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | startClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the start script.
|  | startScript : STRING
|  | Classpath to the script used to start the generic container.
|  | startTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the start script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | stopClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the stop script.
|  | stopScript : STRING
|  | Classpath to the script used to stop the generic container.
|  | stopTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the stop script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.

### sql.SqlClient

Virtual Type
Type Hierarchy | generic.Container >> generic.BaseGenericContainer >> udm.BaseContainer >> udm.BaseConfigurationItem
Interfaces | udm.Taggable, udm.ConfigurationItem, generic.GenericContainer, udm.Container, overthere.HostContainer

Generic SQL client

|  | Parent
--- | --- | ---
|  | host : CI<overthere.Host>
|  | Host upon which the container resides

|  | Public Properties
--- | --- | ---
|  | clientWrapperScript : STRING
|  | The OS-specific wrapper script that calls the SQL client
|  | envVars : MAP_STRING_STRING
|  | Environment variables for container
|  | password : STRING
|  | If set, the password to use if none is set on the deployed sql.ExecutedSqlScripts
|  | stopStartRestartConnection : CI<overthere.Host>
|  | If set, the connection settings to use to connect to the target system to execute start, stop, restart etc. operations for the container.
|  | tags : SET_OF_STRING
|  | If set, only deployables with the same tag will be automatically mapped to this container.
|  | username : STRING
|  | If set, the user name to use if none is set on the deployed sql.ExecutedSqlScripts

|  | Hidden Properties
--- | --- | ---
|  | restartOrder : INTEGER = 90
|  | The order of the restart container step in the step list.
|  | startOrder : INTEGER = 90
|  | The order of the start container step in the step list.
|  | startWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container start action.
|  | stopOrder : INTEGER = 10
|  | The order of the stop container step in the step list.
|  | stopWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container stop action.
|  | inspectClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the inspect script.
|  | inspectScript : STRING
|  | Classpath to the script used to inspect the generic container.
|  | inspectTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the inspect script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | restartClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the restart script.
|  | restartScript : STRING
|  | Classpath to the script used to restart the generic container.
|  | restartTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the restart script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | restartWaitTime : INTEGER = 0
|  | The time to wait in seconds for a container restart action.
|  | startClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the start script.
|  | startScript : STRING
|  | Classpath to the script used to start the generic container.
|  | startTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the start script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.
|  | stopClasspathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the stop script.
|  | stopScript : STRING
|  | Classpath to the script used to stop the generic container.
|  | stopTemplateClasspathResources : SET_OF_STRING
|  | Additional template classpath resources that should be uploaded to the working directory before executing the stop script.The template is first rendered and the rendered content copied to a file, with the same name as the template, in the working directory.

### sql.SqlScripts

Type Hierarchy | generic.Folder >> udm.BaseDeployableFolderArtifact >> udm.BaseDeployableArtifact >> udm.BaseDeployable >> udm.BaseConfigurationItem
Interfaces | udm.Taggable, udm.Deployable, udm.SourceArtifact, udm.Artifact, udm.DeployableArtifact, udm.ConfigurationItem, udm.FolderArtifact

Folder containing SQL scripts

|  | Public Properties
--- | --- | ---
|  | checksum : STRING
|  | The checksum used to detect differences on the artifact. If not provided, it will be calculated by Deployit.
|  | excludeFileNamesRegex : STRING
|  | Regular expression that matches file names that must be excluded from scanning
|  | password : STRING
|  | The password to connect to the database
|  | placeholders : SET_OF_STRING
|  | Placeholders detected in this artifact
|  | scanPlaceholders : BOOLEAN = true
|  | Whether to scan this artifact for placeholders when it is imported
|  | tags : SET_OF_STRING
|  | If set, this deployable will only be mapped automatically to containers with the same tag.
|  | username : STRING
|  | `The username to connect to the database

|  | Hidden Properties
--- | --- | ---
|  | textFileNamesRegex : STRING = .+\.(cfg | conf | config | ini | properties | props | txt | asp | aspx | htm | html | jsf | jsp | xht | xhtml | sql | xml | xsd | xsl | xslt)
|  | Regular expression that matches file names of text files
|  | delimiters : STRING = {{ }}
|  | The delimiters used indicate placeholders, defaults to '{{ }}'. This is a 5 character string with a space in the middle, the first two are the leading delimiter, the last two are the closing delimiter
|  | fileEncodings : MAP_STRING_STRING = {.+\.properties=ISO-8859-1}
|  | A map that maps regular expressions matching the full path of file(s) in the artifact to character set encodings