| Crates.io | flight-sql-client |
| lib.rs | flight-sql-client |
| version | 0.1.0 |
| created_at | 2025-11-13 14:40:43.564679+00 |
| updated_at | 2025-11-13 14:40:43.564679+00 |
| description | A Rust client library for Arrow Flight SQL servers |
| homepage | |
| repository | https://github.com/swanlake-io/swanlake |
| max_upload_size | |
| id | 1931300 |
| size | 82,580 |
A Rust client library for connecting to Arrow Flight SQL servers, built on top of ADBC drivers. Designed for use with SwanLake, an Arrow Flight SQL server backed by DuckDB.
Add this to your Cargo.toml:
[dependencies]
flight-sql-client = "0.1.0"
Connect to a SwanLake server and execute a query:
use flight_sql_client::FlightSQLClient;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Connect to the server
let mut client = FlightSQLClient::connect("grpc://localhost:4214")?;
// Execute a query
let result = client.execute("SELECT 1 as col")?;
println!("Total rows: {}", result.total_rows);
// Execute an update
let update_result = client.execute_update("CREATE TABLE test (id INTEGER)")?;
println!("Rows affected: {:?}", update_result.rows_affected);
Ok(())
}
FlightSQLClient: Main client for executing queries and updates.QueryResult: Holds query results with record batches.UpdateResult: Holds update results with affected rows.See the SwanLake repository for more examples and server setup.
Licensed under the MIT License.