Wie können wir Ihnen helfen?
< Zurück
Drucken

ClientQuery

A ClientQuery offers the possibility

  • to generate data on the client side or
  • to process data records from incoming nodes or
  • to connect data from queries with constant iterations.

The ClientQuery is based on an in-memory SQLite database (Version 3.38.5). The data records from the incoming nodes are stored in tables for this purpose.

 

Attributes:

AttributeRequiredDescription
IdYesUnique Id in the query tree
DependsOnNoOptional dependency on on or more query nodes. These are provided with their Id as name as SQLite table.
ConstantIterationsNoIdentifier for constant iterations
ParametersNoOptional "named" SQLite Parameter. Only the variant with the colon is supported.
StatementYesSQLite query
ResultFilters NoList of result processing

 

Select Syntax as Graph

 

Examples

Example 1 – Date Calculation:

--- !ClientQuery
Id: Dates
Statement: Select
    date('now') as Today,
    date('now', 'start of month', '+1 month', '-1 day') as LastOfMonth

Result:

TodayLastOfMonth
2022-12-222022-12-31

 

Example 2 – Parameter:

--- !ClientQuery
Id: Parameter
Parameters:
   Foo: Bar
Statement: Select :Foo as Name

Result:

Name
Bar

 

Beispiel 3 – Fill constant iterations with the current date:

In this example, the test case has 4 variables: Var1, Var2, Var3 and Date.
Var1, Var2 and Var3 are filled using constant iterations. The result column Date is to be filled with the current date.

Data of the existing constant iterations:

DateVar1Var2Var3
2023-12-31xxxxxx
2023-12-31yyyyyy
2023-12-31zzzzzz

 

--- !ClientQuery
Id: Root
ConstantIterations: Iterations
Statement: Select date() as Date, 
                  Var1, Var2, Var3 from Iterations

Ergebnis:

DateVar1Var2Var3
2024-06-04xxxxxx
2024-06-04yyyyyy
2024-06-04zzzzzz

 

For further SQLite features see also: SQLite additional features

Inhaltsverzeichnis