WSO2 SP allows you to perform CUD operations (i.e., inserting updating and deleting data) and retrieval queries for multiple normalized tables within a single data store. This is supported via the siddhi-store-rdbms extension.
Performing CUD operations for multiple tables
In order to perform CUD operations, the system parameter named
perform.CUD.operations needs to be set to
true in deployment.yaml file.
The syntax for a Siddhi query to perform a CUD operation in multiple tables is as follows:
e.g., If you need to change the details of a customer in customer details table connected to a datasource named,
SAMPLE_DB a Siddhi query can be written as follows:
Retrieving data from multiple tables
In order to retrieve information from multiple tables in a data store, the syntax is as follows:
e.g., If you need to find matching records in both customer and orders table based on orderId and customerId in the SAMPLE_DB database, a Siddhi query can be written as follows: