pub struct ViewMetadata {
pub schema: View,
/* private fields */
}Expand description
A data class describing a sqlite View and future, additional meta data useful for TrailBase.
Fields§
§schema: ViewImplementations§
Source§impl ViewMetadata
impl ViewMetadata
Sourcepub fn new(view: View, tables: &[Table]) -> Self
pub fn new(view: View, tables: &[Table]) -> Self
Build a new ViewMetadata instance containing TrailBase/RecordApi specific information.
NOTE: The list of all tables is needed only to extract interger/UUIDv7 pk columns for foreign key relationships.
pub fn name(&self) -> &QualifiedName
pub fn column_index_by_name(&self, key: &str) -> Option<usize>
pub fn column_by_name(&self, key: &str) -> Option<(usize, &Column)>
Trait Implementations§
Source§impl Borrow<QualifiedName> for ViewMetadata
impl Borrow<QualifiedName> for ViewMetadata
Source§fn borrow(&self) -> &QualifiedName
fn borrow(&self) -> &QualifiedName
Immutably borrows from an owned value. Read more
Source§impl Clone for ViewMetadata
impl Clone for ViewMetadata
Source§fn clone(&self) -> ViewMetadata
fn clone(&self) -> ViewMetadata
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 moreSource§impl Debug for ViewMetadata
impl Debug for ViewMetadata
impl Eq for ViewMetadata
Source§impl Hash for ViewMetadata
impl Hash for ViewMetadata
Source§impl PartialEq for ViewMetadata
impl PartialEq for ViewMetadata
Source§impl TableOrViewMetadata for ViewMetadata
impl TableOrViewMetadata for ViewMetadata
fn qualified_name(&self) -> &QualifiedName
fn columns(&self) -> Option<&[Column]>
fn json_metadata(&self) -> Option<&JsonMetadata>
fn record_pk_column(&self) -> Option<(usize, &Column)>
Auto Trait Implementations§
impl Freeze for ViewMetadata
impl RefUnwindSafe for ViewMetadata
impl Send for ViewMetadata
impl Sync for ViewMetadata
impl Unpin for ViewMetadata
impl UnsafeUnpin for ViewMetadata
impl UnwindSafe for ViewMetadata
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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 more