You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Anthony Baker (JIRA)" <ji...@apache.org> on 2016/10/27 14:01:59 UTC

[jira] [Comment Edited] (GEODE-2041) Query.execute should return a more meaningful response

    [ https://issues.apache.org/jira/browse/GEODE-2041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15611972#comment-15611972 ] 

Anthony Baker edited comment on GEODE-2041 at 10/27/16 2:01 PM:
----------------------------------------------------------------

FWIW, scalar results will be a different type according to the javadocs:

{code}
   * @return The object that represents the result of the query. Note that if a query is just a
   *         select statement then it will return a result that is an instance of
   *         {@link SelectResults}. However, since a query is not necessarily just a select
   *         statement, the return type of this method is <code>Object</code>. For example, the
   *         query <code><b>(select distinct * from /rgn).size</b></code> returns an instance of
   *         <code>java.lang.Integer</code>.
{code}

I agree that a better return type than 'Object' would make the API easier to use.



was (Author: amb):
FWIW, scalar results will be a different type according to the javadocs:

{quote}
   * @return The object that represents the result of the query. Note that if a query is just a
   *         select statement then it will return a result that is an instance of
   *         {@link SelectResults}. However, since a query is not necessarily just a select
   *         statement, the return type of this method is <code>Object</code>. For example, the
   *         query <code><b>(select distinct * from /rgn).size</b></code> returns an instance of
   *         <code>java.lang.Integer</code>.
{quote}

I agree that a better return type than {code}Object{code} would make the API easier to use.


> Query.execute should return a more meaningful response
> ------------------------------------------------------
>
>                 Key: GEODE-2041
>                 URL: https://issues.apache.org/jira/browse/GEODE-2041
>             Project: Geode
>          Issue Type: Improvement
>            Reporter: John D. Ament
>
> Query.execute's signature says the return type is Object.  It seems to always be a {{SearchResults}} object, so why not return that?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)