You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "minal sontakke (JIRA)" <ji...@apache.org> on 2009/04/13 11:50:15 UTC
[jira] Created: (SYNAPSE-533) DBLookup extracs only first element
from database
DBLookup extracs only first element from database
-------------------------------------------------
Key: SYNAPSE-533
URL: https://issues.apache.org/jira/browse/SYNAPSE-533
Project: Synapse
Issue Type: Bug
Components: Extension Mediators, Script mediator
Affects Versions: 1.2
Reporter: minal sontakke
Fix For: 1.2
I just realized that the DBLookup mediator extracts only the first row... :( when i try to use statement like select * from mytable; and if my table called as mytable contains 3 values like test1, test2 and test 3, when i try to use the same only first element gets displayed ie like test1 and i dont get output as test1,test2, test3. DBLookup needs to improve this to extract multiple rows if there are multiple rows, in which case the result set will be a list of results which might be a special list that needs to be implement because it can get a XML representation of this list easily.
Refer discussion at link : http://wso2.org/forum/thread/5181
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Updated: (SYNAPSE-533) DBLookup extracs only first element
from database
Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hiranya Jayathilaka updated SYNAPSE-533:
----------------------------------------
Issue Type: Improvement (was: Bug)
Assignee: Hiranya Jayathilaka
Fix Version/s: 2.1
(was: 1.2)
> DBLookup extracs only first element from database
> -------------------------------------------------
>
> Key: SYNAPSE-533
> URL: https://issues.apache.org/jira/browse/SYNAPSE-533
> Project: Synapse
> Issue Type: Improvement
> Components: Extension Mediators, Script mediator
> Affects Versions: 1.2
> Reporter: minal sontakke
> Assignee: Hiranya Jayathilaka
> Fix For: 2.1
>
> Attachments: SYNAPSE-533.patch
>
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> I just realized that the DBLookup mediator extracts only the first row... :( when i try to use statement like select * from mytable; and if my table called as mytable contains 3 values like test1, test2 and test 3, when i try to use the same only first element gets displayed ie like test1 and i dont get output as test1,test2, test3. DBLookup needs to improve this to extract multiple rows if there are multiple rows, in which case the result set will be a list of results which might be a special list that needs to be implement because it can get a XML representation of this list easily.
> Refer discussion at link : http://wso2.org/forum/thread/5181
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-533) DBLookup extracs only first element
from database
Posted by "Shibu Gope (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873345#action_12873345 ]
Shibu Gope commented on SYNAPSE-533:
------------------------------------
Is this bugfix released in version 1.2?
> DBLookup extracs only first element from database
> -------------------------------------------------
>
> Key: SYNAPSE-533
> URL: https://issues.apache.org/jira/browse/SYNAPSE-533
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators, Script mediator
> Affects Versions: 1.2
> Reporter: minal sontakke
> Fix For: 1.2
>
> Attachments: SYNAPSE-533.patch
>
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> I just realized that the DBLookup mediator extracts only the first row... :( when i try to use statement like select * from mytable; and if my table called as mytable contains 3 values like test1, test2 and test 3, when i try to use the same only first element gets displayed ie like test1 and i dont get output as test1,test2, test3. DBLookup needs to improve this to extract multiple rows if there are multiple rows, in which case the result set will be a list of results which might be a special list that needs to be implement because it can get a XML representation of this list easily.
> Refer discussion at link : http://wso2.org/forum/thread/5181
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Updated: (SYNAPSE-533) DBLookup extracs only first element
from database
Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rajika Kumarasiri updated SYNAPSE-533:
--------------------------------------
Attachment: SYNAPSE-533.patch
Here is a patch which fix the problem.
Now the result element has an optional rowIndex attribute which you can specify the row of the result set to get the required result when there are more than one entry.
ex:
<result name="company_id" column="id" />
<result name="company_price_0" column="price" rowIndex="2"/>
<result name="company_price_1" column="price" rowIndex="4"/>
Rajika
> DBLookup extracs only first element from database
> -------------------------------------------------
>
> Key: SYNAPSE-533
> URL: https://issues.apache.org/jira/browse/SYNAPSE-533
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators, Script mediator
> Affects Versions: 1.2
> Reporter: minal sontakke
> Fix For: 1.2
>
> Attachments: SYNAPSE-533.patch
>
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> I just realized that the DBLookup mediator extracts only the first row... :( when i try to use statement like select * from mytable; and if my table called as mytable contains 3 values like test1, test2 and test 3, when i try to use the same only first element gets displayed ie like test1 and i dont get output as test1,test2, test3. DBLookup needs to improve this to extract multiple rows if there are multiple rows, in which case the result set will be a list of results which might be a special list that needs to be implement because it can get a XML representation of this list easily.
> Refer discussion at link : http://wso2.org/forum/thread/5181
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-533) DBLookup extracs only first element
from database
Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12755473#action_12755473 ]
Rajika Kumarasiri commented on SYNAPSE-533:
-------------------------------------------
hi,
I think we have an alternative for this. Setting the whole result set as the msg_ctx property would be problematic if the result set is huge. So i suggest adding a new attribute row index for the result element if we have multiple entries.
-Rajika
> DBLookup extracs only first element from database
> -------------------------------------------------
>
> Key: SYNAPSE-533
> URL: https://issues.apache.org/jira/browse/SYNAPSE-533
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators, Script mediator
> Affects Versions: 1.2
> Reporter: minal sontakke
> Fix For: 1.2
>
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> I just realized that the DBLookup mediator extracts only the first row... :( when i try to use statement like select * from mytable; and if my table called as mytable contains 3 values like test1, test2 and test 3, when i try to use the same only first element gets displayed ie like test1 and i dont get output as test1,test2, test3. DBLookup needs to improve this to extract multiple rows if there are multiple rows, in which case the result set will be a list of results which might be a special list that needs to be implement because it can get a XML representation of this list easily.
> Refer discussion at link : http://wso2.org/forum/thread/5181
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-533) DBLookup extracs only first element
from database
Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12912398#action_12912398 ]
Hiranya Jayathilaka commented on SYNAPSE-533:
---------------------------------------------
Rajika,
I don't think this is a very good solution to the problem at hand. For instance how can one find out the number of records returned by the query at the configuration development time? I think we need to look for a different solution. May be an option to publish the result set as an XML is a more elegant solution.
Thanks,
Hiranya
> DBLookup extracs only first element from database
> -------------------------------------------------
>
> Key: SYNAPSE-533
> URL: https://issues.apache.org/jira/browse/SYNAPSE-533
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators, Script mediator
> Affects Versions: 1.2
> Reporter: minal sontakke
> Fix For: 1.2
>
> Attachments: SYNAPSE-533.patch
>
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> I just realized that the DBLookup mediator extracts only the first row... :( when i try to use statement like select * from mytable; and if my table called as mytable contains 3 values like test1, test2 and test 3, when i try to use the same only first element gets displayed ie like test1 and i dont get output as test1,test2, test3. DBLookup needs to improve this to extract multiple rows if there are multiple rows, in which case the result set will be a list of results which might be a special list that needs to be implement because it can get a XML representation of this list easily.
> Refer discussion at link : http://wso2.org/forum/thread/5181
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-533) DBLookup extracs only first element
from database
Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12912942#action_12912942 ]
Rajika Kumarasiri commented on SYNAPSE-533:
-------------------------------------------
Hiranya,
Yeah it seems wrapping the result set in a XML seems like a good solution.
Rajika
> DBLookup extracs only first element from database
> -------------------------------------------------
>
> Key: SYNAPSE-533
> URL: https://issues.apache.org/jira/browse/SYNAPSE-533
> Project: Synapse
> Issue Type: Improvement
> Components: Extension Mediators, Script mediator
> Affects Versions: 1.2
> Reporter: minal sontakke
> Assignee: Hiranya Jayathilaka
> Fix For: 2.1
>
> Attachments: SYNAPSE-533.patch
>
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> I just realized that the DBLookup mediator extracts only the first row... :( when i try to use statement like select * from mytable; and if my table called as mytable contains 3 values like test1, test2 and test 3, when i try to use the same only first element gets displayed ie like test1 and i dont get output as test1,test2, test3. DBLookup needs to improve this to extract multiple rows if there are multiple rows, in which case the result set will be a list of results which might be a special list that needs to be implement because it can get a XML representation of this list easily.
> Refer discussion at link : http://wso2.org/forum/thread/5181
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-533) DBLookup extracs only first element
from database
Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754022#action_12754022 ]
Rajika Kumarasiri commented on SYNAPSE-533:
-------------------------------------------
I suggest we set the whole result set as a message context property and we provide another XPath extension function for GetPropertyFunction.java class to retrieve the required information form the results set, passing row and the column index to the function.
> DBLookup extracs only first element from database
> -------------------------------------------------
>
> Key: SYNAPSE-533
> URL: https://issues.apache.org/jira/browse/SYNAPSE-533
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators, Script mediator
> Affects Versions: 1.2
> Reporter: minal sontakke
> Fix For: 1.2
>
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> I just realized that the DBLookup mediator extracts only the first row... :( when i try to use statement like select * from mytable; and if my table called as mytable contains 3 values like test1, test2 and test 3, when i try to use the same only first element gets displayed ie like test1 and i dont get output as test1,test2, test3. DBLookup needs to improve this to extract multiple rows if there are multiple rows, in which case the result set will be a list of results which might be a special list that needs to be implement because it can get a XML representation of this list easily.
> Refer discussion at link : http://wso2.org/forum/thread/5181
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-533) DBLookup extracs only first element
from database
Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754037#action_12754037 ]
Ruwan Linton commented on SYNAPSE-533:
--------------------------------------
Rajika, I think it is better to register this as a different extension to the SynapseXPathFunctionContext, may be called get-result(), please have a look at the way that the get-property function has been registered on the SynapseXPath and write a new class called GetResultFunction to provide this functionality.
> DBLookup extracs only first element from database
> -------------------------------------------------
>
> Key: SYNAPSE-533
> URL: https://issues.apache.org/jira/browse/SYNAPSE-533
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators, Script mediator
> Affects Versions: 1.2
> Reporter: minal sontakke
> Fix For: 1.2
>
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> I just realized that the DBLookup mediator extracts only the first row... :( when i try to use statement like select * from mytable; and if my table called as mytable contains 3 values like test1, test2 and test 3, when i try to use the same only first element gets displayed ie like test1 and i dont get output as test1,test2, test3. DBLookup needs to improve this to extract multiple rows if there are multiple rows, in which case the result set will be a list of results which might be a special list that needs to be implement because it can get a XML representation of this list easily.
> Refer discussion at link : http://wso2.org/forum/thread/5181
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-533) DBLookup extracs only first element
from database
Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12755474#action_12755474 ]
Rajika Kumarasiri commented on SYNAPSE-533:
-------------------------------------------
hi,
I think we have an alternative for this. Setting the whole result set as the msg_ctx property would be problematic if the result set is huge. So i suggest adding a new attribute row index for the result element if we have multiple entries.
-Rajika
> DBLookup extracs only first element from database
> -------------------------------------------------
>
> Key: SYNAPSE-533
> URL: https://issues.apache.org/jira/browse/SYNAPSE-533
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators, Script mediator
> Affects Versions: 1.2
> Reporter: minal sontakke
> Fix For: 1.2
>
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> I just realized that the DBLookup mediator extracts only the first row... :( when i try to use statement like select * from mytable; and if my table called as mytable contains 3 values like test1, test2 and test 3, when i try to use the same only first element gets displayed ie like test1 and i dont get output as test1,test2, test3. DBLookup needs to improve this to extract multiple rows if there are multiple rows, in which case the result set will be a list of results which might be a special list that needs to be implement because it can get a XML representation of this list easily.
> Refer discussion at link : http://wso2.org/forum/thread/5181
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org