Skip to main content

Columns

Struct Columns 

Source
pub struct Columns {
    pub row_numbers: CowVec<RowNumber>,
    pub created_at: CowVec<DateTime>,
    pub updated_at: CowVec<DateTime>,
    pub columns: CowVec<ColumnBuffer>,
    pub names: CowVec<Fragment>,
}

Fields§

§row_numbers: CowVec<RowNumber>§created_at: CowVec<DateTime>§updated_at: CowVec<DateTime>§columns: CowVec<ColumnBuffer>§names: CowVec<Fragment>

Implementations§

Source§

impl Columns

Source

pub fn scalar_value(&self) -> Value

Source

pub fn new(columns: Vec<ColumnWithName>) -> Self

Source

pub fn with_system_columns( columns: Vec<ColumnWithName>, row_numbers: Vec<RowNumber>, created_at: Vec<DateTime>, updated_at: Vec<DateTime>, ) -> Self

Source

pub fn single_row<'b>( rows: impl IntoIterator<Item = (&'b str, Value)>, ) -> Columns

Source

pub fn with_row_numbers(self, row_numbers: Vec<RowNumber>) -> Self

Source

pub fn from_catalog_columns(cols: &[CatalogColumn]) -> Self

Source

pub fn apply_headers(&mut self, headers: &ColumnHeaders)

Source§

impl Columns

Source

pub fn number(&self) -> RowNumber

Source

pub fn shape(&self) -> (usize, usize)

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn iter(&self) -> impl Iterator<Item = ColumnRef<'_>> + '_

Source

pub fn first(&self) -> Option<ColumnRef<'_>>

Source

pub fn last(&self) -> Option<ColumnRef<'_>>

Source

pub fn get(&self, index: usize) -> Option<ColumnRef<'_>>

Source

pub fn name_at(&self, index: usize) -> &Fragment

Source

pub fn data_at(&self, index: usize) -> &ColumnBuffer

Source

pub fn data_at_mut(&mut self, index: usize) -> &mut ColumnBuffer

Source

pub fn row(&self, i: usize) -> Vec<Value>

Source

pub fn column(&self, name: &str) -> Option<ColumnRef<'_>>

Source

pub fn row_count(&self) -> usize

Source

pub fn has_rows(&self) -> bool

Source

pub fn is_scalar(&self) -> bool

Source

pub fn get_row(&self, index: usize) -> Vec<Value>

Source

pub fn assert_invariants(&self, ctx: &str)

Source§

impl Columns

Source

pub fn from_rows(names: &[&str], result_rows: &[Vec<Value>]) -> Self

Source

pub fn from_encoded_rows( shape: &RowShape, ids: &[RowNumber], rows: &[EncodedRow], ) -> Self

Source§

impl Columns

Source

pub fn empty() -> Self

Source§

impl Columns

Source

pub fn extract_by_indices(&self, indices: &[usize]) -> Columns

Source

pub fn extract_row(&self, index: usize) -> Columns

Source

pub fn append_rows_by_indices(&mut self, source: &Columns, indices: &[usize])

Source

pub fn append_all(&mut self, source: Columns) -> Result<()>

Source

pub fn concat(batches: Vec<Columns>) -> Result<Option<Columns>>

Source

pub fn remove_row(&mut self, row_number: RowNumber) -> bool

Source

pub fn project_by_names(&self, names: &[String]) -> Columns

Source

pub fn partition_by_keys<K: Hash + Eq + Clone>( &self, keys: &[K], ) -> IndexMap<K, Columns>

Source

pub fn from_row(row: &Row) -> Self

Source

pub fn reset_from_row(&mut self, row: &Row)

Source

pub fn reset_from_row_with_pool(&mut self, row: &Row, pool: &ColumnBufferPool)

Source

pub fn to_single_row(&self) -> Row

Source§

impl Columns

Source

pub fn get_bool(&self, name: &str, row_idx: usize) -> Option<bool>

Source

pub fn get_f32(&self, name: &str, row_idx: usize) -> Option<f32>

Source

pub fn get_f64(&self, name: &str, row_idx: usize) -> Option<f64>

Source

pub fn get_float8(&self, name: &str, row_idx: usize) -> Option<OrderedF64>

Source

pub fn get_i8(&self, name: &str, row_idx: usize) -> Option<i8>

Source

pub fn get_i16(&self, name: &str, row_idx: usize) -> Option<i16>

Source

pub fn get_i32(&self, name: &str, row_idx: usize) -> Option<i32>

Source

pub fn get_i64(&self, name: &str, row_idx: usize) -> Option<i64>

Source

pub fn get_i128(&self, name: &str, row_idx: usize) -> Option<i128>

Source

pub fn get_u8(&self, name: &str, row_idx: usize) -> Option<u8>

Source

pub fn get_u16(&self, name: &str, row_idx: usize) -> Option<u16>

Source

pub fn get_u32(&self, name: &str, row_idx: usize) -> Option<u32>

Source

pub fn get_u64(&self, name: &str, row_idx: usize) -> Option<u64>

Source

pub fn get_u128(&self, name: &str, row_idx: usize) -> Option<u128>

Source

pub fn get_string(&self, name: &str, row_idx: usize) -> Option<String>

Source

pub fn get_date(&self, name: &str, row_idx: usize) -> Option<Date>

Source

pub fn get_datetime(&self, name: &str, row_idx: usize) -> Option<DateTime>

Source

pub fn get_time(&self, name: &str, row_idx: usize) -> Option<Time>

Source

pub fn get_duration(&self, name: &str, row_idx: usize) -> Option<Duration>

Source

pub fn get_identity_id(&self, name: &str, row_idx: usize) -> Option<IdentityId>

Source

pub fn get_uuid4(&self, name: &str, row_idx: usize) -> Option<Uuid4>

Source

pub fn get_uuid7(&self, name: &str, row_idx: usize) -> Option<Uuid7>

Source

pub fn get_blob(&self, name: &str, row_idx: usize) -> Option<Blob>

Source

pub fn get_int(&self, name: &str, row_idx: usize) -> Option<Int>

Source

pub fn get_uint(&self, name: &str, row_idx: usize) -> Option<Uint>

Source

pub fn get_decimal(&self, name: &str, row_idx: usize) -> Option<Decimal>

Source

pub fn get_value(&self, name: &str, row_idx: usize) -> Option<Value>

Source

pub fn is_undefined(&self, name: &str, row_idx: usize) -> bool

Source

pub fn get_row_number(&self, row_idx: usize) -> Option<RowNumber>

Source§

impl Columns

Source

pub fn row_ref(&self, index: usize) -> Option<RowRef<'_>>

Source

pub fn row_refs(&self) -> RowRefIter<'_>

Source§

impl Columns

Source

pub fn append_columns(&mut self, other: Columns) -> Result<()>

Source§

impl Columns

Source

pub fn append_rows( &mut self, shape: &RowShape, rows: impl IntoIterator<Item = EncodedRow>, row_numbers: Vec<RowNumber>, ) -> Result<()>

Source§

impl Columns

Source

pub fn filter(&mut self, mask: &BitVec) -> Result<()>

Source§

impl Columns

Source

pub fn take(&mut self, n: usize) -> Result<()>

Source§

impl Columns

Source

pub fn group_by_view(&self, keys: &[&str]) -> Result<GroupByView>

Trait Implementations§

Source§

impl Clone for Columns

Source§

fn clone(&self) -> Columns

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Columns

Source§

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

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

impl Default for Columns

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Columns

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<Columns> for Frame

Source§

fn from(columns: Columns) -> Self

Converts to this type from the input type.
Source§

impl From<Frame> for Columns

Source§

fn from(frame: Frame) -> Self

Converts to this type from the input type.
Source§

impl Index<usize> for Columns

Source§

type Output = ColumnBuffer

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Columns

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl Serialize for Columns

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,