Class JniStatement
- All Implemented Interfaces:
AutoCloseable,AdbcOptions,AdbcStatement,HasChildReferences
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.arrow.adbc.core.AdbcStatement
AdbcStatement.PartitionResult, AdbcStatement.QueryResult, AdbcStatement.UpdateResult -
Constructor Summary
ConstructorsConstructorDescriptionJniStatement(BufferAllocator allocator, HasChildReferences parent, NativeStatementHandle handle) -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(ArrowReader reader) Bind an ArrowReader to provide parameter values/bulk data ingestion.voidbind(VectorSchemaRoot root) Bind a VectorSchemaRoot to provide parameter values/bulk data ingestion.voidcancel()Cancel execution of a query.voidclose()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.Get the schema of the result set without executing the query.Execute a query.doubleGet the upper bound of the progress.<T> TGet a generic option.Get the schema for bound parameters.doubleGet the progress of executing a query.Execute a result set-generating query and get a list of partitions of the result set.voidprepare()Turn this statement into a prepared statement.<T> voidSet a generic option.voidsetSqlQuery(String query) Set a SQL query to be executed on this statement.voidsetSubstraitPlan(ByteBuffer plan) Set a Substrait plan to be executed on this statement.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.arrow.adbc.core.AdbcStatement
setOption
-
Constructor Details
-
JniStatement
public JniStatement(BufferAllocator allocator, HasChildReferences parent, NativeStatementHandle handle)
-
-
Method Details
-
getChildReferences
- Specified by:
getChildReferencesin interfaceHasChildReferences
-
cancel
Description copied from interface:AdbcStatementCancel execution of a query.This can be used to interrupt execution of a method like
AdbcStatement.executeQuery().This method must be thread-safe (other method are not necessarily thread-safe).
- Specified by:
cancelin interfaceAdbcStatement- Throws:
AdbcException
-
setSqlQuery
Description copied from interface:AdbcStatementSet a SQL query to be executed on this statement.- Specified by:
setSqlQueryin interfaceAdbcStatement- Parameters:
query- The SQL query.- Throws:
AdbcException
-
setSubstraitPlan
Description copied from interface:AdbcStatementSet a Substrait plan to be executed on this statement.- Specified by:
setSubstraitPlanin interfaceAdbcStatement- Parameters:
plan- The serialized Substrait plan.- Throws:
AdbcException
-
bind
Description copied from interface:AdbcStatementBind a VectorSchemaRoot to provide parameter values/bulk data ingestion.The statement will NOT close the root after use/on close/when other data is bound.
- Specified by:
bindin interfaceAdbcStatement- Throws:
AdbcException
-
bind
Description copied from interface:AdbcStatementBind an ArrowReader to provide parameter values/bulk data ingestion.The statement will close the reader after use/on close/when other data is bound.
- Specified by:
bindin interfaceAdbcStatement- Throws:
AdbcException
-
executePartitioned
Description copied from interface:AdbcStatementExecute 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:
executePartitionedin interfaceAdbcStatement- Throws:
AdbcException
-
executeQuery
Description copied from interface:AdbcStatementExecute a result set-generating query and get the result.This may invalidate any prior result sets.
- Specified by:
executeQueryin interfaceAdbcStatement- Throws:
AdbcException
-
executeUpdate
Description copied from interface:AdbcStatementExecute a query.This may invalidate any prior result sets.
- Specified by:
executeUpdatein interfaceAdbcStatement- Throws:
AdbcException
-
executeSchema
Description copied from interface:AdbcStatementGet the schema of the result set without executing the query.- Specified by:
executeSchemain interfaceAdbcStatement- Throws:
AdbcException
-
getParameterSchema
Description copied from interface:AdbcStatementGet 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:
getParameterSchemain interfaceAdbcStatement- Throws:
AdbcException- withAdbcStatusCode.NOT_IMPLEMENTEDif the parameters cannot be determined at all.
-
prepare
Description copied from interface:AdbcStatementTurn this statement into a prepared statement.Call
AdbcStatement.executeQuery(),AdbcStatement.executeUpdate(), orAdbcStatement.executePartitioned()to execute the query.- Specified by:
preparein interfaceAdbcStatement- Throws:
AdbcException
-
getProgress
Description copied from interface:AdbcStatementGet the progress of executing a query.- Specified by:
getProgressin interfaceAdbcStatement- Throws:
AdbcException
-
getMaxProgress
Description copied from interface:AdbcStatementGet the upper bound of the progress.- Specified by:
getMaxProgressin interfaceAdbcStatement- Throws:
AdbcException
-
pollPartitioned
Description copied from interface:AdbcStatementExecute 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:
pollPartitionedin interfaceAdbcStatement- Throws:
AdbcException
-
close
- Specified by:
closein interfaceAdbcStatement- Specified by:
closein interfaceAutoCloseable- Throws:
AdbcException
-
getOption
Description copied from interface:AdbcOptionsGet a generic option.- Specified by:
getOptionin interfaceAdbcOptions- Type Parameters:
T- The option value type.- Parameters:
key- The option to retrieve.- Returns:
- The option value.
- Throws:
AdbcException
-
setOption
Description copied from interface:AdbcOptionsSet a generic option.- Specified by:
setOptionin interfaceAdbcOptions- Type Parameters:
T- The option value type.- Parameters:
key- The option to set.value- The option value.- Throws:
AdbcException
-