org.apache.ignite.configuration

## Class CacheQueryConfiguration

- java.lang.Object
- - org.apache.ignite.configuration.CacheQueryConfiguration

All Implemented Interfaces:
  Serializable

    public class CacheQueryConfiguration
    extends Object
    implements Serializable

Query configuration object.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`CacheQueryConfiguration()` Default constructor.
`CacheQueryConfiguration(CacheQueryConfiguration cfg)`

### Method Summary

Methods
`QueryTypeResolver` `getTypeResolver()` Gets query type resolver.
`boolean` `isEscapeAll()` If `true`, then table name and all column names in 'create table' SQL generated for SQL engine are escaped with double quotes.
`boolean` `isIndexFixedTyping()` This flag essentially controls whether all values of the same type have identical key type.
`boolean` `isIndexPrimitiveKey()` Gets flag indicating whether SQL engine should index by key in cases where key is primitive type
`boolean` `isIndexPrimitiveValue()` Gets flag indicating whether SQL engine should index by value in cases where value is primitive type
`void` `setEscapeAll(boolean escapeAll)` If `true`, then table name and all column names in 'create table' SQL generated for SQL engine are escaped with double quotes.
`void` `setIndexFixedTyping(boolean idxFixedTyping)` This flag essentially controls whether key type is going to be identical for all values of the same type.
`void` `setIndexPrimitiveKey(boolean idxPrimitiveKey)` Sets flag indicating whether SQL engine should index by key in cases where key is primitive type.
`void` `setIndexPrimitiveValue(boolean idxPrimitiveVal)` Sets flag indexing whether SQL engine should index by value in cases where value is primitive type.
`void` `setTypeResolver(QueryTypeResolver typeRslvr)` Sets query type resolver.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CacheQueryConfiguration

    public CacheQueryConfiguration()

Default constructor.

#### CacheQueryConfiguration

    public CacheQueryConfiguration(CacheQueryConfiguration cfg)

Parameters:
  `cfg` - Configuration to copy.

### Method Detail

#### getTypeResolver

    public QueryTypeResolver getTypeResolver()

Gets query type resolver.

Returns:
  Query type resolver.

#### setTypeResolver

    public void setTypeResolver(QueryTypeResolver typeRslvr)

Sets query type resolver.

Parameters:
  `typeRslvr` - Query type resolver.

#### isIndexPrimitiveKey

    public boolean isIndexPrimitiveKey()

Gets flag indicating whether SQL engine should index by key in cases where key is primitive type

Returns:
  `True` if primitive keys should be indexed.

#### setIndexPrimitiveKey

    public void setIndexPrimitiveKey(boolean idxPrimitiveKey)

Sets flag indicating whether SQL engine should index by key in cases where key is primitive type.

Parameters:
  `idxPrimitiveKey` - `True` if primitive keys should be indexed.

#### isIndexPrimitiveValue

    public boolean isIndexPrimitiveValue()

Gets flag indicating whether SQL engine should index by value in cases where value is primitive type

Returns:
  `True` if primitive values should be indexed.

#### setIndexPrimitiveValue

    public void setIndexPrimitiveValue(boolean idxPrimitiveVal)

Sets flag indexing whether SQL engine should index by value in cases where value is primitive type.

Parameters:
  `idxPrimitiveVal` - `True` if primitive values should be indexed.

#### isIndexFixedTyping

    public boolean isIndexFixedTyping()

This flag essentially controls whether all values of the same type have identical key type.

If `false`, SQL engine will store all keys in BINARY form to make it possible to store the same value type with different key types. If `true`, key type will be converted to respective SQL type if it is possible, hence, improving performance of queries.

Setting this value to `false` also means that `'_key'` column cannot be indexed and cannot participate in query where clauses. The behavior of using '_key' column in where clauses with this flag set to `false` is undefined.

Returns:
  `True` if SQL engine should try to convert values to their respective SQL types for better performance.

#### setIndexFixedTyping

    public void setIndexFixedTyping(boolean idxFixedTyping)

This flag essentially controls whether key type is going to be identical for all values of the same type.

If false, SQL engine will store all keys in BINARY form to make it possible to store the same value type with different key types. If true, key type will be converted to respective SQL type if it is possible, which may provide significant performance boost.

Parameters:
  `idxFixedTyping` - `True` if SQL engine should try to convert values to their respective SQL types for better performance.

#### isEscapeAll

    public boolean isEscapeAll()

If `true`, then table name and all column names in 'create table' SQL generated for SQL engine are escaped with double quotes. This flag should be set if table name of column name is H2 reserved word or is not valid H2 identifier (e.g. contains space or hyphen).

Note if this flag is set then table and column name in SQL queries also must be escaped with double quotes.

Returns:
  Flag value.

#### setEscapeAll

    public void setEscapeAll(boolean escapeAll)

If `true`, then table name and all column names in 'create table' SQL generated for SQL engine are escaped with double quotes. This flag should be set if table name of column name is H2 reserved word or is not valid H2 identifier (e.g. contains space or hyphen).

Note if this flag is set then table and column name in SQL queries also must be escaped with double quotes.

Parameters:
  `escapeAll` - Flag value.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC1
Release Date | : February 17 2015