Package org.postgresql.core
Class CachedQuery
- java.lang.Object
-
- org.postgresql.core.CachedQuery
-
- All Implemented Interfaces:
CanEstimateSize
public class CachedQuery extends java.lang.Object implements CanEstimateSize
Stores information on the parsed JDBC query. It is used to cut parsing overhead when executing the same query throughConnection.prepareStatement(String).
-
-
Field Summary
Fields Modifier and Type Field Description booleanisFunctionjava.lang.ObjectkeyCache key.Queryquery
-
Constructor Summary
Constructors Constructor Description CachedQuery(java.lang.Object key, Query query, boolean isFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetExecuteCount()Number of times this statement has been used.longgetSize()voidincreaseExecuteCount()voidincreaseExecuteCount(int inc)java.lang.StringtoString()
-
-
-
Field Detail
-
key
public final java.lang.Object key
Cache key.Stringororg.postgresql.util.CanEstimateSize.
-
query
public final Query query
-
isFunction
public final boolean isFunction
-
-
Constructor Detail
-
CachedQuery
public CachedQuery(java.lang.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:
getSizein interfaceCanEstimateSize
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-