Skip to main content

KeyColumn

Struct KeyColumn 

Source
pub struct KeyColumn<'a> { /* private fields */ }
Expand description

One column of a committed table, scanned in rid order.

A rid is a row’s position in append order, and the parts of a table are in append order, so a scan of the parts in order is a scan in rid order and there is nothing to look up. That is the whole of the correspondence and it is worth stating, because a build that read the parts in any other order would produce a map that resolved every key to the wrong row without failing.

Implementations§

Source§

impl<'a> KeyColumn<'a>

Source

pub fn new(reader: &'a Reader, column: usize) -> Result<Self>

Names a column of a table as the key column of a relationship’s parent side.

§Errors

If there is no such column, or if its type has no integer key form. VARCHAR is the second of those today: section 2.2 says a string key is mapped through its dictionary codes rather than its text, and the code path is not built yet. None of TPC-H’s eight relationships needs it, so it is refused by name rather than approximated.

Trait Implementations§

Source§

impl<'a> Debug for KeyColumn<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Keys for KeyColumn<'_>

Source§

fn scan(&self, each: &mut dyn FnMut(Option<i128>) -> Result<()>) -> Result<()>

Calls each once per row of the column, in rid order. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for KeyColumn<'a>

§

impl<'a> !UnwindSafe for KeyColumn<'a>

§

impl<'a> Freeze for KeyColumn<'a>

§

impl<'a> Send for KeyColumn<'a>

§

impl<'a> Sync for KeyColumn<'a>

§

impl<'a> Unpin for KeyColumn<'a>

§

impl<'a> UnsafeUnpin for KeyColumn<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.