pub struct CsvConfig {
pub collection: String,
pub has_header: bool,
pub delimiter: u8,
pub quote: u8,
pub treat_empty_as_null: bool,
pub batch_size: usize,
pub skip_errors: bool,
pub max_records: Option<usize>,
pub column_names: Option<Vec<String>>,
}Expand description
CSV import configuration
Fields§
§collection: StringCollection/table name
has_header: boolWhether the first row contains column names.
When false, columns are named c0, c1, …
delimiter: u8Field delimiter byte. Default ,. Common alternates: ;, \t.
quote: u8Quote character used to wrap fields that contain the delimiter or
newlines. Default ". Doubled inside a field is an escaped quote.
treat_empty_as_null: boolEmpty (unquoted) fields map to Value::Null when true.
An empty quoted field ("") is always Value::text("").
batch_size: usizeBatch size (records processed per bulk-insert chunk).
skip_errors: boolSkip lines that fail to parse instead of aborting.
max_records: Option<usize>Maximum records to import (None for all).
column_names: Option<Vec<String>>Explicit column names, used when has_header is false but the
caller wants typed names. Takes precedence over c0, c1, …
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CsvConfig
impl RefUnwindSafe for CsvConfig
impl Send for CsvConfig
impl Sync for CsvConfig
impl Unpin for CsvConfig
impl UnsafeUnpin for CsvConfig
impl UnwindSafe for CsvConfig
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request