#[non_exhaustive]pub enum ResultType {
QueryResult,
ChangedRows,
Nothing,
Invalid,
Unknown(duckdb_result_type),
}Expand description
A fully iterable DuckDB query result. What kind of output a query produced.
Mirrors DuckDB’s duckdb_result_type. #[non_exhaustive] with
Unknown so a value a future DuckDB adds is preserved
rather than lost.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
QueryResult
The result carries queryable rows (SELECT, RETURNING, …).
ChangedRows
The result reports a changed-row count (INSERT/UPDATE/DELETE).
Nothing
The statement produced no result (many DDL statements).
Invalid
DUCKDB_RESULT_TYPE_INVALID.
Unknown(duckdb_result_type)
A type this build does not recognise; the raw value is preserved.
Implementations§
Source§impl ResultType
impl ResultType
Sourcepub fn from_raw(raw: duckdb_result_type) -> ResultType
pub fn from_raw(raw: duckdb_result_type) -> ResultType
Classifies a raw duckdb_result_type, preserving unrecognised values.
Trait Implementations§
Source§impl Clone for ResultType
impl Clone for ResultType
Source§fn clone(&self) -> ResultType
fn clone(&self) -> ResultType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ResultType
Source§impl Debug for ResultType
impl Debug for ResultType
impl Eq for ResultType
Source§impl Hash for ResultType
impl Hash for ResultType
Source§impl PartialEq for ResultType
impl PartialEq for ResultType
Source§fn eq(&self, other: &ResultType) -> bool
fn eq(&self, other: &ResultType) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ResultType
Auto Trait Implementations§
impl Freeze for ResultType
impl RefUnwindSafe for ResultType
impl Send for ResultType
impl Sync for ResultType
impl Unpin for ResultType
impl UnsafeUnpin for ResultType
impl UnwindSafe for ResultType
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