| Modifier and Type | Field and Description |
|---|---|
| private @Nullable TimeZone | |
| protected final ParameterList | |
| protected final CachedQuery |
| Access | Constructor and Description |
|---|---|
| pack-priv | PgPreparedStatement(PgConnection connection, String sql, int rsType, int rsConcurrency, int rsHoldability)
|
| pack-priv | PgPreparedStatement(PgConnection connection, CachedQuery query, int rsType, int rsConcurrency, int rsHoldability)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | addBatch(String
typically this is a SQL sql)INSERT or
UPDATE statementOverrides org. Implements java. Adds the given SQL command to the current list of commands for this
|
| public void | addBatch()
Implements java. Adds a set of parameters to this |
| private static String | |
| protected void | |
| protected void | bindLiteral(@Positive int
parameter index paramIndex, String value (the value should already be escaped) s, int type oid oid)Note if s is a String it should be escaped by the caller to avoid SQL injection attacks. |
| private void | bindString(@Positive int
parameter index paramIndex, String value s, int type oid oid)This 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. |
| private static PSQLException | |
| private static PSQLException | |
| private static BigDecimal | |
| private static double | |
| private static float | |
| private static int | |
| private static long | |
| private static short | |
| private static String | |
| public void | clearParameters()
Implements java. Clears the current parameter values immediately. |
| public void | closeImpl()
Overrides org. This is guaranteed to be called exactly once even in case of concurrent |
| protected long | |
| public ParameterMetaData | |
| public boolean | execute(String
any SQL statement sql)Overrides org. Implements java. Executes the given SQL statement, which may return multiple results. |
| public boolean | execute()
Implements java. Executes the SQL statement in this |
| public int[] | executeBatch()
Overrides org. Implements java. Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts. |
| public long | executeLargeUpdate()
Overrides default java. Executes the SQL statement in this |
| public ResultSet | executeQuery(String
an SQL statement to be sent to the database, typically a
static SQL sql)SELECT statementOverrides org. Implements java. Executes the given SQL statement, which returns a single
|
| public ResultSet | executeQuery()
Implements java. Executes the SQL query in this |
| public int | executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as sql)INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.Overrides org. Implements java. Executes the given SQL statement, which may be an |
| public int | executeUpdate()
Implements java. Executes the SQL statement in this |
| public boolean | executeWithFlags(int
additional flags)QueryExecutor flags for execution; these are bitwise-ORed into
the default flags.Overrides org. Implements org. Execute a prepared query, passing additional query flags. |
| private Class | |
| private Calendar | |
| public @Nullable ResultSetMetaData | getMetaData()
Implements java. Retrieves a |
| public ParameterMetaData | getParameterMetaData()
Implements java. Retrieves the number, types and properties of this
|
| private int | |
| protected boolean | |
| public boolean | isUseServerPrepare()
Overrides org. Implements org. Checks if this statement will be executed as a server-prepared statement. |
| pack-priv final int | |
| private String | |
| public void | setArray(int
the first parameter is 1, the second is 2, ... i, @Nullable Array an x)Array object that maps an SQL ARRAY valueImplements java. Sets the designated parameter to the given |
| public void | setAsciiStream(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable InputStream the Java input stream that contains the ASCII parameter value x, @NonNegative int the number of bytes in the stream length)Implements java. Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
| public void | setAsciiStream(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable InputStream the Java input stream that contains the ASCII parameter value value, @NonNegative long the number of bytes in the stream length)Implements java. Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
| public void | setAsciiStream(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable InputStream the Java input stream that contains the ASCII parameter value value)Implements java. Sets the designated parameter to the given input stream. |
| public void | setBigDecimal(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable BigDecimal the parameter value x)Implements java. Sets the designated parameter to the given |
| public void | setBinaryStream(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable InputStream the java input stream which contains the binary parameter value x, @NonNegative int the number of bytes in the stream length)Implements java. Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
| public void | setBinaryStream(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable InputStream the java input stream which contains the binary parameter value value, @NonNegative @IntRange(from: 0L, to: 2147483647L) long the number of bytes in the stream length)Implements java. Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
| public void | setBinaryStream(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable InputStream the java input stream which contains the binary parameter value value)Implements java. Sets the designated parameter to the given input stream. |
| public void | setBlob(@Positive int
the first parameter is 1, the second is 2, ... i, @Nullable Blob a x)Blob object that maps an SQL BLOB valueImplements java. Sets the designated parameter to the given |
| public void | setBlob(@Positive int
index of the first parameter is 1,
the second is 2, ... parameterIndex, @Nullable InputStream An object that contains the data to set the parameter
value to. inputStream, @NonNegative long the number of bytes in the parameter data. length)Implements java. Sets the designated parameter to a |
| public void | setBlob(@Positive int
index of the first parameter is 1,
the second is 2, ... parameterIndex, @Nullable InputStream An object that contains the data to set the parameter
value to. inputStream)Implements java. Sets the designated parameter to a |
| public void | setBoolean(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, boolean the parameter value x)Implements java. Sets the designated parameter to the given Java |
| public void | setByte(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, byte the parameter value x)Implements java. Sets the designated parameter to the given Java |
| public void | setBytes(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable byte[] the parameter value x)Implements java. Sets the designated parameter to the given Java array of bytes. |
| private void | |
| public void | setCharacterStream(@Positive int
the first parameter is 1, the second is 2, ... i, @Nullable Reader the x, @NonNegative int java.io.Reader object that contains the
Unicode datathe number of characters in the stream length)Implements java. Sets the designated parameter to the given |
| public void | setCharacterStream(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Reader the value, @NonNegative long java.io.Reader object that contains the
Unicode datathe number of characters in the stream length)Implements java. Sets the designated parameter to the given |
| public void | setCharacterStream(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Reader the value)java.io.Reader object that contains the
Unicode dataImplements java. Sets the designated parameter to the given |
| private void | setCharacterStreamPost71(@Positive int parameterIndex, @Nullable InputStream x, int length, String encoding)
|
| public void | setClob(@Positive int
the first parameter is 1, the second is 2, ... i, @Nullable Clob a x)Clob object that maps an SQL CLOB valueImplements java. Sets the designated parameter to the given |
| public void | setClob(@Positive int
index of the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Reader An object that contains the data to set the parameter value to. reader, @NonNegative long the number of characters in the parameter data. length)Implements java. Sets the designated parameter to a |
| public void | setClob(@Positive int
index of the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Reader An object that contains the data to set the parameter value to. reader)Implements java. Sets the designated parameter to a |
| public void | setDate(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Date the parameter value x)Implements java. Sets the designated parameter to the given |
| public void | setDate(@Positive int
the first parameter is 1, the second is 2, ... i, @Nullable Date the parameter value d, @Nullable Calendar the cal)Calendar object the driver will use
to construct the dateImplements java. Sets the designated parameter to the given |
| private void | |
| public void | setDouble(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, double the parameter value x)Implements java. Sets the designated parameter to the given Java |
| public void | setFloat(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, float the parameter value x)Implements java. Sets the designated parameter to the given Java |
| public void | setInt(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, int the parameter value x)Implements java. Sets the designated parameter to the given Java |
| public void | setLong(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, long the parameter value x)Implements java. Sets the designated parameter to the given Java |
| private void | |
| public void | setNCharacterStream(@Positive int
of the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Reader the parameter value value, long the number of characters in the parameter data. length)Implements java. Sets the designated parameter to a |
| public void | setNCharacterStream(@Positive int
of the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Reader the parameter value value)Implements java. Sets the designated parameter to a |
| public void | setNClob(@Positive int
of the first parameter is 1, the second is 2, ... parameterIndex, @Nullable NClob the parameter value value)Implements java. Sets the designated parameter to a |
| public void | setNClob(@Positive int
index of the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Reader An object that contains the data to set the parameter value to. reader, @NonNegative long the number of characters in the parameter data. length)Implements java. Sets the designated parameter to a |
| public void | setNClob(@Positive int
index of the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Reader An object that contains the data to set the parameter value to. reader)Implements java. Sets the designated parameter to a |
| public void | setNString(@Positive int
of the first parameter is 1, the second is 2, ... parameterIndex, @Nullable String the parameter value value)Implements java. Sets the designated parameter to the given |
| public void | setNull(int
the first parameter is 1, the second is 2, ... parameterIndex, int the SQL type code defined in sqlType)java.sql.TypesImplements java. Sets the designated parameter to SQL |
| public void | setNull(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, int a value from t, @Nullable String java.sql.Typesthe fully-qualified name of an SQL user-defined type;
ignored if the parameter is not a user-defined type or REF typeName)Implements java. Sets the designated parameter to SQL |
| private void | |
| public void | setObject(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Object the object containing the input parameter value in, int the SQL type (as defined in java.sql.Types) to be
sent to the database. The scale argument may further qualify this type. targetSqlType, int for scale)java.sql.Types.DECIMAL
or java.sql.Types.NUMERIC types,
this is the number of digits after the decimal point. For
Java Object types InputStream and Reader,
this is the length
of the data in the stream or reader. For all other types,
this value will be ignored.Implements java. Sets the value of the designated parameter with the given object. |
| public void | setObject(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Object the object containing the input parameter value x, int the SQL type (as defined in java.sql.Types) to be
sent to the database targetSqlType)Implements java. Sets the value of the designated parameter with the given object. |
| public void | setObject(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Object the object containing the input parameter value x)Implements java. Sets the value of the designated parameter using the given object. |
| public void | setObject(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Object the object containing the input parameter value x, SQLType the SQL type to be sent to the database. The
scale argument may further qualify this type. targetSqlType, int for scaleOrLength)java.sql.JDBCType.DECIMAL
or java.sql.JDBCType.NUMERIC types,
this is the number of digits after the decimal point. For
Java Object types InputStream and Reader,
this is the length
of the data in the stream or reader. For all other types,
this value will be ignored.Overrides default java. Sets the value of the designated parameter with the given object. |
| public void | setObject(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Object the object containing the input parameter value x, SQLType the SQL type to be sent to the database targetSqlType)Overrides default java. Sets the value of the designated parameter with the given object. |
| private <A extends @NonNull Object> void | |
| private void | |
| public void | setRef(@Positive int
the first parameter is 1, the second is 2, ... i, @Nullable Ref an SQL x)REF valueImplements java. Sets the designated parameter to the given
|
| public void | setRowId(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable RowId the parameter value x)Implements java. Sets the designated parameter to the given |
| public void | setShort(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, short the parameter value x)Implements java. Sets the designated parameter to the given Java |
| public void | setSQLXML(@Positive int
index of the first parameter is 1, the second is 2, ... parameterIndex, @Nullable SQLXML a xmlObject)SQLXML object that maps an SQL XML valueImplements java. Sets the designated parameter to the given |
| public void | setString(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable String the parameter value x)Implements java. Sets the designated parameter to the given Java |
| protected void | |
| public void | setTime(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Time the parameter value x)Implements java. Sets the designated parameter to the given |
| public void | setTime(@Positive int
the first parameter is 1, the second is 2, ... i, @Nullable Time the parameter value t, @Nullable Calendar the cal)Calendar object the driver will use
to construct the timeImplements java. Sets the designated parameter to the given |
| private void | |
| private void | |
| public void | setTimestamp(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable Timestamp the parameter value x)Implements java. Sets the designated parameter to the given |
| public void | setTimestamp(@Positive int
the first parameter is 1, the second is 2, ... i, @Nullable Timestamp the parameter value t, @Nullable Calendar the cal)Calendar object the driver will use
to construct the timestampImplements java. Sets the designated parameter to the given |
| private void | |
| private void | |
| public void | setUnicodeStream(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable InputStream a x, @NonNegative int java.io.InputStream object that contains the
Unicode parameter valuethe number of bytes in the stream length)Implements java. Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
| public void | setURL(@Positive int
the first parameter is 1, the second is 2, ... parameterIndex, @Nullable URL the x)java.net.URL object to be setImplements java. Sets the designated parameter to the given |
| private void | |
| public String | Returns: SQL statement with the current template values substitutedOverrides java. Returns the SQL statement with the current template values substituted. |
| protected void |