#[non_exhaustive]pub struct Capabilities {
pub transactions: bool,
pub cancellation: bool,
pub multiple_schemas: bool,
pub prepared_statements: bool,
pub savepoints: bool,
pub rows_affected: bool,
pub streaming: bool,
pub row_level_dml: bool,
}Expand description
Static description of features a driver supports.
The UI inspects Capabilities to enable or disable commands without
hard-coding driver names. New flags are added by extending this struct;
existing drivers default to false for unknown features.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.transactions: boolDriver supports explicit transactions (BEGIN/COMMIT/ROLLBACK).
cancellation: boolDriver can request asynchronous cancellation of an in-flight query.
multiple_schemas: boolDriver exposes more than one logical schema/namespace.
prepared_statements: boolDriver supports server-side prepared statements with parameter binding.
savepoints: boolDriver supports nested transactions via savepoints.
rows_affected: boolDriver can report row counts for UPDATE/DELETE statements.
streaming: boolDriver returns rows progressively from crate::Connection::stream —
i.e. the stream yields rows as the server produces them, without
materialising the entire result set in memory first.
Drivers that currently buffer the full result before exposing the
stream (notably MySQL, which is awaiting a real stream_and_drop
implementation) must leave this false so the UI can warn the
user and refuse to launch open-ended streams over large tables.
row_level_dml: boolDriver supports row-level DML through the standard
INSERT/UPDATE/DELETE grammar that
crate::Connection::execute accepts.
Most engines do; the notable exception is ClickHouse, where
row-level changes have to go through ALTER TABLE ... UPDATE
or ALTER TABLE ... DELETE async mutations. The pending-changes
pipeline gates o/O/d/cell-edit on this flag so it never
emits a statement the driver cannot consume. Defaults to
false; drivers opt in explicitly via
Self::with_row_level_dml.
Implementations§
Source§impl Capabilities
impl Capabilities
Sourcepub const fn with_transactions(self, value: bool) -> Self
pub const fn with_transactions(self, value: bool) -> Self
Builder-style mutation used by drivers to assemble their capability set.
pub const fn with_cancellation(self, value: bool) -> Self
pub const fn with_multiple_schemas(self, value: bool) -> Self
pub const fn with_prepared_statements(self, value: bool) -> Self
pub const fn with_savepoints(self, value: bool) -> Self
pub const fn with_rows_affected(self, value: bool) -> Self
pub const fn with_streaming(self, value: bool) -> Self
pub const fn with_row_level_dml(self, value: bool) -> Self
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
Source§fn clone(&self) -> Capabilities
fn clone(&self) -> Capabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Capabilities
Source§impl Debug for Capabilities
impl Debug for Capabilities
Source§impl Default for Capabilities
impl Default for Capabilities
Source§fn default() -> Capabilities
fn default() -> Capabilities
Source§impl<'de> Deserialize<'de> for Capabilities
impl<'de> Deserialize<'de> for Capabilities
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Capabilities
Source§impl PartialEq for Capabilities
impl PartialEq for Capabilities
Source§fn eq(&self, other: &Capabilities) -> bool
fn eq(&self, other: &Capabilities) -> bool
self and other values to be equal, and is used by ==.