org.apache.ignite.internal.processors.cache.query

## Class GridCacheSqlQuery

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.query.GridCacheSqlQuery

All Implemented Interfaces:
  Serializable, Message

    public class GridCacheSqlQuery
    extends Object
    implements Message

Query.

See Also:
  Serialized Form

### Field Summary

Fields
`static Object[]` `EMPTY_PARAMS`

### Constructor Summary

Constructors
Constructor and Description
`GridCacheSqlQuery()` For `Message`.
`GridCacheSqlQuery(String qry, Object[] params)`

### Method Summary

Methods
`LinkedHashMap<String,?>` `columns()`
`GridCacheSqlQuery` `columns(LinkedHashMap<String,?> columns)`
`GridCacheSqlQuery` `copy(Object[] args)`
`byte` `directType()` Gets message type.
`byte` `fieldsCount()` Gets fields count.
`void` `marshallParams(Marshaller m)`
`void` `parameterIndexes(int[] paramIdxs)`
`Object[]` `parameters()`
`String` `query()`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`String` `toString()`
`void` `unmarshallParams(Marshaller m)`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

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

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

### Field Detail

#### EMPTY_PARAMS

    public static final Object[] EMPTY_PARAMS

### Constructor Detail

#### GridCacheSqlQuery

    public GridCacheSqlQuery()

For `Message`.

#### GridCacheSqlQuery

    public GridCacheSqlQuery(String qry,
                     Object[] params)

Parameters:
  `qry` - Query.
  `params` - Query parameters.

### Method Detail

#### parameterIndexes

    public void parameterIndexes(int[] paramIdxs)

Parameters:
  `paramIdxs` - Parameter indexes.

#### columns

    public LinkedHashMap<String,?> columns()

Returns:
  Columns.

#### columns

    public GridCacheSqlQuery columns(LinkedHashMap<String,?> columns)

Parameters:
  `columns` - Columns.
Returns:
  `this`.

#### query

    public String query()

Returns:
  Query.

#### parameters

    public Object[] parameters()

Returns:
  Parameters.

#### marshallParams

    public void marshallParams(Marshaller m)
                        throws IgniteCheckedException

Parameters:
  `m` - Marshaller.
Throws:
  `IgniteCheckedException` - If failed.

#### unmarshallParams

    public void unmarshallParams(Marshaller m)
                          throws IgniteCheckedException

Parameters:
  `m` - Marshaller.
Throws:
  `IgniteCheckedException` - If failed.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                  MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
Parameters:
  `buf` - Byte buffer.
  `writer` - Writer.
Returns:
  Whether message was fully written.

#### readFrom

    public boolean readFrom(ByteBuffer buf,
                   MessageReader reader)

Reads this message from provided byte buffer.

Specified by:
  `readFrom` in interface `Message`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### directType

    public byte directType()

Gets message type.

Specified by:
  `directType` in interface `Message`
Returns:
  Message type.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

Specified by:
  `fieldsCount` in interface `Message`
Returns:
  Fields count.

#### copy

    public GridCacheSqlQuery copy(Object[] args)

Parameters:
  `args` - Arguments.
Returns:
  Copy.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0-b1
Release Date | : December 1 2015