Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
008521a
Add modelardb_embedded as a dependency instead of arrow and tonic
CGodiksen Aug 17, 2026
7f65d87
Remove tonic errors and add ModelarDbEmbeddedError
CGodiksen Aug 17, 2026
615a533
Connect to embedded Client instead of arrow flight client
CGodiksen Aug 17, 2026
6c08f2d
Remove now unused connect function
CGodiksen Aug 17, 2026
b6675fa
Pass Client down instead of arrow flight client
CGodiksen Aug 17, 2026
372dd88
Remove unused retrieve_table_names function
CGodiksen Aug 17, 2026
dc0e033
Remove unused execute_action function
CGodiksen Aug 17, 2026
ce7a6f7
Remove unused TRANSPORT_ERROR and AuthenticatedFlightClient
CGodiksen Aug 17, 2026
d866c4e
Use Client in execute_command()
CGodiksen Aug 17, 2026
b9d50c2
Simplify query execution and user confirmation flow
CGodiksen Aug 17, 2026
c9b3f60
Fix problem with line endings on Windows
CGodiksen Aug 17, 2026
9e3ca56
Add command to print configuration
CGodiksen Aug 18, 2026
4d31cc1
Add command to print nodes
CGodiksen Aug 18, 2026
3fece47
Add command to print metrics
CGodiksen Aug 18, 2026
262aab9
Add command to update setting
CGodiksen Aug 18, 2026
9a7b455
Add command to kill the node and stop the process
CGodiksen Aug 18, 2026
bb469b1
Add new commands to help message
CGodiksen Aug 18, 2026
f65d7d1
Change \s command to \sc
CGodiksen Aug 18, 2026
5daa7ec
No longer transfer in KillNode for consistency
CGodiksen Aug 18, 2026
5fd2d1b
Fix alignment issue in help message
CGodiksen Aug 18, 2026
97e4b86
Refresh the table names for tab-completion if a table may have been c…
CGodiksen Aug 18, 2026
c20ea9e
Add supported commands to user docs
CGodiksen Aug 18, 2026
df5cb99
Fix clippy issue
CGodiksen Aug 18, 2026
fa960bc
Use maybe_ for optional value for consistency
CGodiksen Aug 18, 2026
cc5cedc
Prettify print functions
CGodiksen Aug 18, 2026
541f7fc
Remove unnecessary comment
CGodiksen Aug 18, 2026
7634355
Handle empty inputs better
CGodiksen Aug 18, 2026
ae91aad
Make it clear that we do not return errors in kill_node
CGodiksen Aug 18, 2026
8c97dfe
Add to KillNode description that it removes the node from the cluster
CGodiksen Aug 18, 2026
9086bd1
Merge branch 'main' into dev/client-in-cli
CGodiksen Aug 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions crates/modelardb_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ name = "modelardb"
path = "src/main.rs"

[dependencies]
arrow-flight.workspace = true
arrow = { workspace = true, features = ["prettyprint"] }
bytes.workspace = true
clap.workspace = true
dirs.workspace = true
modelardb_auth.workspace = true
futures.workspace = true
modelardb_embedded.workspace = true
modelardb_types.workspace = true
rustyline.workspace = true
tokio.workspace = true
tonic.workspace = true
33 changes: 11 additions & 22 deletions crates/modelardb_client/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ use std::io::Error as IoError;
use std::result::Result as StdResult;

use arrow::error::ArrowError;
use modelardb_embedded::error::ModelarDbEmbeddedError;
use rustyline::error::ReadlineError as RustyLineError;
use tonic::Status as TonicStatusError;
use tonic::transport::Error as TonicTransportError;

/// Result type used throughout `modelardb_client`.
pub type Result<T> = StdResult<T, ModelarDbClientError>;
Expand All @@ -37,12 +36,10 @@ pub enum ModelarDbClientError {
InvalidArgument(String),
/// Error returned from IO operations.
Io(IoError),
/// Error returned by modelardb_embedded.
ModelarDbEmbedded(ModelarDbEmbeddedError),
/// Error returned by RustyLine.
RustyLine(RustyLineError),
/// Status returned by Tonic.
TonicStatus(Box<TonicStatusError>),
/// Error returned by Tonic.
TonicTransport(TonicTransportError),
}

impl Display for ModelarDbClientError {
Expand All @@ -51,9 +48,8 @@ impl Display for ModelarDbClientError {
Self::Arrow(reason) => write!(f, "Arrow Error: {reason}"),
Self::InvalidArgument(reason) => write!(f, "Invalid Argument Error: {reason}"),
Self::Io(reason) => write!(f, "Io Error: {reason}"),
Self::ModelarDbEmbedded(reason) => write!(f, "ModelarDB Embedded Error: {reason}"),
Self::RustyLine(reason) => write!(f, "RustyLine Error: {reason}"),
Self::TonicStatus(reason) => write!(f, "Tonic Status Error: {reason}"),
Self::TonicTransport(reason) => write!(f, "Tonic Transport Error: {reason}"),
}
}
}
Expand All @@ -65,9 +61,8 @@ impl Error for ModelarDbClientError {
Self::Arrow(reason) => Some(reason),
Self::InvalidArgument(_reason) => None,
Self::Io(reason) => Some(reason),
Self::ModelarDbEmbedded(reason) => Some(reason),
Self::RustyLine(reason) => Some(reason),
Self::TonicStatus(reason) => Some(reason),
Self::TonicTransport(reason) => Some(reason),
}
}
}
Expand All @@ -84,20 +79,14 @@ impl From<IoError> for ModelarDbClientError {
}
}

impl From<RustyLineError> for ModelarDbClientError {
fn from(error: RustyLineError) -> Self {
Self::RustyLine(error)
impl From<ModelarDbEmbeddedError> for ModelarDbClientError {
fn from(error: ModelarDbEmbeddedError) -> Self {
Self::ModelarDbEmbedded(error)
}
}

impl From<TonicStatusError> for ModelarDbClientError {
fn from(error: TonicStatusError) -> Self {
Self::TonicStatus(Box::new(error))
}
}

impl From<TonicTransportError> for ModelarDbClientError {
fn from(error: TonicTransportError) -> Self {
Self::TonicTransport(error)
impl From<RustyLineError> for ModelarDbClientError {
fn from(error: RustyLineError) -> Self {
Self::RustyLine(error)
}
}
Loading
Loading