#[non_exhaustive]pub enum StatementType {
Show 29 variants
Invalid,
Select,
Insert,
Update,
Explain,
Delete,
Prepare,
Create,
Execute,
Alter,
Transaction,
Copy,
Analyze,
VariableSet,
CreateFunc,
Drop,
Export,
Pragma,
Vacuum,
Call,
Set,
Load,
Relation,
Extension,
LogicalPlan,
Attach,
Detach,
Multi,
Unknown(duckdb_statement_type),
}Expand description
A prepared statement suitable for caching and re-execution. The kind of SQL statement a prepared statement holds.
Mirrors DuckDB’s duckdb_statement_type. #[non_exhaustive] because DuckDB
adds statement kinds across releases; an id this build does not recognise is
preserved verbatim in StatementType::Unknown 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.
Invalid
DUCKDB_STATEMENT_TYPE_INVALID
Select
SELECT
Insert
INSERT
Update
UPDATE
Explain
EXPLAIN
Delete
DELETE
Prepare
PREPARE
Create
CREATE
Execute
EXECUTE
Alter
ALTER
Transaction
TRANSACTION
Copy
COPY
Analyze
ANALYZE
VariableSet
SET VARIABLE
CreateFunc
CREATE FUNCTION
Drop
DROP
Export
EXPORT
Pragma
PRAGMA
Vacuum
VACUUM
Call
CALL
Set
SET
Load
LOAD
Relation
RELATION
Extension
EXTENSION
LogicalPlan
LOGICAL_PLAN
Attach
ATTACH
Detach
DETACH
Multi
MULTI
Unknown(duckdb_statement_type)
A statement kind this build does not recognise; the raw id is preserved.
Implementations§
Source§impl StatementType
impl StatementType
Sourcepub fn from_raw(raw: duckdb_statement_type) -> StatementType
pub fn from_raw(raw: duckdb_statement_type) -> StatementType
Classifies a raw duckdb_statement_type, preserving unrecognised values.
Trait Implementations§
Source§impl Clone for StatementType
impl Clone for StatementType
Source§fn clone(&self) -> StatementType
fn clone(&self) -> StatementType
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 StatementType
Source§impl Debug for StatementType
impl Debug for StatementType
impl Eq for StatementType
Source§impl Hash for StatementType
impl Hash for StatementType
Source§impl PartialEq for StatementType
impl PartialEq for StatementType
Source§fn eq(&self, other: &StatementType) -> bool
fn eq(&self, other: &StatementType) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StatementType
Auto Trait Implementations§
impl Freeze for StatementType
impl RefUnwindSafe for StatementType
impl Send for StatementType
impl Sync for StatementType
impl Unpin for StatementType
impl UnsafeUnpin for StatementType
impl UnwindSafe for StatementType
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