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

Vladimir Ozerov commented on IGNITE-1896:
-----------------------------------------

I do not think we should do anything here for several reasons:
1) We had similar approach in Java before, but decided to switch to current 
model when all query arguments are kept inside an object. This allowed us to 
have less methods on public API. What is more important, this design survives 
changes gracefullly. E.g., if some new argument is added to query object, no 
API changes is needed.
2) I do not see a problem with generics either. This is a standard way how they 
used. See IDictionary API for example.

> .Net: Improve query API
> -----------------------
>
>                 Key: IGNITE-1896
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1896
>             Project: Ignite
>          Issue Type: Improvement
>          Components: interop
>    Affects Versions: 1.1.4
>            Reporter: Pavel  Tupitsyn
>            Assignee: Pavel  Tupitsyn
>             Fix For: 1.5
>
>
> Current API is very clumsy.
> Cache is generic, however we require the user to specify query type 
> explicitly.
> There are cases when query type is a string and/or is different from current 
> cache generic type, so the current API has to be kept.
> However, we should provide simple methods with generic inference:
> {code}
>         IQueryCursor<ICacheEntry<TK, TV>> ScanQuery(ICacheEntryFilter<TK, TV> 
> filter);
>         IQueryCursor<ICacheEntry<TK, TV>> SqlQuery(string sql, params 
> object[] args);
>         IQueryCursor<ICacheEntry<TK, TV>> SqlQuery(string sql, bool local, 
> params object[] args);
>         IQueryCursor<ICacheEntry<TK, TV>> TextQuery(string text);
>         IQueryCursor<ICacheEntry<TK, TV>> TextQuery(string text, bool local);
> {code}



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

Reply via email to