Skip to main content

Module sql

Module 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:

  1. prost generated structs for FlightSQL messages such as CommandStatementQuery
  2. Helpers for encoding and decoding FlightSQL messages: Any and Command
  3. A FlightSqlServiceClient for interacting with FlightSQL servers.
  4. A FlightSqlService to help building FlightSQL servers from FlightService.
  5. Helpers to build responses for FlightSQL metadata APIs: metadata

Re-exportsยง

use arrow_schema::ArrowError; ๐Ÿ”’
use bytes::Bytes; ๐Ÿ”’
use prost::Message; ๐Ÿ”’
pub use gen::ActionBeginSavepointRequest;
pub use gen::ActionBeginSavepointResult;
pub use gen::ActionBeginTransactionRequest;
pub use gen::ActionBeginTransactionResult;
pub use gen::ActionCancelQueryRequest;
pub use gen::ActionCancelQueryResult;
pub use gen::ActionClosePreparedStatementRequest;
pub use gen::ActionCreatePreparedStatementRequest;
pub use gen::ActionCreatePreparedStatementResult;
pub use gen::ActionCreatePreparedSubstraitPlanRequest;
pub use gen::ActionEndSavepointRequest;
pub use gen::ActionEndTransactionRequest;
pub use gen::CommandGetCatalogs;
pub use gen::CommandGetCrossReference;
pub use gen::CommandGetDbSchemas;
pub use gen::CommandGetExportedKeys;
pub use gen::CommandGetImportedKeys;
pub use gen::CommandGetPrimaryKeys;
pub use gen::CommandGetSqlInfo;
pub use gen::CommandGetTableTypes;
pub use gen::CommandGetTables;
pub use gen::CommandGetXdbcTypeInfo;
pub use gen::CommandPreparedStatementQuery;
pub use gen::CommandPreparedStatementUpdate;
pub use gen::CommandStatementIngest;
pub use gen::CommandStatementQuery;
pub use gen::CommandStatementSubstraitPlan;
pub use gen::CommandStatementUpdate;
pub use gen::DoPutPreparedStatementResult;
pub use gen::DoPutUpdateResult;
pub use gen::Nullable;
pub use gen::Searchable;
pub use gen::SqlInfo;
pub use gen::SqlNullOrdering;
pub use gen::SqlOuterJoinsSupportLevel;
pub use gen::SqlSupportedCaseSensitivity;
pub use gen::SqlSupportedElementActions;
pub use gen::SqlSupportedGroupBy;
pub use gen::SqlSupportedPositionedCommands;
pub use gen::SqlSupportedResultSetConcurrency;
pub use gen::SqlSupportedResultSetType;
pub use gen::SqlSupportedSubqueries;
pub use gen::SqlSupportedTransaction;
pub use gen::SqlSupportedTransactions;
pub use gen::SqlSupportedUnions;
pub use gen::SqlSupportsConvert;
pub use gen::SqlTransactionIsolationLevel;
pub use gen::SubstraitPlan;
pub use gen::SupportedSqlGrammar;
pub use gen::TicketStatementQuery;
pub use gen::UpdateDeleteRules;
pub use gen::XdbcDataType;
pub use gen::XdbcDatetimeSubcode;
pub use gen::action_end_transaction_request::EndTransaction;
pub use gen::command_statement_ingest::TableDefinitionOptions;
pub use gen::command_statement_ingest::table_definition_options::TableExistsOption;
pub use gen::command_statement_ingest::table_definition_options::TableNotExistOption;
pub use crate::streams::FallibleRequestStream;

Modulesยง

client
A FlightSQL Client FlightSqlServiceClient
gen ๐Ÿ”’
metadata
Builders and function for building responses to FlightSQL metadata / information schema requests.
server
Helper trait FlightSqlService for implementing a FlightService that implements FlightSQL.

Macrosยง

prost_message_ext ๐Ÿ”’

Structsยง

Any
An implementation of the protobuf Any message type

Enumsยง

Command
Helper to convert to/from protobuf Any message to a specific FlightSQL command message.

Traitsยง

ProstMessageExt
ProstMessageExt are useful utility methods for prost::Message types