Hi Samith,

At the moment, we don't support returning results for a batch request
operations. because we have to aggregate the result and send them all.
therefore you won't able to get a batch request operation when there is a
result in particular operation's queries.
that's why you won't be able to see the batch operation when you enable
return generated key option.

Thanks,
Madhawa

On Thu, Aug 4, 2016 at 6:39 PM, Samith Dassanayake <sam...@wso2.com> wrote:

> Hi All,
>
> Is it possible to use both "Return Generated Keys" and Batch Requests
> options in DSS 3.5.0?
> For an example I have a query(addFlightQuery) which inserts a record to  a
> table. If I don't enable the  "Return Generated Keys"  options as in [1], I
> can see both "_post_addflightquery" and "_post_addflightquery_batch_req"
> operations. But if I enable it as in [2], it shows only the
> "_post_addflightquery" operation. Is it possible to get both
> "_post_addflightquery" and "_post_addflightquery_batch_req"  operations
> while enabling the "Return Generated Keys"  options
>
> [1]
> <data enableBatchRequests="true" name="BatchInsertSample">
>    <config enableOData="false" id="json">
>       <property name="driverClassName">com.mysql.jdbc.Driver</property>
>       <property name="url">jdbc:mysql://localhost:3306/json_array</
> property>
>       <property name="username">root</property>
>       <property name="password">root</property>
>       <property name="minIdle">1</property>
>       <property name="maxActive">10</property>
>       <property name="validationQuery">SELECT 1</property>
>    </config>
>    <query id="addFlightQuery" useConfig="json">
>       <sql>insert into flights (flight_no, number_of_cases, created_by,
> description, trips) values (:flight_no,:number_of_cases,:
> created_by,:description,:trips)</sql>
>       <param name="flight_no" ordinal="1" sqlType="BIGINT"/>
>       <param name="number_of_cases" ordinal="2" sqlType="BIGINT"/>
>       <param name="created_by" ordinal="3" sqlType="STRING"/>
>       <param name="description" ordinal="4" sqlType="STRING"/>
>       <param name="trips" ordinal="5" sqlType="BIGINT"/>
>    </query>
>    <resource method="POST" path="/addFlightQuery">
>       <call-query href="addFlightQuery">
>          <with-param name="flight_no" query-param="flight_no"/>
>          <with-param name="number_of_cases" query-param="number_of_cases"/
> >
>          <with-param name="created_by" query-param="created_by"/>
>          <with-param name="description" query-param="description"/>
>          <with-param name="trips" query-param="trips"/>
>       </call-query>
>    </resource>
> </data>
>
> [2]
> <data enableBatchRequests="true" name="BatchInsertSample">
>    <config id="json" enableOData="false">
>       <property name="driverClassName">com.mysql.jdbc.Driver</property>
>       <property name="url">jdbc:mysql://localhost:3306/json_array</
> property>
>       <property name="username">root</property>
>       <property name="password">root</property>
>       <property name="minIdle">1</property>
>       <property name="maxActive">10</property>
>       <property name="validationQuery">SELECT 1</property>
>    </config>
>    <query id="addFlightQuery" r*eturnGeneratedKeys="true" *
>  useConfig="json">
>       <sql>insert into flights (flight_no, number_of_cases, created_by,
> description, trips) values (:flight_no,:number_of_cases,:
> created_by,:description,:trips)</sql>
>      * <result element="GeneratedKeys" rowName="Entry"
> useColumnNumbers="true">*
> *         <element column="1" name="ID" xsdType="integer"/>*
> *      </result>*
>       <param name="flight_no" ordinal="1" sqlType="BIGINT"/>
>       <param name="number_of_cases" ordinal="2" sqlType="BIGINT"/>
>       <param name="created_by" ordinal="3" sqlType="STRING"/>
>       <param name="description" ordinal="4" sqlType="STRING"/>
>       <param name="trips" ordinal="5" sqlType="BIGINT"/>
>    </query>
>    <resource method="POST" path="/addFlightQuery">
>       <call-query href="addFlightQuery">
>          <with-param name="flight_no" query-param="flight_no"/>
>          <with-param name="number_of_cases" query-param="number_of_cases"/
> >
>          <with-param name="created_by" query-param="created_by"/>
>          <with-param name="description" query-param="description"/>
>          <with-param name="trips" query-param="trips"/>
>       </call-query>
>    </resource>
> </data>
>
> Regards,
> Samith
>
>
> --
> Best Regards
>
> Samith Dassanayake
> Senior Software Engineer | Cloud TG
> WSO2, Inc. | http://wso2.com
> lean. enterprise. middleware
>
> Mobile : +947 76207351
> Blog : buddycode.blogspot.com
>
> <http://wso2.com/signature>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Madhawa Gunasekara*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 719411002 <+94+719411002>
blog: *http://madhawa-gunasekara.blogspot.com
<http://madhawa-gunasekara.blogspot.com>*
linkedin: *http://lk.linkedin.com/in/mgunasekara
<http://lk.linkedin.com/in/mgunasekara>*
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to