pub struct Table {
pub name: Arc<str>,
pub columns: Vec<Column>,
pub source: Source,
pub cardinality: Cardinality,
pub element: Arc<str>,
}Fields§
§name: Arc<str>§columns: Vec<Column>§source: Source§cardinality: Cardinality§element: Arc<str>The Beck type one row stands for, for beck explain sql to print.
Implementations§
Source§impl Table
impl Table
pub fn column(&self, name: &str) -> Option<(usize, &Column)>
Sourcepub fn row(&self, v: &Value) -> Vec<Cell> ⓘ
pub fn row(&self, v: &Value) -> Vec<Cell> ⓘ
One value as one row, coerced to the columns this table declares.
Coerced rather than trusted: the column types come from the declared type and the value comes from a running program, so a value that does not fit its column becomes NULL rather than a wrongly-encoded field on the wire. Nothing in the corpus reaches that branch; the branch is there because “cannot happen” is not a wire format.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnwindSafe for Table
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