Package org.apache.ignite.cache.query
Class SqlQuery<K,V>
- java.lang.Object
-
- org.apache.ignite.cache.query.Query<javax.cache.Cache.Entry<K,V>>
-
- org.apache.ignite.cache.query.SqlQuery<K,V>
-
- All Implemented Interfaces:
Serializable
@Deprecated public final class SqlQuery<K,V> extends Query<javax.cache.Cache.Entry<K,V>>
Deprecated.Since 2.8, please useSqlFieldsQueryinstead.SQL Query.- See Also:
IgniteCache.query(Query), Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.cache.query.Query
DFLT_PAGE_SIZE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetAlias()Deprecated.Sets table alias for type.Object[]getArgs()Deprecated.Gets SQL arguments.@org.jetbrains.annotations.Nullable int[]getPartitions()Deprecated.StringgetSql()Deprecated.Gets SQL clause.intgetTimeout()Deprecated.Gets the query execution timeout in milliseconds.StringgetType()Deprecated.Gets type for query.booleanisDistributedJoins()Deprecated.Check if distributed joins are enabled for this query.booleanisReplicatedOnly()Deprecated.No longer used as of Apache Ignite 2.8.SqlQuery<K,V>setAlias(String alias)Deprecated.Gets table alias for type.SqlQuery<K,V>setArgs(Object... args)Deprecated.Sets SQL arguments.SqlQuery<K,V>setDistributedJoins(boolean distributedJoins)Deprecated.Specify if distributed joins are enabled for this query.SqlQuery<K,V>setLocal(boolean loc)Deprecated.Sets whether this query should be executed on local node only.SqlQuery<K,V>setPageSize(int pageSize)Deprecated.Sets optional page size, if0, then default is used.SqlQuerysetPartitions(@org.jetbrains.annotations.Nullable int... parts)Deprecated.Sets partitions for a query.SqlQuery<K,V>setReplicatedOnly(boolean replicatedOnly)Deprecated.No longer used as of Apache Ignite 2.8.SqlQuery<K,V>setSql(String sql)Deprecated.Sets SQL clause.SqlQuery<K,V>setTimeout(int timeout, TimeUnit timeUnit)Deprecated.Sets the query execution timeout.SqlQuery<K,V>setType(Class<?> type)Deprecated.SqlQuery<K,V>setType(String type)Deprecated.Sets type for query.StringtoString()Deprecated.-
Methods inherited from class org.apache.ignite.cache.query.Query
getPageSize, isLocal, prepare
-
-
-
-
Method Detail
-
getSql
public String getSql()
Deprecated.Gets SQL clause.- Returns:
- SQL clause.
-
setSql
public SqlQuery<K,V> setSql(String sql)
Deprecated.Sets SQL clause.- Parameters:
sql- SQL clause.- Returns:
thisFor chaining.
-
getArgs
public Object[] getArgs()
Deprecated.Gets SQL arguments.- Returns:
- SQL arguments.
-
setArgs
public SqlQuery<K,V> setArgs(Object... args)
Deprecated.Sets SQL arguments.- Parameters:
args- SQL arguments.- Returns:
thisFor chaining.
-
getType
public String getType()
Deprecated.Gets type for query.- Returns:
- Type.
-
setType
public SqlQuery<K,V> setType(String type)
Deprecated.Sets type for query.- Parameters:
type- Type.- Returns:
thisFor chaining.
-
getAlias
public String getAlias()
Deprecated.Sets table alias for type.- Returns:
- Table alias.
-
setAlias
public SqlQuery<K,V> setAlias(String alias)
Deprecated.Gets table alias for type.- Parameters:
alias- table alias for type that is used in query.- Returns:
thisFor chaining.
-
getTimeout
public int getTimeout()
Deprecated.Gets the query execution timeout in milliseconds.- Returns:
- Timeout value.
-
setTimeout
public SqlQuery<K,V> setTimeout(int timeout, TimeUnit timeUnit)
Deprecated.Sets the query execution timeout. Query will be automatically cancelled if the execution timeout is exceeded.- Parameters:
timeout- Timeout value. Zero value disables timeout.timeUnit- Time granularity.- Returns:
thisFor chaining.
-
setPageSize
public SqlQuery<K,V> setPageSize(int pageSize)
Deprecated.Sets optional page size, if0, then default is used.- Overrides:
setPageSizein classQuery<javax.cache.Cache.Entry<K,V>>- Parameters:
pageSize- Optional page size.- Returns:
thisfor chaining.
-
setLocal
public SqlQuery<K,V> setLocal(boolean loc)
Deprecated.Sets whether this query should be executed on local node only.
-
setType
public SqlQuery<K,V> setType(Class<?> type)
Deprecated.- Parameters:
type- Type.- Returns:
thisFor chaining.
-
setDistributedJoins
public SqlQuery<K,V> setDistributedJoins(boolean distributedJoins)
Deprecated.Specify if distributed joins are enabled for this query. When disabled, join results will only contain colocated data (joins work locally). When enabled, joins work as expected, no matter how the data is distributed.- Parameters:
distributedJoins- Distributed joins enabled.- Returns:
thisFor chaining.
-
isDistributedJoins
public boolean isDistributedJoins()
Deprecated.Check if distributed joins are enabled for this query.- Returns:
trueIf distributed joins enabled.
-
setReplicatedOnly
@Deprecated public SqlQuery<K,V> setReplicatedOnly(boolean replicatedOnly)
Deprecated.No longer used as of Apache Ignite 2.8.Specify if the query contains only replicated tables. This is a hint for potentially more effective execution.- Parameters:
replicatedOnly- The query contains only replicated tables.- Returns:
thisFor chaining.
-
isReplicatedOnly
@Deprecated public boolean isReplicatedOnly()
Deprecated.No longer used as of Apache Ignite 2.8.Check is the query contains only replicated tables.- Returns:
trueIf the query contains only replicated tables.
-
getPartitions
@Nullable public @org.jetbrains.annotations.Nullable int[] getPartitions()
Deprecated.- Returns:
- Partitions for query, in ascending order.
-
setPartitions
public SqlQuery setPartitions(@Nullable @org.jetbrains.annotations.Nullable int... parts)
Deprecated.Sets partitions for a query. The query will be executed only on nodes which are primary for specified partitions.Note what passed array'll be sorted in place for performance reasons, if it wasn't sorted yet.
- Parameters:
parts- Partitions.- Returns:
thisfor chaining.
-
-