Package org.postgresql.jdbc
Class PgPreparedStatement
- java.lang.Object
-
- org.postgresql.jdbc.PgStatement
-
- org.postgresql.jdbc.PgPreparedStatement
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.sql.PreparedStatement,java.sql.Statement,java.sql.Wrapper,BaseStatement,PGStatement
- Direct Known Subclasses:
PgCallableStatement
class PgPreparedStatement extends PgStatement implements java.sql.PreparedStatement
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.postgresql.jdbc.PgStatement
PgStatement.StatementResultHandler
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.TimeZonedefaultTimeZoneprotected ParameterListpreparedParametersprotected CachedQuerypreparedQuery-
Fields inherited from class org.postgresql.jdbc.PgStatement
adaptiveFetch, batchParameters, batchStatements, concurrency, connection, fetchdirection, fetchSize, firstUnclosedResult, generatedKeys, lock, maxFieldSize, maxrows, mPrepareThreshold, replaceProcessingEnabled, result, resultsettype, timeout, wantsGeneratedKeysAlways, wantsGeneratedKeysOnce, warnings
-
Fields inherited from interface org.postgresql.PGStatement
DATE_NEGATIVE_INFINITY, DATE_NEGATIVE_SMALLER_INFINITY, DATE_POSITIVE_INFINITY, DATE_POSITIVE_SMALLER_INFINITY
-
-
Constructor Summary
Constructors Constructor Description PgPreparedStatement(PgConnection connection, java.lang.String sql, int rsType, int rsConcurrency, int rsHoldability)PgPreparedStatement(PgConnection connection, CachedQuery query, int rsType, int rsConcurrency, int rsHoldability)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBatch()voidaddBatch(java.lang.String sql)private static java.lang.StringasString(java.sql.Clob in)protected voidbindBytes(int paramIndex, byte[] b, int oid)protected voidbindLiteral(int paramIndex, java.lang.String s, int oid)Note if s is a String it should be escaped by the caller to avoid SQL injection attacks.private voidbindString(int paramIndex, java.lang.String s, int oid)This version is for values that should turn into strings e.g.private static PSQLExceptioncannotCastException(java.lang.String fromType, java.lang.String toType)private static PSQLExceptioncannotCastException(java.lang.String fromType, java.lang.String toType, java.lang.Exception cause)private static java.math.BigDecimalcastToBigDecimal(java.lang.Object in, int scale)private static doublecastToDouble(java.lang.Object in)private static floatcastToFloat(java.lang.Object in)private static intcastToInt(java.lang.Object in)private static longcastToLong(java.lang.Object in)private static shortcastToShort(java.lang.Object in)private static java.lang.StringcastToString(java.lang.Object in)voidclearParameters()voidcloseImpl()This is guaranteed to be called exactly once even in case of concurrentPgStatement.close()calls.protected longcreateBlob(int i, java.io.InputStream inputStream, long length)java.sql.ParameterMetaDatacreateParameterMetaData(BaseConnection conn, int[] oids)booleanexecute()booleanexecute(java.lang.String sql)int[]executeBatch()longexecuteLargeUpdate()java.sql.ResultSetexecuteQuery()java.sql.ResultSetexecuteQuery(java.lang.String sql)intexecuteUpdate()intexecuteUpdate(java.lang.String sql)booleanexecuteWithFlags(int flags)Execute a prepared query, passing additional query flags.private java.lang.Class<?>getArrayType(java.lang.Class<?> type)private java.util.CalendargetDefaultCalendar()java.sql.ResultSetMetaDatagetMetaData()java.sql.ParameterMetaDatagetParameterMetaData()private intgetStringType()protected booleanisOneShotQuery(CachedQuery cachedQuery)Returns true if query is unlikely to be reused.booleanisUseServerPrepare()Checks if this statement will be executed as a server-prepared statement.(package private) intmaximumNumberOfParameters()private java.lang.StringreaderToString(java.io.Reader value, int maxLength)voidsetArray(int i, java.sql.Array x)voidsetAsciiStream(int parameterIndex, java.io.InputStream value)voidsetAsciiStream(int parameterIndex, java.io.InputStream x, int length)voidsetAsciiStream(int parameterIndex, java.io.InputStream value, long length)voidsetBigDecimal(int parameterIndex, java.math.BigDecimal x)voidsetBinaryStream(int parameterIndex, java.io.InputStream value)voidsetBinaryStream(int parameterIndex, java.io.InputStream x, int length)voidsetBinaryStream(int parameterIndex, java.io.InputStream value, long length)voidsetBlob(int parameterIndex, java.io.InputStream inputStream)voidsetBlob(int parameterIndex, java.io.InputStream inputStream, long length)voidsetBlob(int i, java.sql.Blob x)voidsetBoolean(int parameterIndex, boolean x)voidsetByte(int parameterIndex, byte x)voidsetBytes(int parameterIndex, byte[] x)private voidsetByteStreamWriter(int parameterIndex, ByteStreamWriter x)voidsetCharacterStream(int parameterIndex, java.io.Reader value)voidsetCharacterStream(int i, java.io.Reader x, int length)voidsetCharacterStream(int parameterIndex, java.io.Reader value, long length)private voidsetCharacterStreamPost71(int parameterIndex, java.io.InputStream x, int length, java.lang.String encoding)voidsetClob(int parameterIndex, java.io.Reader reader)voidsetClob(int parameterIndex, java.io.Reader reader, long length)voidsetClob(int i, java.sql.Clob x)voidsetDate(int parameterIndex, java.sql.Date x)voidsetDate(int i, java.sql.Date d, java.util.Calendar cal)private voidsetDate(int i, java.time.LocalDate localDate)voidsetDouble(int parameterIndex, double x)voidsetFloat(int parameterIndex, float x)voidsetInt(int parameterIndex, int x)voidsetLong(int parameterIndex, long x)private voidsetMap(int parameterIndex, java.util.Map<?,?> x)voidsetNCharacterStream(int parameterIndex, java.io.Reader value)voidsetNCharacterStream(int parameterIndex, java.io.Reader value, long length)voidsetNClob(int parameterIndex, java.io.Reader reader)voidsetNClob(int parameterIndex, java.io.Reader reader, long length)voidsetNClob(int parameterIndex, java.sql.NClob value)voidsetNString(int parameterIndex, java.lang.String value)voidsetNull(int parameterIndex, int sqlType)voidsetNull(int parameterIndex, int t, java.lang.String typeName)private voidsetNumber(int parameterIndex, java.lang.Number x)voidsetObject(int parameterIndex, java.lang.Object x)voidsetObject(int parameterIndex, java.lang.Object x, int targetSqlType)voidsetObject(int parameterIndex, java.lang.Object in, int targetSqlType, int scale)voidsetObject(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType)voidsetObject(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType, int scaleOrLength)private <A> voidsetObjectArray(int parameterIndex, A in)private voidsetPGobject(int parameterIndex, PGobject x)voidsetRef(int i, java.sql.Ref x)voidsetRowId(int parameterIndex, java.sql.RowId x)voidsetShort(int parameterIndex, short x)voidsetSQLXML(int parameterIndex, java.sql.SQLXML xmlObject)voidsetString(int parameterIndex, java.lang.String x)protected voidsetString(int parameterIndex, java.lang.String x, int oid)voidsetTime(int parameterIndex, java.sql.Time x)voidsetTime(int i, java.sql.Time t, java.util.Calendar cal)private voidsetTime(int i, java.time.LocalTime localTime)private voidsetTime(int i, java.time.OffsetTime offsetTime)voidsetTimestamp(int parameterIndex, java.sql.Timestamp x)voidsetTimestamp(int i, java.sql.Timestamp t, java.util.Calendar cal)private voidsetTimestamp(int i, java.time.LocalDateTime localDateTime)private voidsetTimestamp(int i, java.time.OffsetDateTime offsetDateTime)voidsetUnicodeStream(int parameterIndex, java.io.InputStream x, int length)voidsetURL(int parameterIndex, java.net.URL x)private voidsetUuid(int parameterIndex, java.util.UUID uuid)java.lang.StringtoString()Returns the SQL statement with the current template values substituted.protected voidtransformQueriesAndParameters()-
Methods inherited from class org.postgresql.jdbc.PgStatement
addWarning, cancel, cancelIfStillNeeded, checkClosed, checkCompletion, checkNoResultUpdate, clearBatch, clearWarnings, close, closeForNextExecution, closeOnCompletion, createBatchHandler, createDriverResultSet, createResultSet, execute, execute, execute, execute, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeUpdate, executeUpdate, executeUpdate, executeWithFlags, executeWithFlags, getAdaptiveFetch, getConnection, getFetchDirection, getFetchingCursorName, getFetchSize, getForceBinaryTransfer, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getLastOID, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getPGConnection, getPrepareThreshold, getQueryTimeout, getQueryTimeoutMs, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getSingleResultSet, getTimestampUtils, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, setAdaptiveFetch, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setPrepareThreshold, setQueryTimeout, setQueryTimeoutMs, setUseServerPrepare, unwrap, wantsHoldableResultSet, wantsScrollableResultSet
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.sql.Statement
cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
-
-
-
-
Field Detail
-
preparedQuery
protected final CachedQuery preparedQuery
-
preparedParameters
protected final ParameterList preparedParameters
-
defaultTimeZone
private java.util.TimeZone defaultTimeZone
-
-
Constructor Detail
-
PgPreparedStatement
PgPreparedStatement(PgConnection connection, java.lang.String sql, int rsType, int rsConcurrency, int rsHoldability) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
PgPreparedStatement
PgPreparedStatement(PgConnection connection, CachedQuery query, int rsType, int rsConcurrency, int rsHoldability) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-
Method Detail
-
maximumNumberOfParameters
final int maximumNumberOfParameters()
-
executeQuery
public java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException- Specified by:
executeQueryin interfacejava.sql.Statement- Overrides:
executeQueryin classPgStatement- Throws:
java.sql.SQLException
-
executeQuery
public java.sql.ResultSet executeQuery() throws java.sql.SQLException- Specified by:
executeQueryin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.Statement- Overrides:
executeUpdatein classPgStatement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate() throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
executeLargeUpdate
public long executeLargeUpdate() throws java.sql.SQLException- Specified by:
executeLargeUpdatein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql) throws java.sql.SQLException- Specified by:
executein interfacejava.sql.Statement- Overrides:
executein classPgStatement- Throws:
java.sql.SQLException
-
execute
public boolean execute() throws java.sql.SQLException- Specified by:
executein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
executeWithFlags
public boolean executeWithFlags(int flags) throws java.sql.SQLExceptionDescription copied from interface:BaseStatementExecute a prepared query, passing additional query flags.- Specified by:
executeWithFlagsin interfaceBaseStatement- Overrides:
executeWithFlagsin classPgStatement- Parameters:
flags- additionalQueryExecutorflags for execution; these are bitwise-ORed into the default flags.- Returns:
- true if there is a result set
- Throws:
java.sql.SQLException- if something goes wrong.
-
isOneShotQuery
protected boolean isOneShotQuery(CachedQuery cachedQuery)
Description copied from class:PgStatementReturns true if query is unlikely to be reused.- Overrides:
isOneShotQueryin classPgStatement- Parameters:
cachedQuery- to check (null if current query)- Returns:
- true if query is unlikely to be reused
-
closeImpl
public void closeImpl() throws java.sql.SQLExceptionDescription copied from class:PgStatementThis is guaranteed to be called exactly once even in case of concurrentPgStatement.close()calls.- Overrides:
closeImplin classPgStatement- Throws:
java.sql.SQLException- in case of error
-
setNull
public void setNull(int parameterIndex, int sqlType) throws java.sql.SQLException- Specified by:
setNullin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBoolean
public void setBoolean(int parameterIndex, boolean x) throws java.sql.SQLException- Specified by:
setBooleanin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setByte
public void setByte(int parameterIndex, byte x) throws java.sql.SQLException- Specified by:
setBytein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setShort
public void setShort(int parameterIndex, short x) throws java.sql.SQLException- Specified by:
setShortin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setInt
public void setInt(int parameterIndex, int x) throws java.sql.SQLException- Specified by:
setIntin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setLong
public void setLong(int parameterIndex, long x) throws java.sql.SQLException- Specified by:
setLongin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setFloat
public void setFloat(int parameterIndex, float x) throws java.sql.SQLException- Specified by:
setFloatin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setDouble
public void setDouble(int parameterIndex, double x) throws java.sql.SQLException- Specified by:
setDoublein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBigDecimal
public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws java.sql.SQLException- Specified by:
setBigDecimalin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setString
public void setString(int parameterIndex, java.lang.String x) throws java.sql.SQLException- Specified by:
setStringin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
getStringType
private int getStringType()
-
setString
protected void setString(int parameterIndex, java.lang.String x, int oid) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setBytes
public void setBytes(int parameterIndex, byte[] x) throws java.sql.SQLException- Specified by:
setBytesin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setByteStreamWriter
private void setByteStreamWriter(int parameterIndex, ByteStreamWriter x) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setDate
public void setDate(int parameterIndex, java.sql.Date x) throws java.sql.SQLException- Specified by:
setDatein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setTime
public void setTime(int parameterIndex, java.sql.Time x) throws java.sql.SQLException- Specified by:
setTimein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setTimestamp
public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws java.sql.SQLException- Specified by:
setTimestampin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setCharacterStreamPost71
private void setCharacterStreamPost71(int parameterIndex, java.io.InputStream x, int length, java.lang.String encoding) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setAsciiStream
public void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException- Specified by:
setAsciiStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setUnicodeStream
public void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException- Specified by:
setUnicodeStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException- Specified by:
setBinaryStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
clearParameters
public void clearParameters() throws java.sql.SQLException- Specified by:
clearParametersin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setPGobject
private void setPGobject(int parameterIndex, PGobject x) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setMap
private void setMap(int parameterIndex, java.util.Map<?,?> x) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setNumber
private void setNumber(int parameterIndex, java.lang.Number x) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setObject
public void setObject(int parameterIndex, java.lang.Object in, int targetSqlType, int scale) throws java.sql.SQLException- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
getArrayType
private java.lang.Class<?> getArrayType(java.lang.Class<?> type)
-
setObjectArray
private <A> void setObjectArray(int parameterIndex, A in) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
asString
private static java.lang.String asString(java.sql.Clob in) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
castToInt
private static int castToInt(java.lang.Object in) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
castToShort
private static short castToShort(java.lang.Object in) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
castToLong
private static long castToLong(java.lang.Object in) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
castToFloat
private static float castToFloat(java.lang.Object in) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
castToDouble
private static double castToDouble(java.lang.Object in) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
castToBigDecimal
private static java.math.BigDecimal castToBigDecimal(java.lang.Object in, int scale) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
castToString
private static java.lang.String castToString(java.lang.Object in) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
cannotCastException
private static PSQLException cannotCastException(java.lang.String fromType, java.lang.String toType)
-
cannotCastException
private static PSQLException cannotCastException(java.lang.String fromType, java.lang.String toType, java.lang.Exception cause)
-
setObject
public void setObject(int parameterIndex, java.lang.Object x, int targetSqlType) throws java.sql.SQLException- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setObject
public void setObject(int parameterIndex, java.lang.Object x) throws java.sql.SQLException- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
toString
public java.lang.String toString()
Returns the SQL statement with the current template values substituted.- Overrides:
toStringin classjava.lang.Object- Returns:
- SQL statement with the current template values substituted
-
bindLiteral
protected void bindLiteral(int paramIndex, java.lang.String s, int oid) throws java.sql.SQLExceptionNote if s is a String it should be escaped by the caller to avoid SQL injection attacks. It is not done here for efficiency reasons as most calls to this method do not require escaping as the source of the string is known safe (i.e.Integer.toString())- Parameters:
paramIndex- parameter indexs- value (the value should already be escaped)oid- type oid- Throws:
java.sql.SQLException- if something goes wrong
-
bindBytes
protected void bindBytes(int paramIndex, byte[] b, int oid) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
bindString
private void bindString(int paramIndex, java.lang.String s, int oid) throws java.sql.SQLExceptionThis version is for values that should turn into strings e.g. setString directly calls bindString with no escaping; the per-protocol ParameterList does escaping as needed.- Parameters:
paramIndex- parameter indexs- valueoid- type oid- Throws:
java.sql.SQLException- if something goes wrong
-
isUseServerPrepare
public boolean isUseServerPrepare()
Description copied from interface:PGStatementChecks if this statement will be executed as a server-prepared statement. A return value oftrueindicates that the next execution of the statement will be done as a server-prepared statement, assuming the underlying protocol supports it.- Specified by:
isUseServerPreparein interfacePGStatement- Overrides:
isUseServerPreparein classPgStatement- Returns:
- true if the next reuse of this statement will use a server-prepared statement
-
addBatch
public void addBatch(java.lang.String sql) throws java.sql.SQLException- Specified by:
addBatchin interfacejava.sql.Statement- Overrides:
addBatchin classPgStatement- Throws:
java.sql.SQLException
-
addBatch
public void addBatch() throws java.sql.SQLException- Specified by:
addBatchin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
getMetaData
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException- Specified by:
getMetaDatain interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setArray
public void setArray(int i, java.sql.Array x) throws java.sql.SQLException- Specified by:
setArrayin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
createBlob
protected long createBlob(int i, java.io.InputStream inputStream, long length) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setBlob
public void setBlob(int i, java.sql.Blob x) throws java.sql.SQLException- Specified by:
setBlobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
readerToString
private java.lang.String readerToString(java.io.Reader value, int maxLength) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setCharacterStream
public void setCharacterStream(int i, java.io.Reader x, int length) throws java.sql.SQLException- Specified by:
setCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setClob
public void setClob(int i, java.sql.Clob x) throws java.sql.SQLException- Specified by:
setClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNull
public void setNull(int parameterIndex, int t, java.lang.String typeName) throws java.sql.SQLException- Specified by:
setNullin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setRef
public void setRef(int i, java.sql.Ref x) throws java.sql.SQLException- Specified by:
setRefin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setDate
public void setDate(int i, java.sql.Date d, java.util.Calendar cal) throws java.sql.SQLException- Specified by:
setDatein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setTime
public void setTime(int i, java.sql.Time t, java.util.Calendar cal) throws java.sql.SQLException- Specified by:
setTimein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setTimestamp
public void setTimestamp(int i, java.sql.Timestamp t, java.util.Calendar cal) throws java.sql.SQLException- Specified by:
setTimestampin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setDate
private void setDate(int i, java.time.LocalDate localDate) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setTime
private void setTime(int i, java.time.LocalTime localTime) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setTime
private void setTime(int i, java.time.OffsetTime offsetTime) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setTimestamp
private void setTimestamp(int i, java.time.LocalDateTime localDateTime) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setTimestamp
private void setTimestamp(int i, java.time.OffsetDateTime offsetDateTime) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
createParameterMetaData
public java.sql.ParameterMetaData createParameterMetaData(BaseConnection conn, int[] oids) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
setObject
public void setObject(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType, int scaleOrLength) throws java.sql.SQLException- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setObject
public void setObject(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType) throws java.sql.SQLException- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setRowId
public void setRowId(int parameterIndex, java.sql.RowId x) throws java.sql.SQLException- Specified by:
setRowIdin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNString
public void setNString(int parameterIndex, java.lang.String value) throws java.sql.SQLException- Specified by:
setNStringin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNCharacterStream
public void setNCharacterStream(int parameterIndex, java.io.Reader value, long length) throws java.sql.SQLException- Specified by:
setNCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNCharacterStream
public void setNCharacterStream(int parameterIndex, java.io.Reader value) throws java.sql.SQLException- Specified by:
setNCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, java.io.Reader value, long length) throws java.sql.SQLException- Specified by:
setCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, java.io.Reader value) throws java.sql.SQLException- Specified by:
setCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, java.io.InputStream value, long length) throws java.sql.SQLException- Specified by:
setBinaryStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, java.io.InputStream value) throws java.sql.SQLException- Specified by:
setBinaryStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setAsciiStream
public void setAsciiStream(int parameterIndex, java.io.InputStream value, long length) throws java.sql.SQLException- Specified by:
setAsciiStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setAsciiStream
public void setAsciiStream(int parameterIndex, java.io.InputStream value) throws java.sql.SQLException- Specified by:
setAsciiStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNClob
public void setNClob(int parameterIndex, java.sql.NClob value) throws java.sql.SQLException- Specified by:
setNClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setClob
public void setClob(int parameterIndex, java.io.Reader reader, long length) throws java.sql.SQLException- Specified by:
setClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setClob
public void setClob(int parameterIndex, java.io.Reader reader) throws java.sql.SQLException- Specified by:
setClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBlob
public void setBlob(int parameterIndex, java.io.InputStream inputStream, long length) throws java.sql.SQLException- Specified by:
setBlobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBlob
public void setBlob(int parameterIndex, java.io.InputStream inputStream) throws java.sql.SQLException- Specified by:
setBlobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNClob
public void setNClob(int parameterIndex, java.io.Reader reader, long length) throws java.sql.SQLException- Specified by:
setNClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNClob
public void setNClob(int parameterIndex, java.io.Reader reader) throws java.sql.SQLException- Specified by:
setNClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setSQLXML
public void setSQLXML(int parameterIndex, java.sql.SQLXML xmlObject) throws java.sql.SQLException- Specified by:
setSQLXMLin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setUuid
private void setUuid(int parameterIndex, java.util.UUID uuid) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setURL
public void setURL(int parameterIndex, java.net.URL x) throws java.sql.SQLException- Specified by:
setURLin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
executeBatch
public int[] executeBatch() throws java.sql.SQLException- Specified by:
executeBatchin interfacejava.sql.Statement- Overrides:
executeBatchin classPgStatement- Throws:
java.sql.SQLException
-
getDefaultCalendar
private java.util.Calendar getDefaultCalendar()
-
getParameterMetaData
public java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException- Specified by:
getParameterMetaDatain interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
transformQueriesAndParameters
protected void transformQueriesAndParameters() throws java.sql.SQLException- Overrides:
transformQueriesAndParametersin classPgStatement- Throws:
java.sql.SQLException
-
-