Class FlightSqlClient
public class FlightSqlClient
- Inheritance
-
FlightSqlClient
- Inherited Members
Constructors
FlightSqlClient(FlightClient)
public FlightSqlClient(FlightClient client)
Parameters
clientFlightClient
Methods
BeginTransactionAsync(FlightCallOptions?, CancellationToken)
Begin a new transaction.
public Task<Transaction> BeginTransactionAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<Transaction>
A Task representing the asynchronous operation. The task result contains the Transaction object representing the new transaction.
CancelFlightInfoAsync(FlightInfoCancelRequest, FlightCallOptions?, CancellationToken)
Explicitly cancel a FlightInfo.
public Task<FlightInfoCancelResult> CancelFlightInfoAsync(FlightInfoCancelRequest request, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
requestFlightInfoCancelRequestThe CancelFlightInfoRequest.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<FlightInfoCancelResult>
A Task representing the asynchronous operation. The task result contains the CancelFlightInfoResult describing the canceled result.
CancelQueryAsync(FlightInfo, FlightCallOptions?, CancellationToken)
Explicitly cancel a query.
public Task<FlightInfoCancelResult> CancelQueryAsync(FlightInfo info, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
infoFlightInfoThe FlightInfo of the query to cancel.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<FlightInfoCancelResult>
A Task representing the asynchronous operation.
CommitAsync(Transaction, FlightCallOptions?, CancellationToken)
Commit a transaction. After this, the transaction and all associated savepoints will be invalidated.
public AsyncServerStreamingCall<FlightResult> CommitAsync(Transaction transaction, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
transactionTransactionThe transaction.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- AsyncServerStreamingCall<FlightResult>
A Task representing the asynchronous operation.
DoActionAsync(FlightAction, FlightCallOptions?, CancellationToken)
Perform the indicated action, returning an iterator to the stream of results, if any.
public IAsyncEnumerable<FlightResult> DoActionAsync(FlightAction action, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
actionFlightActionThe action to be performed
optionsFlightCallOptionsPer-RPC options
cancellationTokenCancellationTokenCancellation token
Returns
- IAsyncEnumerable<FlightResult>
An async enumerable of results
DoGetAsync(FlightTicket, FlightCallOptions?, CancellationToken)
Given a flight ticket and schema, request to be sent the stream. Returns record batch stream reader.
public IAsyncEnumerable<RecordBatch> DoGetAsync(FlightTicket ticket, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
ticketFlightTicketThe flight ticket to use
optionsFlightCallOptionsPer-RPC options
cancellationTokenCancellationToken
Returns
- IAsyncEnumerable<RecordBatch>
The returned RecordBatchReader
DoPutAsync(FlightDescriptor, RecordBatch, FlightCallOptions?, CancellationToken)
Upload data to a Flight described by the given descriptor. The caller must call Close() on the returned stream once they are done writing.
public Task<FlightPutResult> DoPutAsync(FlightDescriptor descriptor, RecordBatch recordBatch, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
descriptorFlightDescriptorThe descriptor of the stream.
recordBatchRecordBatchThe record for the data to upload.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<FlightPutResult>
A Task representing the asynchronous operation. The task result contains a DoPutResult struct holding a reader and a writer.
ExecuteAsync(string, Transaction, FlightCallOptions?, CancellationToken)
Execute a SQL query on the server.
public Task<FlightInfo> ExecuteAsync(string query, Transaction transaction = default, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
querystringThe UTF8-encoded SQL query to be executed.
transactionTransactionA transaction to associate this query with.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationTokenCancellation token
Returns
- Task<FlightInfo>
The FlightInfo describing where to access the dataset.
ExecuteUpdateAsync(string, Transaction, FlightCallOptions?, CancellationToken)
Executes an update SQL command and returns the number of affected rows.
public Task<long> ExecuteUpdateAsync(string query, Transaction transaction = default, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
querystringThe UTF8-encoded SQL query to be executed.
transactionTransactionA transaction to associate this query with. Defaults to no transaction if not provided.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationTokenCancellation token
Returns
GetCatalogsAsync(FlightCallOptions?, CancellationToken)
Request a list of catalogs.
public Task<FlightInfo> GetCatalogsAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationTokenCancellation token
Returns
- Task<FlightInfo>
The FlightInfo describing where to access the dataset.
GetCatalogsSchemaAsync(FlightCallOptions?, CancellationToken)
Get the catalogs schema from the server.
public Task<Schema> GetCatalogsSchemaAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationTokenCancellation token
Returns
GetCrossReferenceAsync(TableRef, TableRef, FlightCallOptions?, CancellationToken)
Retrieves a description of the foreign key columns in the given foreign key table that reference the primary key or the columns representing a unique constraint of the parent table.
public Task<FlightInfo> GetCrossReferenceAsync(TableRef pkTableRef, TableRef fkTableRef, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
pkTableRefTableRefThe table reference that exports the key.
fkTableRefTableRefThe table reference that imports the key.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<FlightInfo>
The FlightInfo describing where to access the dataset.
GetCrossReferenceSchemaAsync(FlightCallOptions?, CancellationToken)
Get the cross-reference schema from the server.
public Task<Schema> GetCrossReferenceSchemaAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
GetDbSchemasAsync(string?, string?, FlightCallOptions?, CancellationToken)
Request a list of database schemas.
public Task<FlightInfo> GetDbSchemasAsync(string? catalog = null, string? dbSchemaFilterPattern = null, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
catalogstringThe catalog.
dbSchemaFilterPatternstringThe schema filter pattern.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationTokenCancellation token
Returns
- Task<FlightInfo>
The FlightInfo describing where to access the dataset.
GetDbSchemasSchemaAsync(FlightCallOptions?, CancellationToken)
Get the database schemas schema from the server.
public Task<Schema> GetDbSchemasSchemaAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationTokenCancellation token
Returns
GetExecuteSchemaAsync(string, Transaction, FlightCallOptions?, CancellationToken)
Get the result set schema from the server for the given query.
public Task<Schema> GetExecuteSchemaAsync(string query, Transaction transaction = default, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
querystringThe UTF8-encoded SQL query
transactionTransactionA transaction to associate this query with
optionsFlightCallOptionsPer-RPC options
cancellationTokenCancellationTokenCancellation token
Returns
GetExportedKeysAsync(TableRef, FlightCallOptions?, CancellationToken)
Retrieves a description about the foreign key columns that reference the primary key columns of the given table.
public Task<FlightInfo> GetExportedKeysAsync(TableRef tableRef, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
tableRefTableRefThe table reference.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<FlightInfo>
The FlightInfo describing where to access the dataset.
GetExportedKeysSchemaAsync(TableRef, FlightCallOptions?, CancellationToken)
Get the exported keys schema from the server.
public Task<Schema> GetExportedKeysSchemaAsync(TableRef tableRef, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
tableRefTableRefThe table reference.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
GetFlightInfoAsync(FlightDescriptor, FlightCallOptions?, CancellationToken)
Asynchronously retrieves flight information for a given flight descriptor.
public Task<FlightInfo> GetFlightInfoAsync(FlightDescriptor descriptor, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
descriptorFlightDescriptorThe descriptor of the dataset request, whether a named dataset or a command.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationTokenCancellation token
Returns
- Task<FlightInfo>
A task that represents the asynchronous operation. The task result contains the FlightInfo describing where to access the dataset.
GetImportedKeysAsync(TableRef, FlightCallOptions?, CancellationToken)
Retrieves the foreign key columns for the given table.
public Task<FlightInfo> GetImportedKeysAsync(TableRef tableRef, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
tableRefTableRefThe table reference.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<FlightInfo>
The FlightInfo describing where to access the dataset.
GetImportedKeysSchemaAsync(FlightCallOptions?, CancellationToken)
Get the imported keys schema from the server.
public Task<Schema> GetImportedKeysSchemaAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
GetPrimaryKeysAsync(TableRef, FlightCallOptions?, CancellationToken)
Request the primary keys for a table.
public Task<FlightInfo> GetPrimaryKeysAsync(TableRef tableRef, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
tableRefTableRefThe table reference.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<FlightInfo>
The FlightInfo describing where to access the dataset.
GetSchemaAsync(FlightDescriptor, FlightCallOptions?, CancellationToken)
Asynchronously retrieves schema information for a given flight descriptor.
public virtual Task<Schema> GetSchemaAsync(FlightDescriptor descriptor, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
descriptorFlightDescriptorThe descriptor of the dataset request, whether a named dataset or a command.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationTokenCancellation token
Returns
- Task<Schema>
A task that represents the asynchronous operation. The task result contains the SchemaResult describing the dataset schema.
GetSqlInfoAsync(List<int>?, FlightCallOptions?, CancellationToken)
Request a list of SQL information.
public Task<FlightInfo> GetSqlInfoAsync(List<int>? sqlInfo = null, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
sqlInfoList<int>The SQL info required.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<FlightInfo>
The FlightInfo describing where to access the dataset.
GetSqlInfoSchemaAsync(FlightCallOptions?, CancellationToken)
Get the SQL information schema from the server.
public Task<Schema> GetSqlInfoSchemaAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
GetTableTypesAsync(FlightCallOptions?, CancellationToken)
Request a list of table types.
public Task<FlightInfo> GetTableTypesAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<FlightInfo>
The FlightInfo describing where to access the dataset.
GetTableTypesSchemaAsync(FlightCallOptions?, CancellationToken)
Get the table types schema from the server.
public Task<Schema> GetTableTypesSchemaAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
GetTablesAsync(string?, string?, string?, bool, IEnumerable<string>?, FlightCallOptions?, CancellationToken)
Request a list of tables.
public Task<IEnumerable<FlightInfo>> GetTablesAsync(string? catalog = null, string? dbSchemaFilterPattern = null, string? tableFilterPattern = null, bool includeSchema = false, IEnumerable<string>? tableTypes = null, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
catalogstringThe catalog.
dbSchemaFilterPatternstringThe schema filter pattern.
tableFilterPatternstringThe table filter pattern.
includeSchemaboolTrue to include the schema upon return, false to not include the schema.
tableTypesIEnumerable<string>The table types to include.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<IEnumerable<FlightInfo>>
The FlightInfo describing where to access the dataset.
GetXdbcTypeInfoAsync(FlightCallOptions?, CancellationToken)
Request the information about all the data types supported.
public Task<FlightInfo> GetXdbcTypeInfoAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<FlightInfo>
The FlightInfo describing where to access the dataset.
GetXdbcTypeInfoAsync(int, FlightCallOptions?, CancellationToken)
Request the information about all the data types supported with filtering by data type.
public Task<FlightInfo> GetXdbcTypeInfoAsync(int dataType, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
dataTypeintThe data type to search for as filtering.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<FlightInfo>
The FlightInfo describing where to access the dataset.
GetXdbcTypeInfoSchemaAsync(FlightCallOptions?, CancellationToken)
Get the type info schema from the server.
public Task<Schema> GetXdbcTypeInfoSchemaAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
PrepareAsync(string, Transaction, FlightCallOptions?, CancellationToken)
Create a prepared statement object.
public Task<PreparedStatement> PrepareAsync(string query, Transaction transaction = default, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
querystringThe query that will be executed.
transactionTransactionA transaction to associate this query with.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- Task<PreparedStatement>
The created prepared statement.
RollbackAsync(Transaction, FlightCallOptions?, CancellationToken)
Rollback a transaction. After this, the transaction and all associated savepoints will be invalidated.
public AsyncServerStreamingCall<FlightResult> RollbackAsync(Transaction transaction, FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
transactionTransactionThe transaction to rollback.
optionsFlightCallOptionsRPC-layer hints for this call.
cancellationTokenCancellationToken
Returns
- AsyncServerStreamingCall<FlightResult>
A Task representing the asynchronous operation.