pub struct TableDefinition { /* private fields */ }Available on crate feature
duckdb only.Expand description
A table definition, which includes the table name, schema, constraints, and indexes. This is used to store the definition of a table for a dataset, and can be re-used to create one or more tables (like internal data tables).
Implementations§
Source§impl TableDefinition
impl TableDefinition
pub fn name(&self) -> &RelationName
Sourcepub fn has_table(&self, tx: &Transaction<'_>) -> Result<bool, Error>
pub fn has_table(&self, tx: &Transaction<'_>) -> Result<bool, Error>
Returns true if this table definition has a base table matching the exact RelationName of the definition
§Errors
If the transaction fails to query for whether the table exists.
Sourcepub fn list_internal_tables(
&self,
tx: &Transaction<'_>,
) -> Result<Vec<(RelationName, u64)>, Error>
pub fn list_internal_tables( &self, tx: &Transaction<'_>, ) -> Result<Vec<(RelationName, u64)>, Error>
List all internal tables related to this table definition.
§Errors
Returns an error if the internal tables cannot be listed.
Trait Implementations§
Source§impl Clone for TableDefinition
impl Clone for TableDefinition
Source§fn clone(&self) -> TableDefinition
fn clone(&self) -> TableDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TableDefinition
impl Debug for TableDefinition
Source§impl PartialEq for TableDefinition
impl PartialEq for TableDefinition
impl StructuralPartialEq for TableDefinition
Auto Trait Implementations§
impl Freeze for TableDefinition
impl RefUnwindSafe for TableDefinition
impl Send for TableDefinition
impl Sync for TableDefinition
impl Unpin for TableDefinition
impl UnwindSafe for TableDefinition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request