Package org.postgresql.core

# Class CachedQuery

java.lang.Object
org.postgresql.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
Modifier and Type
Field
Description
`final boolean`
`isFunction`
`final Object`
`key`
Cache key.
`final Query`
`query`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`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 Details

### key

public final Object key
Cache key. `String` or `org.postgresql.util.CanEstimateSize`.

### query

public final Query query

### isFunction

public final boolean isFunction

## Constructor Details

### CachedQuery

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

## Method Details

### 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`