diff --git a/Cargo.toml b/Cargo.toml index 342ff0a..dd5e18e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,22 +1,25 @@ [package] authors = ["sundy-li >"] categories = ["command-line-utilities"] -description = "Replace with description" +description = "A command line tool for interacting with server in Flight SQL protocol" documentation = "https://docs.rs/arrow_cli" repository = "https://github.com/sundy-li/arrow_cli" edition = "2024" license = "Apache-2.0" name = "arrow_cli" -version = "0.2.4" +version = "0.3.0" [dependencies] +arrow-array = "57" +arrow-cast = { version = "57", features = ["prettyprint"] } +arrow-csv = "57" +arrow-flight = { version = "57", features = ["flight-sql-experimental"] } +arrow-schema = "57" atty = "0.2" -rustyline = "15" -arrow-cast = { version = "55", features = ["prettyprint"] } -arrow-flight = { version = "55", features = ["flight-sql-experimental"] } -arrow = { version = "55", features = ["ipc_compression"] } +clap = { version = "4.5", features = ["derive"] } futures = { version = "0.3", default-features = false, features = ["alloc"] } +rustyline = "17" tokio = { version = "1", features = [ "macros", "rt", @@ -24,11 +27,7 @@ tokio = { version = "1", features = [ "sync", "parking_lot", ] } - -tonic = { version = "0.12", default-features = false, features = [ - "transport", - "codegen", - "tls", - "prost", +tonic = { version = "0.14", default-features = false, features = [ + "channel", + "tls-ring" ] } -clap = { version = "4.5", features = ["derive"] } diff --git a/README.md b/README.md index 6e8354f..d103150 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,17 @@ cargo install arrow_cli ``` > arrow_cli --help -Usage: arrow_cli <--user |--password |--host |--port > +Usage: arrow_cli [OPTIONS] + +Options: + -u, --user User name [default: root] + -p, --password User password [default: ] + --host Flight SQL Server host [default: 127.0.0.1] + -P, --port Flight SQL Server port [default: 4100] + --tls + --timeout Request timeout in seconds [default: 180] + --prepared Execute query using prepared statement + -h, --help Print help ``` ## Examples diff --git a/src/main.rs b/src/main.rs index 97d2af8..8483760 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ mod session; use std::time::Duration; -use arrow::error::ArrowError; +use arrow_schema::ArrowError; use atty::Stream; use clap::Parser; diff --git a/src/session.rs b/src/session.rs index a21304b..853f9b8 100644 --- a/src/session.rs +++ b/src/session.rs @@ -1,10 +1,10 @@ -use arrow::csv::WriterBuilder; -use arrow::error::ArrowError; -use arrow::record_batch::RecordBatch; +use arrow_array::RecordBatch; use arrow_cast::pretty::pretty_format_batches; +use arrow_csv::WriterBuilder; use arrow_flight::{ flight_service_client::FlightServiceClient, sql::client::FlightSqlServiceClient, }; +use arrow_schema::ArrowError; use futures::TryStreamExt; use rustyline::Editor; use rustyline::error::ReadlineError;