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
impl Columns
pub fn scalar_value(&self) -> Value
pub fn new(columns: Vec<ColumnWithName>) -> Self
pub fn with_system_columns( columns: Vec<ColumnWithName>, row_numbers: Vec<RowNumber>, created_at: Vec<DateTime>, updated_at: Vec<DateTime>, ) -> Self
pub fn single_row<'b>( rows: impl IntoIterator<Item = (&'b str, Value)>, ) -> Columns
pub fn with_row_numbers(self, row_numbers: Vec<RowNumber>) -> Self
pub fn from_catalog_columns(cols: &[CatalogColumn]) -> Self
pub fn apply_headers(&mut self, headers: &ColumnHeaders)
Source§impl Columns
impl Columns
pub fn number(&self) -> RowNumber
pub fn shape(&self) -> (usize, usize)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = ColumnRef<'_>> + '_
pub fn first(&self) -> Option<ColumnRef<'_>>
pub fn last(&self) -> Option<ColumnRef<'_>>
pub fn get(&self, index: usize) -> Option<ColumnRef<'_>>
pub fn name_at(&self, index: usize) -> &Fragment
pub fn data_at(&self, index: usize) -> &ColumnBuffer
pub fn data_at_mut(&mut self, index: usize) -> &mut ColumnBuffer
pub fn row(&self, i: usize) -> Vec<Value>
pub fn column(&self, name: &str) -> Option<ColumnRef<'_>>
pub fn row_count(&self) -> usize
pub fn has_rows(&self) -> bool
pub fn is_scalar(&self) -> bool
pub fn get_row(&self, index: usize) -> Vec<Value>
pub fn assert_invariants(&self, ctx: &str)
Source§impl Columns
impl Columns
pub fn from_rows(names: &[&str], result_rows: &[Vec<Value>]) -> Self
pub fn from_encoded_rows( shape: &RowShape, ids: &[RowNumber], rows: &[EncodedRow], ) -> Self
Source§impl Columns
impl Columns
pub fn extract_by_indices(&self, indices: &[usize]) -> Columns
pub fn extract_row(&self, index: usize) -> Columns
pub fn append_rows_by_indices(&mut self, source: &Columns, indices: &[usize])
pub fn append_all(&mut self, source: Columns) -> Result<()>
pub fn concat(batches: Vec<Columns>) -> Result<Option<Columns>>
pub fn remove_row(&mut self, row_number: RowNumber) -> bool
pub fn project_by_names(&self, names: &[String]) -> Columns
pub fn partition_by_keys<K: Hash + Eq + Clone>( &self, keys: &[K], ) -> IndexMap<K, Columns>
pub fn from_row(row: &Row) -> Self
pub fn reset_from_row(&mut self, row: &Row)
pub fn reset_from_row_with_pool(&mut self, row: &Row, pool: &ColumnBufferPool)
pub fn to_single_row(&self) -> Row
Source§impl Columns
impl Columns
pub fn get_bool(&self, name: &str, row_idx: usize) -> Option<bool>
pub fn get_f32(&self, name: &str, row_idx: usize) -> Option<f32>
pub fn get_f64(&self, name: &str, row_idx: usize) -> Option<f64>
pub fn get_float8(&self, name: &str, row_idx: usize) -> Option<OrderedF64>
pub fn get_i8(&self, name: &str, row_idx: usize) -> Option<i8>
pub fn get_i16(&self, name: &str, row_idx: usize) -> Option<i16>
pub fn get_i32(&self, name: &str, row_idx: usize) -> Option<i32>
pub fn get_i64(&self, name: &str, row_idx: usize) -> Option<i64>
pub fn get_i128(&self, name: &str, row_idx: usize) -> Option<i128>
pub fn get_u8(&self, name: &str, row_idx: usize) -> Option<u8>
pub fn get_u16(&self, name: &str, row_idx: usize) -> Option<u16>
pub fn get_u32(&self, name: &str, row_idx: usize) -> Option<u32>
pub fn get_u64(&self, name: &str, row_idx: usize) -> Option<u64>
pub fn get_u128(&self, name: &str, row_idx: usize) -> Option<u128>
pub fn get_string(&self, name: &str, row_idx: usize) -> Option<String>
pub fn get_date(&self, name: &str, row_idx: usize) -> Option<Date>
pub fn get_datetime(&self, name: &str, row_idx: usize) -> Option<DateTime>
pub fn get_time(&self, name: &str, row_idx: usize) -> Option<Time>
pub fn get_duration(&self, name: &str, row_idx: usize) -> Option<Duration>
pub fn get_identity_id(&self, name: &str, row_idx: usize) -> Option<IdentityId>
pub fn get_uuid4(&self, name: &str, row_idx: usize) -> Option<Uuid4>
pub fn get_uuid7(&self, name: &str, row_idx: usize) -> Option<Uuid7>
pub fn get_blob(&self, name: &str, row_idx: usize) -> Option<Blob>
pub fn get_int(&self, name: &str, row_idx: usize) -> Option<Int>
pub fn get_uint(&self, name: &str, row_idx: usize) -> Option<Uint>
pub fn get_decimal(&self, name: &str, row_idx: usize) -> Option<Decimal>
pub fn get_value(&self, name: &str, row_idx: usize) -> Option<Value>
pub fn is_undefined(&self, name: &str, row_idx: usize) -> bool
pub fn get_row_number(&self, row_idx: usize) -> Option<RowNumber>
Source§impl Columns
impl Columns
pub fn append_rows( &mut self, shape: &RowShape, rows: impl IntoIterator<Item = EncodedRow>, row_numbers: Vec<RowNumber>, ) -> Result<()>
Source§impl Columns
impl Columns
pub fn group_by_view(&self, keys: &[&str]) -> Result<GroupByView>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Columns
impl<'de> Deserialize<'de> for Columns
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Columns
impl RefUnwindSafe for Columns
impl Send for Columns
impl Sync for Columns
impl Unpin for Columns
impl UnsafeUnpin for Columns
impl UnwindSafe for Columns
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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