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

Alexey Kukushkin edited comment on IGNITE-7421 at 3/4/18 3:38 PM:
------------------------------------------------------------------

[~vozerov]: Vladimir, I implemented all your comments above except #12: 
"_{{IgniteClient.nonQuery}} - let's remove this for now_"
 The method was added for two purposes:
 # Allow executing SQL statements outside the cache context. In other words, 
having this method inside IgniteClient (as opposed to ClientCache#query) allows 
running DDL without binding to any cache first.
 # it is called "nonQuery" (instead of "query") since the "query" methods are 
all lazy: you have to either iterate the returned cursor or call 
Cursor#getAll() to have the SQL statement actually executed. nonQuery semantics 
is eager: it executes the passed statement right away. If we replace it with a 
"query" method the user would have to write DDL like this: 
"ignite.query("CREATE TABLE TBL").getAll()". That "getAll" is really confusing 
for DDL.

This is why I still think we need IgniteClient#nonQury(String)

I had to recreate code review in Upsource. The new core review is 
https://reviews.ignite.apache.org/apache-ignite/review/IG-CR-25


was (Author: kukushal):
[~vozerov]: Vladimir, I implemented all your comments above except #12: 
"_{{IgniteClient.nonQuery}} - let's remove this for now_"
The method was added for two purposes:
 # Allow executing SQL statements outside the cache context. In other words, 
having this method inside IgniteClient (as opposed to ClientCache#query) allows 
running DDL without binding to any cache first.
 # it is called "nonQuery" (instead of "query") since the "query" methods are 
all lazy: you have to either iterate the returned cursor or call 
Cursor#getAll() to have the SQL statement actually executed. nonQuery semantics 
is eager: it executes the passed statement right away. If we replace it with a 
"query" method the user would have to write DDL like this: 
"ignite.query("CREATE TABLE TBL").getAll()". That "getAll" is really confusing 
for DDL.

This is why I still think we need IgniteClient#nonQury(String)

> Thin client Java API - data grid API
> ------------------------------------
>
>                 Key: IGNITE-7421
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7421
>             Project: Ignite
>          Issue Type: New Feature
>          Components: thin client
>            Reporter: Alexey Kukushkin
>            Assignee: Alexey Kukushkin
>            Priority: Major
>              Labels: data, java, thin
>
> Implement below Java bindings for the thin client protocol. The client 
> configuration must support failover and encryption.
> Cache
>      JCache (limited)
>          getName(): String
>          put(key, val)
>          get(key): V
>          getAll(keys: Set): Map
>          containsKey(key): boolean
>          getAndPut(key, val): V
>          getAndReplace(key, val): V
>          getAndRemove(key): V
>          putIfAbsent
>          replace(key, val)
>          replace(key, oldVal, newVal)
>          putAll
>          clear
>          remove(key)
>          remove(key, val)
>          removeAll()
>          removeAll(keys: Set)
>          getConfiguration(clazz): Configuration
>          close()
>      size(modes: CachePeekMode...)
>      query(qry: Query): QueryCursor
>      query(qry: SqlFieldsQuery): FieldsQueryCursor<List>
>      withKeepBinary(): IgniteCache
>  Ignite
>      cache(name: String)
>      cacheNames(): Collection
>      binary(): IgniteBinary
>      createCache(name): Cache
>      getOrCreateCache(name): Cache
>      destroyCache(name)
>  Ignition
>      startClient(:ClientConfiguration): Ignite
>  ClientConfiguration(port, host, binaryConfiguration, sslConfiguration,
>  etc...)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to