Expand description
Support for execute SQL queries using Apache Arrow Flight SQL.
Flight SQL is built on top of Arrow Flight RPC framework, by
defining specific messages, encoded using the protobuf format,
sent in theFlightDescriptor::cmd
field to FlightService
endpoints such asget_flight_info
and do_get
.
This module contains:
- prost generated structs for FlightSQL messages such as
CommandStatementQuery
- Helpers for encoding and decoding FlightSQL messages:
Any
andCommand
- A
FlightSqlServiceClient
for interacting with FlightSQL servers. - A
FlightSqlService
to help building FlightSQL servers fromFlightService
. - Helpers to build responses for FlightSQL metadata APIs:
metadata
Modules§
- A FlightSQL Client
FlightSqlServiceClient
- gen 🔒
- Builders and function for building responses to FlightSQL metadata / information schema requests.
- Helper trait
FlightSqlService
for implementing aFlightService
that implements FlightSQL.
Macros§
- as_item 🔒Macro to coerce a token to an item, specifically to build the
Commands
enum.
Structs§
- Request message for the “BeginSavepoint” action. Creates a savepoint within a transaction.
- The result of a “BeginSavepoint” action.
- Request message for the “BeginTransaction” action. Begins a transaction.
- The result of a “BeginTransaction” action.
- Request message for the “CancelQuery” action.
- The result of cancelling a query.
- Request message for the “ClosePreparedStatement” action on a Flight SQL enabled backend. Closes server resources associated with the prepared statement handle.
- Request message for the “CreatePreparedStatement” action on a Flight SQL enabled backend.
- Wrap the result of a “CreatePreparedStatement” or “CreatePreparedSubstraitPlan” action.
- Request message for the “CreatePreparedSubstraitPlan” action on a Flight SQL enabled backend.
- Request message for the “EndSavepoint” action.
- Request message for the “EndTransaction” action.
- An implementation of the protobuf
Any
message type - Represents a request to retrieve the list of catalogs on a Flight SQL enabled backend. The definition of a catalog depends on vendor/implementation. It is usually the database itself Used in the command member of FlightDescriptor for the following RPC calls:
- Represents a request to retrieve 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 (could be the same or a different table) on a Flight SQL enabled backend. Used in the command member of FlightDescriptor for the following RPC calls:
- Represents a request to retrieve the list of database schemas on a Flight SQL enabled backend. The definition of a database schema depends on vendor/implementation. It is usually a collection of tables. Used in the command member of FlightDescriptor for the following RPC calls:
- Represents a request to retrieve a description of the foreign key columns that reference the given table’s primary key columns (the foreign keys exported by a table) of a table on a Flight SQL enabled backend. Used in the command member of FlightDescriptor for the following RPC calls:
- Represents a request to retrieve the foreign keys of a table on a Flight SQL enabled backend. Used in the command member of FlightDescriptor for the following RPC calls:
- Represents a request to retrieve the primary keys of a table on a Flight SQL enabled backend. Used in the command member of FlightDescriptor for the following RPC calls:
- Represents a metadata request. Used in the command member of FlightDescriptor for the following RPC calls:
- Represents a request to retrieve the list of table types on a Flight SQL enabled backend. The table types depend on vendor/implementation. It is usually used to separate tables from views or system tables. TABLE, VIEW, and SYSTEM TABLE are commonly supported. Used in the command member of FlightDescriptor for the following RPC calls:
- Represents a request to retrieve the list of tables, and optionally their schemas, on a Flight SQL enabled backend. Used in the command member of FlightDescriptor for the following RPC calls:
- Represents a request to retrieve information about data type supported on a Flight SQL enabled backend. Used in the command member of FlightDescriptor for the following RPC calls:
- Represents an instance of executing a prepared statement. Used in the command member of FlightDescriptor for the following RPC calls:
- Represents a SQL update query. Used in the command member of FlightDescriptor for the RPC call DoPut to cause the server to execute the included prepared statement handle as an update.
- Represents a bulk ingestion request. Used in the command member of FlightDescriptor for the the RPC call DoPut to cause the server load the contents of the stream’s FlightData into the target destination.
- Represents a SQL query. Used in the command member of FlightDescriptor for the following RPC calls:
- Represents a Substrait plan. Used in the command member of FlightDescriptor for the following RPC calls:
- Represents a SQL update query. Used in the command member of FlightDescriptor for the RPC call DoPut to cause the server to execute the included SQL update.
- An optional response returned when
DoPut
is called withCommandPreparedStatementQuery
. - Returned from the RPC call DoPut when a CommandStatementUpdate, CommandPreparedStatementUpdate, or CommandStatementIngest was in the request, containing results from the update.
- An embedded message describing a Substrait plan to execute.
- Options for table definition behavior
Enums§
- Helper to convert to/from protobuf
Any
message to a specific FlightSQL command message. - Options for CommandGetSqlInfo.
- The level of support for Flight SQL transaction RPCs.
- The action to take if the target table already exists
- The action to take if the target table does not exist
Constants§
Traits§
- ProstMessageExt are useful utility methods for prost::Message types