pub enum Arg<'a> {
ConfigFilePath(Cow<'a, str>),
LogLevel(LogLevel),
OutputFormat(OutputFormat),
MultiQuery,
Custom(Cow<'a, str>, Option<Cow<'a, str>>),
}Expand description
Query arguments that can be passed when executing queries.
Arg represents various command-line arguments that can be used to configure
query execution. Most commonly, you’ll use OutputFormat to specify the
desired output format.
§Examples
use chdb_rust::arg::Arg;
use chdb_rust::format::OutputFormat;
use chdb_rust::log_level::LogLevel;
// Specify output format
let args = &[Arg::OutputFormat(OutputFormat::JSONEachRow)];
// Specify log level
let args = &[Arg::LogLevel(LogLevel::Debug)];
// Use custom arguments
let args = &[Arg::Custom("path".into(), Some("/tmp/db".into()))];Variants§
ConfigFilePath(Cow<'a, str>)
--config-file=<value>
LogLevel(LogLevel)
--log-level=<value>
OutputFormat(OutputFormat)
--output-format=<value>
MultiQuery
–multiquery
Custom(Cow<'a, str>, Option<Cow<'a, str>>)
Custom argument.
“–path=/tmp/chdb” translates into one of the following:
- Arg::Custom(“path”.to_string().into(), Some(“/tmp/chdb”.to_string().into())).
- Arg::Custom(“path”.into(), Some(“/tmp/chdb”.into())).
“–multiline” translates into one of the following:
- Arg::Custom(“multiline”.to_string().into(), None).
- Arg::Custom(“multiline”.into(), None).
We should tell user where to look for officially supported arguments. Here is some hint for now: https://github.com/fixcik/chdb-rs/blob/master/OPTIONS.md.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Arg<'a>
impl<'a> RefUnwindSafe for Arg<'a>
impl<'a> Send for Arg<'a>
impl<'a> Sync for Arg<'a>
impl<'a> Unpin for Arg<'a>
impl<'a> UnwindSafe for Arg<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more