pub struct SqlCommand {
pub query: Option<String>,
pub file: Option<String>,
pub fetch_size: Option<usize>,
pub max_rows: Option<usize>,
pub deadline: Option<String>,
pub read_mode: Option<SqlReadMode>,
pub routing_report: Option<RoutingReportFormat>,
pub tui: bool,
}Expand description
SQL subcommand
Multiple ;-separated statements are executed in a single transaction and
each statement emits its own result block. With --output json the output
is always an array of per-statement result sets (a single statement yields
a 1-element array); DDL/DML statements contribute a status/message
result set unless --quiet is set.
Fields§
§query: Option<String>SQL query to execute (may contain multiple ;-separated statements)
file: Option<String>File containing SQL query
fetch_size: Option<usize>Fetch size for server streaming
max_rows: Option<usize>Max rows to return before stopping
deadline: Option<String>Deadline for query execution (e.g. 60s, 5m)
read_mode: Option<SqlReadMode>Read routing mode. Non-local modes require an explicit cluster profile.
routing_report: Option<RoutingReportFormat>Emit a distributed-read routing report to stderr without changing SQL row output on stdout.
tui: boolLaunch interactive TUI preview
Implementations§
Source§impl SqlCommand
impl SqlCommand
Sourcepub fn resolve_query(&self, batch_mode: &BatchMode) -> Result<String>
pub fn resolve_query(&self, batch_mode: &BatchMode) -> Result<String>
Resolve the SQL query source (argument, file, or stdin).
Trait Implementations§
Source§impl Args for SqlCommand
impl Args for SqlCommand
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for SqlCommand
impl CommandFactory for SqlCommand
Source§impl Debug for SqlCommand
impl Debug for SqlCommand
Source§impl FromArgMatches for SqlCommand
impl FromArgMatches for SqlCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for SqlCommand
impl Parser for SqlCommand
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for SqlCommand
impl RefUnwindSafe for SqlCommand
impl Send for SqlCommand
impl Sync for SqlCommand
impl Unpin for SqlCommand
impl UnsafeUnpin for SqlCommand
impl UnwindSafe for SqlCommand
Blanket Implementations§
impl<T> Allocation for T
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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