[Download] | [Documentation Home] | [Release Note]

Nested Query Sample

Introduction

When using a data service query, we may need to use the result of one query to be used as an input parameter of another query, in that situation we use the nested query feature which is available inWSO2 Data Services Server.

Prerequisites

The sample data service "NestedQuerySample" should be deployed as per the instructions mentioned in Deploying Samples section.

Running the Sample

The sample service can be run using the "tryit" tool, which is bundled withWSO2 Data Services Server.

Service Definition

The service contains the following queries.

Sample Run

A sample run of the service using the "tryit" tool is shown below.



Figure 1: Nested query based operation invocation using the "listOfficesSQL" query.





Figure 2: Nested query based operation invocation using the "customerOrdersSQL" query.