Class FlightSqlScenarioProducer
java.lang.Object
org.apache.arrow.flight.integration.tests.FlightSqlScenarioProducer
- All Implemented Interfaces:
AutoCloseable
,FlightProducer
,FlightSqlProducer
Hardcoded Flight SQL producer used for cross-language integration tests.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.arrow.flight.FlightProducer
FlightProducer.CallContext, FlightProducer.ServerStreamListener, FlightProducer.StreamListener<T>
Nested classes/interfaces inherited from interface org.apache.arrow.flight.sql.FlightSqlProducer
FlightSqlProducer.Schemas
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionacceptPutPreparedStatementQuery
(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Accepts uploaded parameter values for a particular prepared statement query.acceptPutPreparedStatementUpdate
(FlightSql.CommandPreparedStatementUpdate command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Accepts uploaded data for a particular prepared statement data stream.acceptPutStatement
(FlightSql.CommandStatementUpdate command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Accepts uploaded data for a particular SQL query based data stream.acceptPutSubstraitPlan
(FlightSql.CommandStatementSubstraitPlan command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Handle a Substrait plan with uploaded data.void
beginSavepoint
(FlightSql.ActionBeginSavepointRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<FlightSql.ActionBeginSavepointResult> listener) Create a savepoint within a transaction.void
beginTransaction
(FlightSql.ActionBeginTransactionRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<FlightSql.ActionBeginTransactionResult> listener) Begin a transaction.void
cancelQuery
(FlightInfo info, FlightProducer.CallContext context, FlightProducer.StreamListener<CancelResult> listener) Explicitly cancel a query.void
close()
void
closePreparedStatement
(FlightSql.ActionClosePreparedStatementRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener) Closes a prepared statement on the server.void
createPreparedStatement
(FlightSql.ActionCreatePreparedStatementRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener) Creates a prepared statement on the server and returns a handle and metadata for in aFlightSql.ActionCreatePreparedStatementResult
object in aResult
object.void
createPreparedSubstraitPlan
(FlightSql.ActionCreatePreparedSubstraitPlanRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<FlightSql.ActionCreatePreparedStatementResult> listener) Pre-compile a Substrait plan.void
endSavepoint
(FlightSql.ActionEndSavepointRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener) Release or roll back to a savepoint.void
endTransaction
(FlightSql.ActionEndTransactionRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener) Commit or roll back to a transaction.getFlightInfoCatalogs
(FlightSql.CommandGetCatalogs request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available catalogs by returning a stream ofFlightSql.CommandGetCatalogs
objects inResult
objects.getFlightInfoCrossReference
(FlightSql.CommandGetCrossReference request, FlightProducer.CallContext context, FlightDescriptor descriptor) Retrieve a description of the foreign key columns that reference the given table's primary key columnsFlightSql.CommandGetCrossReference
objects inResult
objects.getFlightInfoExportedKeys
(FlightSql.CommandGetExportedKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor) Retrieves a description of the foreign key columns that reference the given table's primary key columnsFlightSql.CommandGetExportedKeys
objects inResult
objects.getFlightInfoImportedKeys
(FlightSql.CommandGetImportedKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor) Retrieves a description of the primary key columns that are referenced by given table's foreign key columnsFlightSql.CommandGetImportedKeys
objects inResult
objects.getFlightInfoPreparedStatement
(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Gets information about a particular prepared statement data stream.getFlightInfoPrimaryKeys
(FlightSql.CommandGetPrimaryKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available primary keys by returning a stream ofFlightSql.CommandGetPrimaryKeys
objects inResult
objects.getFlightInfoSchemas
(FlightSql.CommandGetDbSchemas request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available schemas by returning a stream ofFlightSql.CommandGetDbSchemas
objects inResult
objects.getFlightInfoSqlInfo
(FlightSql.CommandGetSqlInfo request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the SQL Info of the server by returning aFlightSql.CommandGetSqlInfo
in aResult
.getFlightInfoStatement
(FlightSql.CommandStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Evaluate a SQL query.getFlightInfoSubstraitPlan
(FlightSql.CommandStatementSubstraitPlan command, FlightProducer.CallContext context, FlightDescriptor descriptor) Evaluate a Substrait plan.getFlightInfoTables
(FlightSql.CommandGetTables request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available tables by returning a stream ofFlightSql.CommandGetTables
objects inResult
objects.getFlightInfoTableTypes
(FlightSql.CommandGetTableTypes request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available table types by returning a stream ofFlightSql.CommandGetTableTypes
objects inResult
objects.getFlightInfoTypeInfo
(FlightSql.CommandGetXdbcTypeInfo request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns a description of all the data types supported by source.getSchemaPreparedStatement
(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Get the schema of the result set of a prepared statement.getSchemaStatement
(FlightSql.CommandStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Get the result schema for a SQL query.getSchemaSubstraitPlan
(FlightSql.CommandStatementSubstraitPlan command, FlightProducer.CallContext context, FlightDescriptor descriptor) Get the result schema for a Substrait plan.void
getStreamCatalogs
(FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for catalogs based data stream.void
getStreamCrossReference
(FlightSql.CommandGetCrossReference command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for cross reference based data stream.void
getStreamExportedKeys
(FlightSql.CommandGetExportedKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for foreign keys based data stream.void
getStreamImportedKeys
(FlightSql.CommandGetImportedKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for foreign keys based data stream.void
getStreamPreparedStatement
(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for a particular prepared statement query instance.void
getStreamPrimaryKeys
(FlightSql.CommandGetPrimaryKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for primary keys based data stream.void
getStreamSchemas
(FlightSql.CommandGetDbSchemas command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for schemas based data stream.void
getStreamSqlInfo
(FlightSql.CommandGetSqlInfo command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for SQL info based data stream.void
getStreamStatement
(FlightSql.TicketStatementQuery ticket, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for a SQL query based data stream.void
getStreamTables
(FlightSql.CommandGetTables command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for tables based data stream.void
getStreamTableTypes
(FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for table types based data stream.void
getStreamTypeInfo
(FlightSql.CommandGetXdbcTypeInfo request, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for type info based data stream.void
listFlights
(FlightProducer.CallContext context, Criteria criteria, FlightProducer.StreamListener<FlightInfo> listener) List available data streams on this service.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.arrow.flight.FlightProducer
doExchange, pollFlightInfo
Methods inherited from interface org.apache.arrow.flight.sql.FlightSqlProducer
acceptPut, cancelFlightInfo, closeSession, doAction, getFlightInfo, getSchema, getSessionOptions, getStream, listActions, renewFlightEndpoint, setSessionOptions
-
Constructor Details
-
FlightSqlScenarioProducer
-
-
Method Details
-
beginSavepoint
public void beginSavepoint(FlightSql.ActionBeginSavepointRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<FlightSql.ActionBeginSavepointResult> listener) Description copied from interface:FlightSqlProducer
Create a savepoint within a transaction.- Specified by:
beginSavepoint
in interfaceFlightSqlProducer
- Parameters:
request
- The savepoint request.context
- Per-call context.listener
- The newly created savepoint ID.
-
beginTransaction
public void beginTransaction(FlightSql.ActionBeginTransactionRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<FlightSql.ActionBeginTransactionResult> listener) Description copied from interface:FlightSqlProducer
Begin a transaction.- Specified by:
beginTransaction
in interfaceFlightSqlProducer
- Parameters:
request
- The transaction request.context
- Per-call context.listener
- The newly created transaction ID.
-
cancelQuery
public void cancelQuery(FlightInfo info, FlightProducer.CallContext context, FlightProducer.StreamListener<CancelResult> listener) Description copied from interface:FlightSqlProducer
Explicitly cancel a query.- Specified by:
cancelQuery
in interfaceFlightSqlProducer
- Parameters:
info
- The FlightInfo of the query to cancel.context
- Per-call context.listener
- Whether cancellation succeeded.
-
createPreparedStatement
public void createPreparedStatement(FlightSql.ActionCreatePreparedStatementRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener) Description copied from interface:FlightSqlProducer
Creates a prepared statement on the server and returns a handle and metadata for in aFlightSql.ActionCreatePreparedStatementResult
object in aResult
object.- Specified by:
createPreparedStatement
in interfaceFlightSqlProducer
- Parameters:
request
- The sql command to generate the prepared statement.context
- Per-call context.listener
- A stream of responses.
-
createPreparedSubstraitPlan
public void createPreparedSubstraitPlan(FlightSql.ActionCreatePreparedSubstraitPlanRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<FlightSql.ActionCreatePreparedStatementResult> listener) Description copied from interface:FlightSqlProducer
Pre-compile a Substrait plan.- Specified by:
createPreparedSubstraitPlan
in interfaceFlightSqlProducer
- Parameters:
request
- The plan.context
- Per-call context.listener
- The resulting prepared statement.
-
closePreparedStatement
public void closePreparedStatement(FlightSql.ActionClosePreparedStatementRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener) Description copied from interface:FlightSqlProducer
Closes a prepared statement on the server. No result is expected.- Specified by:
closePreparedStatement
in interfaceFlightSqlProducer
- Parameters:
request
- The sql command to generate the prepared statement.context
- Per-call context.listener
- A stream of responses.
-
endSavepoint
public void endSavepoint(FlightSql.ActionEndSavepointRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener) Description copied from interface:FlightSqlProducer
Release or roll back to a savepoint.- Specified by:
endSavepoint
in interfaceFlightSqlProducer
- Parameters:
request
- The savepoint, and whether to release/rollback.context
- Per-call context.listener
- CallFlightProducer.StreamListener.onCompleted()
orFlightProducer.StreamListener.onError(Throwable)
when done; do not send a result.
-
endTransaction
public void endTransaction(FlightSql.ActionEndTransactionRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener) Description copied from interface:FlightSqlProducer
Commit or roll back to a transaction.- Specified by:
endTransaction
in interfaceFlightSqlProducer
- Parameters:
request
- The transaction, and whether to release/rollback.context
- Per-call context.listener
- CallFlightProducer.StreamListener.onCompleted()
orFlightProducer.StreamListener.onError(Throwable)
when done; do not send a result.
-
getFlightInfoStatement
public FlightInfo getFlightInfoStatement(FlightSql.CommandStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Evaluate a SQL query.- Specified by:
getFlightInfoStatement
in interfaceFlightSqlProducer
- Parameters:
command
- The SQL query.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getFlightInfoSubstraitPlan
public FlightInfo getFlightInfoSubstraitPlan(FlightSql.CommandStatementSubstraitPlan command, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Evaluate a Substrait plan.- Specified by:
getFlightInfoSubstraitPlan
in interfaceFlightSqlProducer
- Parameters:
command
- The Substrait plan.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getFlightInfoPreparedStatement
public FlightInfo getFlightInfoPreparedStatement(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Gets information about a particular prepared statement data stream.- Specified by:
getFlightInfoPreparedStatement
in interfaceFlightSqlProducer
- Parameters:
command
- The prepared statement to generate the data stream.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getSchemaStatement
public SchemaResult getSchemaStatement(FlightSql.CommandStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Get the result schema for a SQL query.- Specified by:
getSchemaStatement
in interfaceFlightSqlProducer
- Parameters:
command
- The SQL query.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- the schema of the result set.
-
getSchemaPreparedStatement
public SchemaResult getSchemaPreparedStatement(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Get the schema of the result set of a prepared statement.- Specified by:
getSchemaPreparedStatement
in interfaceFlightSqlProducer
- Parameters:
command
- The prepared statement handle.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- the schema of the result set.
-
getSchemaSubstraitPlan
public SchemaResult getSchemaSubstraitPlan(FlightSql.CommandStatementSubstraitPlan command, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Get the result schema for a Substrait plan.- Specified by:
getSchemaSubstraitPlan
in interfaceFlightSqlProducer
- Parameters:
command
- The Substrait plan.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Schema for the stream.
-
getStreamStatement
public void getStreamStatement(FlightSql.TicketStatementQuery ticket, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for a SQL query based data stream.- Specified by:
getStreamStatement
in interfaceFlightSqlProducer
- Parameters:
ticket
- Ticket message containing the statement handle.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getStreamPreparedStatement
public void getStreamPreparedStatement(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for a particular prepared statement query instance.- Specified by:
getStreamPreparedStatement
in interfaceFlightSqlProducer
- Parameters:
command
- The prepared statement to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
acceptPutStatement
public Runnable acceptPutStatement(FlightSql.CommandStatementUpdate command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Description copied from interface:FlightSqlProducer
Accepts uploaded data for a particular SQL query based data stream.`PutResult`s must be in the form of a
FlightSql.DoPutUpdateResult
.- Specified by:
acceptPutStatement
in interfaceFlightSqlProducer
- Parameters:
command
- The sql command to generate the data stream.context
- Per-call context.flightStream
- The data stream being uploaded.ackStream
- The result data stream.- Returns:
- A runnable to process the stream.
-
acceptPutSubstraitPlan
public Runnable acceptPutSubstraitPlan(FlightSql.CommandStatementSubstraitPlan command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Description copied from interface:FlightSqlProducer
Handle a Substrait plan with uploaded data.- Specified by:
acceptPutSubstraitPlan
in interfaceFlightSqlProducer
- Parameters:
command
- The Substrait plan to evaluate.context
- Per-call context.flightStream
- The data stream being uploaded.ackStream
- The result data stream.- Returns:
- A runnable to process the stream.
-
acceptPutPreparedStatementUpdate
public Runnable acceptPutPreparedStatementUpdate(FlightSql.CommandPreparedStatementUpdate command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Description copied from interface:FlightSqlProducer
Accepts uploaded data for a particular prepared statement data stream.`PutResult`s must be in the form of a
FlightSql.DoPutUpdateResult
.- Specified by:
acceptPutPreparedStatementUpdate
in interfaceFlightSqlProducer
- Parameters:
command
- The prepared statement to generate the data stream.context
- Per-call context.flightStream
- The data stream being uploaded.ackStream
- The result data stream.- Returns:
- A runnable to process the stream.
-
acceptPutPreparedStatementQuery
public Runnable acceptPutPreparedStatementQuery(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Description copied from interface:FlightSqlProducer
Accepts uploaded parameter values for a particular prepared statement query.- Specified by:
acceptPutPreparedStatementQuery
in interfaceFlightSqlProducer
- Parameters:
command
- The prepared statement the parameter values will bind to.context
- Per-call context.flightStream
- The data stream being uploaded.ackStream
- The result data stream.- Returns:
- A runnable to process the stream.
-
getFlightInfoSqlInfo
public FlightInfo getFlightInfoSqlInfo(FlightSql.CommandGetSqlInfo request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns the SQL Info of the server by returning aFlightSql.CommandGetSqlInfo
in aResult
.- Specified by:
getFlightInfoSqlInfo
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamSqlInfo
public void getStreamSqlInfo(FlightSql.CommandGetSqlInfo command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for SQL info based data stream.- Specified by:
getStreamSqlInfo
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getStreamTypeInfo
public void getStreamTypeInfo(FlightSql.CommandGetXdbcTypeInfo request, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for type info based data stream.- Specified by:
getStreamTypeInfo
in interfaceFlightSqlProducer
context
- Per-call context.listener
- An interface for sending data back to the client.
-
getFlightInfoTypeInfo
public FlightInfo getFlightInfoTypeInfo(FlightSql.CommandGetXdbcTypeInfo request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns a description of all the data types supported by source.- Specified by:
getFlightInfoTypeInfo
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getFlightInfoCatalogs
public FlightInfo getFlightInfoCatalogs(FlightSql.CommandGetCatalogs request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns the available catalogs by returning a stream ofFlightSql.CommandGetCatalogs
objects inResult
objects.- Specified by:
getFlightInfoCatalogs
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamCatalogs
public void getStreamCatalogs(FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for catalogs based data stream.- Specified by:
getStreamCatalogs
in interfaceFlightSqlProducer
- Parameters:
context
- Per-call context.listener
- An interface for sending data back to the client.
-
getFlightInfoSchemas
public FlightInfo getFlightInfoSchemas(FlightSql.CommandGetDbSchemas request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns the available schemas by returning a stream ofFlightSql.CommandGetDbSchemas
objects inResult
objects.- Specified by:
getFlightInfoSchemas
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamSchemas
public void getStreamSchemas(FlightSql.CommandGetDbSchemas command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for schemas based data stream.- Specified by:
getStreamSchemas
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getFlightInfoTables
public FlightInfo getFlightInfoTables(FlightSql.CommandGetTables request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns the available tables by returning a stream ofFlightSql.CommandGetTables
objects inResult
objects.- Specified by:
getFlightInfoTables
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamTables
public void getStreamTables(FlightSql.CommandGetTables command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for tables based data stream.- Specified by:
getStreamTables
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getFlightInfoTableTypes
public FlightInfo getFlightInfoTableTypes(FlightSql.CommandGetTableTypes request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns the available table types by returning a stream ofFlightSql.CommandGetTableTypes
objects inResult
objects.- Specified by:
getFlightInfoTableTypes
in interfaceFlightSqlProducer
context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamTableTypes
public void getStreamTableTypes(FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for table types based data stream.- Specified by:
getStreamTableTypes
in interfaceFlightSqlProducer
- Parameters:
context
- Per-call context.listener
- An interface for sending data back to the client.
-
getFlightInfoPrimaryKeys
public FlightInfo getFlightInfoPrimaryKeys(FlightSql.CommandGetPrimaryKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns the available primary keys by returning a stream ofFlightSql.CommandGetPrimaryKeys
objects inResult
objects.- Specified by:
getFlightInfoPrimaryKeys
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamPrimaryKeys
public void getStreamPrimaryKeys(FlightSql.CommandGetPrimaryKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for primary keys based data stream.- Specified by:
getStreamPrimaryKeys
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getFlightInfoExportedKeys
public FlightInfo getFlightInfoExportedKeys(FlightSql.CommandGetExportedKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Retrieves a description of the foreign key columns that reference the given table's primary key columnsFlightSql.CommandGetExportedKeys
objects inResult
objects.- Specified by:
getFlightInfoExportedKeys
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getFlightInfoImportedKeys
public FlightInfo getFlightInfoImportedKeys(FlightSql.CommandGetImportedKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Retrieves a description of the primary key columns that are referenced by given table's foreign key columnsFlightSql.CommandGetImportedKeys
objects inResult
objects.- Specified by:
getFlightInfoImportedKeys
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getFlightInfoCrossReference
public FlightInfo getFlightInfoCrossReference(FlightSql.CommandGetCrossReference request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Retrieve a description of the foreign key columns that reference the given table's primary key columnsFlightSql.CommandGetCrossReference
objects inResult
objects.- Specified by:
getFlightInfoCrossReference
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamExportedKeys
public void getStreamExportedKeys(FlightSql.CommandGetExportedKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for foreign keys based data stream.- Specified by:
getStreamExportedKeys
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getStreamImportedKeys
public void getStreamImportedKeys(FlightSql.CommandGetImportedKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for foreign keys based data stream.- Specified by:
getStreamImportedKeys
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getStreamCrossReference
public void getStreamCrossReference(FlightSql.CommandGetCrossReference command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for cross reference based data stream.- Specified by:
getStreamCrossReference
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
listFlights
public void listFlights(FlightProducer.CallContext context, Criteria criteria, FlightProducer.StreamListener<FlightInfo> listener) Description copied from interface:FlightProducer
List available data streams on this service.- Specified by:
listFlights
in interfaceFlightProducer
- Parameters:
context
- Per-call context.criteria
- Application-defined criteria for filtering streams.listener
- An interface for sending data back to the client.
-