pub struct SetSchema {
pub include_key: bool,
pub key_column_name: String,
pub member_column_name: String,
pub include_row_index: bool,
pub row_index_column_name: String,
}Expand description
Schema configuration for Redis set scanning.
Defines output columns when scanning Redis sets. Each set member becomes a row in the output DataFrame.
§Example
ⓘ
use polars_redis::SetSchema;
let schema = SetSchema::new()
.with_key(true)
.with_member_column_name("tag");§Output Schema
_key(optional): The Redis keymember: The set member value (Utf8)_index(optional): Row number
Fields§
§include_key: boolWhether to include the Redis key as a column.
key_column_name: StringName of the key column.
member_column_name: StringName of the member column.
include_row_index: boolWhether to include a row index column.
row_index_column_name: StringName of the row index column.
Implementations§
Source§impl SetSchema
impl SetSchema
Sourcepub fn with_key_column_name(self, name: &str) -> Self
pub fn with_key_column_name(self, name: &str) -> Self
Set the key column name.
Sourcepub fn with_member_column_name(self, name: &str) -> Self
pub fn with_member_column_name(self, name: &str) -> Self
Set the member column name.
Sourcepub fn with_row_index(self, include: bool) -> Self
pub fn with_row_index(self, include: bool) -> Self
Set whether to include a row index column.
Sourcepub fn with_row_index_column_name(self, name: &str) -> Self
pub fn with_row_index_column_name(self, name: &str) -> Self
Set the row index column name.
Sourcepub fn to_arrow_schema(&self) -> Schema
pub fn to_arrow_schema(&self) -> Schema
Build the Arrow schema for this configuration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SetSchema
impl RefUnwindSafe for SetSchema
impl Send for SetSchema
impl Sync for SetSchema
impl Unpin for SetSchema
impl UnwindSafe for SetSchema
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> 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