pub struct Schema {
pub columns: Vec<ColumnRef>,
}Fields§
§columns: Vec<ColumnRef>Implementations§
Source§impl Schema
impl Schema
pub fn new(columns: Vec<Column>) -> Self
pub fn empty() -> Self
pub fn try_merge( schemas: impl IntoIterator<Item = Self>, ) -> QuillSQLResult<Self>
pub fn project(&self, indices: &[usize]) -> QuillSQLResult<Schema>
pub fn column_with_name( &self, relation: Option<&TableReference>, name: &str, ) -> QuillSQLResult<ColumnRef>
pub fn column_with_index(&self, index: usize) -> QuillSQLResult<ColumnRef>
Sourcepub fn index_of(
&self,
relation: Option<&TableReference>,
name: &str,
) -> QuillSQLResult<usize>
pub fn index_of( &self, relation: Option<&TableReference>, name: &str, ) -> QuillSQLResult<usize>
Find the index of the column with the given name.
pub fn column_count(&self) -> usize
Trait Implementations§
impl Eq for Schema
impl StructuralPartialEq for Schema
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin for Schema
impl UnwindSafe for Schema
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.