Class FlightSqlClient
public class FlightSqlClient
- Inheritance
-
FlightSqlClient
- Inherited Members
Constructors
FlightSqlClient(FlightClient)
public FlightSqlClient(FlightClient client)
Parameters
client
FlightClient
Methods
BeginTransactionAsync(FlightCallOptions?, CancellationToken)
Begin a new transaction.
public Task<Transaction> BeginTransactionAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
request
FlightInfoCancelRequestThe CancelFlightInfoRequest.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
info
FlightInfoThe FlightInfo of the query to cancel.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
transaction
TransactionThe transaction.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
action
FlightActionThe action to be performed
options
FlightCallOptionsPer-RPC options
cancellationToken
CancellationTokenCancellation 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
ticket
FlightTicketThe flight ticket to use
options
FlightCallOptionsPer-RPC options
cancellationToken
CancellationToken
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
descriptor
FlightDescriptorThe descriptor of the stream.
recordBatch
RecordBatchThe record for the data to upload.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
query
stringThe UTF8-encoded SQL query to be executed.
transaction
TransactionA transaction to associate this query with.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationTokenCancellation 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
query
stringThe UTF8-encoded SQL query to be executed.
transaction
TransactionA transaction to associate this query with. Defaults to no transaction if not provided.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationTokenCancellation token
Returns
GetCatalogsAsync(FlightCallOptions?, CancellationToken)
Request a list of catalogs.
public Task<FlightInfo> GetCatalogsAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationTokenCancellation 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
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationTokenCancellation 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
pkTableRef
TableRefThe table reference that exports the key.
fkTableRef
TableRefThe table reference that imports the key.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
catalog
stringThe catalog.
dbSchemaFilterPattern
stringThe schema filter pattern.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationTokenCancellation 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
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationTokenCancellation 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
query
stringThe UTF8-encoded SQL query
transaction
TransactionA transaction to associate this query with
options
FlightCallOptionsPer-RPC options
cancellationToken
CancellationTokenCancellation 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
tableRef
TableRefThe table reference.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
tableRef
TableRefThe table reference.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
descriptor
FlightDescriptorThe descriptor of the dataset request, whether a named dataset or a command.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationTokenCancellation 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
tableRef
TableRefThe table reference.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
tableRef
TableRefThe table reference.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
descriptor
FlightDescriptorThe descriptor of the dataset request, whether a named dataset or a command.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationTokenCancellation 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
sqlInfo
List<int>The SQL info required.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
Returns
GetTableTypesAsync(FlightCallOptions?, CancellationToken)
Request a list of table types.
public Task<FlightInfo> GetTableTypesAsync(FlightCallOptions? options = null, CancellationToken cancellationToken = default)
Parameters
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
catalog
stringThe catalog.
dbSchemaFilterPattern
stringThe schema filter pattern.
tableFilterPattern
stringThe table filter pattern.
includeSchema
boolTrue to include the schema upon return, false to not include the schema.
tableTypes
IEnumerable<string>The table types to include.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
dataType
intThe data type to search for as filtering.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
query
stringThe query that will be executed.
transaction
TransactionA transaction to associate this query with.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
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
transaction
TransactionThe transaction to rollback.
options
FlightCallOptionsRPC-layer hints for this call.
cancellationToken
CancellationToken
Returns
- AsyncServerStreamingCall<FlightResult>
A Task representing the asynchronous operation.