Dynamic Query
Dynamic query allows the creation of SQL queries on the fly, enabling flexibility in constructing complex queries based on changing criteria, user input, or business logic. This can involve adding or removing conditions, altering select columns, or changing table names.
The advantages of dynamic queries include flexibility, as they allow applications to adapt to changing requirements, user preferences, or evolving data conditions. However, they may also introduce risks like SQL injection if not handled securely. Therefore, precautions are essential to ensure the safety and reliability of dynamically generated queries in applications.
Dynamic queries assist in resolving functionalities, such as creating a REST service for a UI table. Such a service needs to provide the possibility of using a variable number of options for ordering.
SQL
SQL should be defined and configured at runtime. The best scenario is to use pdk.core.String flow local variable.
Placeholders for variables should be enclosed by curly brackets.
Input Parameters
All input parameters are optional. System maps provided values into placeholders defined in the sql query string.
The parameter name is indicated by the text enclosed within curly brackets { }. The name should consist only of letters, digits, and underscore characters, , and must start with a letter.
Valid parameters names are:
The parameter type should be defined. Default type is: pdk.core.String
Possible types are:
pdk.core.Array<Byte> - for BLOB data type
Last updated