Class FlightSqlStatement
- All Implemented Interfaces:
AutoCloseable
,AdbcOptions
,AdbcStatement
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.arrow.adbc.core.AdbcStatement
AdbcStatement.PartitionResult, AdbcStatement.QueryResult, AdbcStatement.UpdateResult
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bind
(org.apache.arrow.vector.VectorSchemaRoot root) Bind this statement to a VectorSchemaRoot to provide parameter values/bulk data ingestion.void
close()
Execute a result set-generating query and get a list of partitions of the result set.Execute a result set-generating query and get the result.org.apache.arrow.vector.types.pojo.Schema
Get the schema of the result set without executing the query.Execute a query.org.apache.arrow.vector.types.pojo.Schema
Get the schema for bound parameters.void
prepare()
Turn this statement into a prepared statement.void
setSqlQuery
(String query) Set a SQL query to be executed on this statement.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.arrow.adbc.core.AdbcOptions
getOption, setOption
Methods inherited from interface org.apache.arrow.adbc.core.AdbcStatement
cancel, getMaxProgress, getProgress, pollPartitioned, setOption, setSubstraitPlan
-
Method Details
-
setSqlQuery
Description copied from interface:AdbcStatement
Set a SQL query to be executed on this statement.- Specified by:
setSqlQuery
in interfaceAdbcStatement
- Parameters:
query
- The SQL query.- Throws:
AdbcException
-
bind
public void bind(org.apache.arrow.vector.VectorSchemaRoot root) Description copied from interface:AdbcStatement
Bind this statement to a VectorSchemaRoot to provide parameter values/bulk data ingestion.- Specified by:
bind
in interfaceAdbcStatement
-
executePartitioned
Description copied from interface:AdbcStatement
Execute a result set-generating query and get a list of partitions of the result set.These can be serialized and deserialized for parallel and/or distributed fetching.
This may invalidate any prior result sets.
- Specified by:
executePartitioned
in interfaceAdbcStatement
- Throws:
AdbcException
-
executeQuery
Description copied from interface:AdbcStatement
Execute a result set-generating query and get the result.This may invalidate any prior result sets.
- Specified by:
executeQuery
in interfaceAdbcStatement
- Throws:
AdbcException
-
executeSchema
Description copied from interface:AdbcStatement
Get the schema of the result set without executing the query.- Specified by:
executeSchema
in interfaceAdbcStatement
- Throws:
AdbcException
-
executeUpdate
Description copied from interface:AdbcStatement
Execute a query.This may invalidate any prior result sets.
- Specified by:
executeUpdate
in interfaceAdbcStatement
- Throws:
AdbcException
-
getParameterSchema
Description copied from interface:AdbcStatement
Get the schema for bound parameters.This retrieves an Arrow schema describing the number, names, and types of the parameters in a parameterized statement. The fields of the schema should be in order of the ordinal position of the parameters; named parameters should appear only once.
If the parameter does not have a name, or the name cannot be determined, the name of the corresponding field in the schema will be an empty string. If the type cannot be determined, the type of the corresponding field will be NA (NullType).
This should be called after AdbcStatementPrepare.
- Specified by:
getParameterSchema
in interfaceAdbcStatement
- Throws:
AdbcException
- withAdbcStatusCode.NOT_IMPLEMENTED
if the parameters cannot be determined at all.
-
prepare
Description copied from interface:AdbcStatement
Turn this statement into a prepared statement.Call
AdbcStatement.executeQuery()
,AdbcStatement.executeUpdate()
, orAdbcStatement.executePartitioned()
to execute the query.- Specified by:
prepare
in interfaceAdbcStatement
- Throws:
AdbcException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-