public static class FlightSqlClient.PreparedStatement extends Object implements AutoCloseable
Constructor and Description |
---|
PreparedStatement(FlightClient client,
String sql,
CallOption... options)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkOpen()
Checks whether this client is open.
|
void |
clearParameters()
Closes the
parameterBindingRoot , which contains the parameter binding from
a FlightSqlClient.PreparedStatement operation, releasing its resources. |
void |
close() |
void |
close(CallOption... options)
Closes the client.
|
FlightInfo |
execute(CallOption... options)
Executes the prepared statement query on the server.
|
long |
executeUpdate(CallOption... options)
Executes the prepared statement update on the server.
|
Schema |
getParameterSchema()
Returns the Schema of the parameters.
|
Schema |
getResultSetSchema()
Returns the Schema of the resultset.
|
boolean |
isClosed()
Returns if the prepared statement is already closed.
|
void |
setParameters(VectorSchemaRoot parameterBindingRoot)
Set the
parameterBindingRoot containing the parameter binding from a FlightSqlClient.PreparedStatement
operation. |
public PreparedStatement(FlightClient client, String sql, CallOption... options)
client
- The client. PreparedStatement does not maintain this resource.sql
- The query.options
- RPC-layer hints for this call.public void setParameters(VectorSchemaRoot parameterBindingRoot)
parameterBindingRoot
containing the parameter binding from a FlightSqlClient.PreparedStatement
operation.parameterBindingRoot
- a VectorSchemaRoot
object containing the values to be used in the
PreparedStatement
setters.public void clearParameters()
parameterBindingRoot
, which contains the parameter binding from
a FlightSqlClient.PreparedStatement
operation, releasing its resources.public Schema getResultSetSchema()
public Schema getParameterSchema()
public FlightInfo execute(CallOption... options) throws SQLException
options
- RPC-layer hints for this call.SQLException
protected final void checkOpen()
IllegalStateException
- if client is closed.public long executeUpdate(CallOption... options)
options
- RPC-layer hints for this call.public void close(CallOption... options)
options
- RPC-layer hints for this call.public void close()
close
in interface AutoCloseable
public boolean isClosed()
Copyright © 2022 The Apache Software Foundation. All rights reserved.