Skip to content

Step documentation for DatabaseQuery

Execute query

Executes a query against a database

Sentences

Type Language Sentence
Given en I execute the ([a-zA-Z]+) query '(.*)'
Given nl ik de ([a-zA-Z]+) query '(.*)' uitvoer
When en I execute the following ([a-zA-Z]+) query:
When nl ik de volgende ([a-zA-Z]+) query uitvoer:

Arguments

Parameter Datatype Description
queryLanguageName String The query language used (SQL|MDX)
queryText String The query to be executed

Examples

Given I execute the SQL query 'Select 1 as ExampleColumn'
Gegeven ik de SQL query 'Select 1 as ExampleColumn' uitvoer
When I execute the following SQL query:
    """
    Select 1 as ExampleColumn
    """
Als ik de volgende SQL query uitvoer:
    """
    Select 1 as ExampleColumn
    """

Execute query from file

Executes queries from a file against a database

Sentences

Type Language Sentence
Given en I execute the ([a-zA-Z]+) query file '(.*)'
Given nl ik het ([a-zA-Z]+) query bestand '(.*)' uitvoer

Arguments

Parameter Datatype Description
queryLanguageName String The query language used (SQL|MDX)
filePath String The file containing the query to be executed

Examples

Given I execute the SQL query file '.\DatabaseSteps\SupportFiles\testQueryFile.sql'
Gegeven ik het SQL query bestand '.\DatabaseSteps\SupportFiles\testQueryFile.sql' uitvoer