Databases
Code completion for transaction isolation levels
Although the Citrus documentation lists the possible isolation level values in sql(<datasource>).transactionIsolationLevel(...) calls, to make discovery and usage of them simple, the levels are provided as completion items in the argument of transactionIsolationLevel(), in all Citrus DSLs (via schema in YAML).
transactionIsolationLevel()is supported in any implementation of com.consol.citrus.actions.AbstractDatabaseConnectingTestAction.Builder.
Since each item refers to the appropriate field of org.springframework.transaction.TransactionDefinition, quick documentation and navigation to the items from the completion list are also available.
NOTE: other values that are provided by other plugins or the IntelliJ platform might also appear in this completion list.

Code completion of SQL statement column names
Base on the Citrus SQL actions documentation it provides options to validate and extract data by column names from SQL SELECT statements.
To improve the lookup of available column names, including column aliases, this code completion collects those names from SELECT statements
as per the following:
| DSL | Context location | SQL source | Location of completion |
|---|---|---|---|
| Java/Groovy | ExecuteSQLAction.Builder.sql() and ExecuteSQLQueryAction.Builder.query() call chains | statement() and sqlResource(Resource) calls | validate() and extract() calls |
| XML | sql tags | sql.statements.statement tags | sql.validate@column and sql.extract@column attributes |
| Spring XML | sql tags | sql.statement and sql.resource tags | sql.validate@column and sql.extract@column attributes |
| YAML | sql properties | sql.statements.statement and sql.statements.file properties | sql.validate.column and sql.extract.column properties |
It supports the resolution of SQL code from variables, fields and SQL documents injected into String literals. Also, during the completion, users can navigate to the column itself in the original SQL document, via Ctrl/Cmd+B.

Report mixed SELECT and non-SELECT statements
This inspection reports ExecuteSqlAction.Builder.sql(), ExecuteSqlAction.Builder.sql().query(), and ExecuteSqlQueryAction.Builder.query() call chains in the Java and Groovy DSLs, when the SQL statements specified in the .statement() and .sqlResource() calls have SELECT and non SELECT type ones in a mixed manner.
The Citrus documentation states:
Do not mix statements of type SELECT with others in a single sql test action.
This will lead to errors because validation steps are not valid for statements other than SELECT. Please use separate test actions for update statements.

Report SELECT statements in the ExecuteSql action
This inspection reports ExecuteSqlAction.Builder.sql(), but not ExecuteSqlAction.Builder.sql().query(), call chains in the Java and Groovy DSLs, in which SQL SELECT statements are used. ExecuteSqlAction is designed to execute non-SELECT statements.
If you’d like to execute SELECT statements, you can use ExecuteSqlQueryAction.

Report non-SELECT statements in the ExecuteSql action
This inspection reports ExecuteSqlAction.Builder.sql().query() and ExecuteSqlQueryAction.Builder.query(), call chains in the Java DSL, in which SQL non-SELECT statements are used. ExecuteSqlQueryAction is designed to execute SELECT statements.
If you’d like to execute non-SELECT statements, you can use ExecuteSqlAction.
