com.amazon.redshift.core

## Class CachedQuery

- java.lang.Object
- - com.amazon.redshift.core.CachedQuery

All Implemented Interfaces:
  CanEstimateSize

    public class CachedQuery
    extends Object
    implements CanEstimateSize

Stores information on the parsed JDBC query. It is used to cut parsing overhead when executing the same query through `Connection.prepareStatement(String)`.

### Field Summary

Fields
`boolean` `isFunction`
`Object` `key` Cache key.
`Query` `query`

### Constructor Summary

Constructors
Constructor and Description
`CachedQuery(Object key, Query query, boolean isFunction)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getExecuteCount()` Number of times this statement has been used.
`long` `getSize()`
`void` `increaseExecuteCount()`
`void` `increaseExecuteCount(int inc)`
`String` `toString()`

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

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

### Field Detail

#### key

    public final Object key

Cache key. `String` or `com.amazon.redshift.util.CanEstimateSize`.

#### query

    public final Query query

#### isFunction

    public final boolean isFunction

### Constructor Detail

#### CachedQuery

    public CachedQuery(Object key,
                       Query query,
                       boolean isFunction)

### Method Detail

#### increaseExecuteCount

    public void increaseExecuteCount()

#### increaseExecuteCount

    public void increaseExecuteCount(int inc)

#### getExecuteCount

    public int getExecuteCount()

Number of times this statement has been used.

Returns:
  number of times this statement has been used

#### getSize

    public long getSize()

Specified by:
  `getSize` in interface `CanEstimateSize`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`