Module arrow_flight::sql
source · 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:
AnyandCommand - A
FlightSqlServiceClientfor interacting with FlightSQL servers. - A
FlightSqlServiceto help building FlightSQL servers fromFlightService.
Modules
- A FlightSQL Client
FlightSqlServiceClient - Helper trait
FlightSqlServicefor implementing aFlightServicethat implements FlightSQL.
Structs
- 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 “GetPreparedStatement” action.
- An implementation of the protobuf
Anymessage 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 the RPC call DoPut to cause the server to execute the included prepared statement handle as an update.
- Represents a SQL query. 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 the RPC call DoPut to cause the server to execute the included SQL update.
- Returned from the RPC call DoPut when a CommandStatementUpdate CommandPreparedStatementUpdate was in the request, containing results from the update.
Enums
- Helper to convert to/from protobuf
Anymessage to a specific FlightSQL command message. - Options for CommandGetSqlInfo.
Traits
- ProstMessageExt are useful utility methods for prost::Message types