Skip to main content

Cli

Struct Cli 

Source
pub struct Cli {
Show 25 fields pub database: Option<PathBuf>, pub config: Option<PathBuf>, pub verbose: u8, pub quiet: bool, pub format: OutputFormat, pub auto_detect: bool, pub cassandra_version: Option<String>, pub schema: Option<PathBuf>, pub dataset: Option<String>, pub data_dir: Option<PathBuf>, pub execute: Option<String>, pub file: Option<PathBuf>, pub out: Option<OutputMode>, pub output: Option<PathBuf>, pub overwrite: bool, pub limit: Option<usize>, pub page_size: Option<usize>, pub no_color: bool, pub enable_select_fallback: bool, pub writable: bool, pub write_dir: Option<PathBuf>, pub mutation: Vec<String>, pub mutations_file: Option<PathBuf>, pub flush: bool, pub command: Option<Commands>,
}

Fields§

§database: Option<PathBuf>

Database file path

§config: Option<PathBuf>

Load config (TOML/YAML/JSON). Precedence: flags > env > file > defaults

§verbose: u8

Verbose output (-v, -vv, -vvv for increasing verbosity)

§quiet: bool

Quiet mode (suppress non-essential output)

§format: OutputFormat

Output format

§auto_detect: bool

Enable best-effort auto detection (format/version) when available

§cassandra_version: Option<String>

Hint (e.g., 5.0) for format compatibility

§schema: Option<PathBuf>

CQL (.cql) or JSON (.json) schema files; triggers schema loading for ingestion. When combined with –data-dir, enables schema-aware query execution. Repeatable; order defines precedence

§dataset: Option<String>

Dataset name for test data (e.g., test_basic, test_collections) Mutually exclusive with –data-dir. Looks for datasets in CQLITE_DATASETS_ROOT/sstables/{dataset}/

§data_dir: Option<PathBuf>

Cassandra data directory root (e.g., /var/lib/cassandra/data). Combined with –schema, triggers dataset discovery and ingestion. Mutually exclusive with –dataset. For production Cassandra directory layouts.

§execute: Option<String>

Execute a single CQL statement in one-shot mode (alias: –query)

§file: Option<PathBuf>

Execute statements from a file (semicolon-terminated)

§out: Option<OutputMode>

Output format for query results. Takes precedence over –format when specified. Applies to: –execute/-e, –query, –file, and query subcommand. (table = cqlsh-compatible format)

§output: Option<PathBuf>

Output file path for query results. If not specified, output goes to stdout. Required when format is ‘parquet’ (binary format cannot be written to stdout).

§overwrite: bool

Overwrite output file if it exists (default: error if file exists)

§limit: Option<usize>

Cap rows

§page_size: Option<usize>

Reader and display pagination size

§no_color: bool

Disable colored output

§enable_select_fallback: bool

EXPERIMENTAL: Fallback to read-sstable for SELECT when ingestion unavailable (temporary, will be removed in M3)

§writable: bool

Enable write mode (requires –write-dir)

§write_dir: Option<PathBuf>

Directory for write operations (WAL and SSTable output)

§mutation: Vec<String>

JSON mutation to write (can be repeated). Requires –writable mode. Format: {“table”:“ks.tbl”,“partition_key”:{“col”:“val”},“operations”:[{“Write”:{“column”:“c”,“value”:“v”}}],“timestamp_micros”:123}

§mutations_file: Option<PathBuf>

File containing mutations (JSONL format, one JSON mutation per line). Requires –writable mode.

§flush: bool

Force flush memtable to SSTable after writes. Requires –writable mode.

§command: Option<Commands>

Trait Implementations§

Source§

impl Args for Cli

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl CommandFactory for Cli

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl FromArgMatches for Cli

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Parser for Cli

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

§

impl Freeze for Cli

§

impl RefUnwindSafe for Cli

§

impl Send for Cli

§

impl Sync for Cli

§

impl Unpin for Cli

§

impl UnsafeUnpin for Cli

§

impl UnwindSafe for Cli

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more