pub struct CopyOptions { /* private fields */ }Expand description
Options for COPY text format operations (CSV, TSV, etc.).
§Example
use hyperdb_api::copy::CopyOptions;
// CSV with header
let opts = CopyOptions::csv().with_header(true);
// TSV (tab-separated)
let opts = CopyOptions::tsv();
// Custom delimiter
let opts = CopyOptions::csv().with_delimiter(b'|');Implementations§
Source§impl CopyOptions
impl CopyOptions
Sourcepub fn with_header(self, header: bool) -> Self
pub fn with_header(self, header: bool) -> Self
Enables or disables the header row.
Sourcepub fn with_delimiter(self, delimiter: u8) -> Self
pub fn with_delimiter(self, delimiter: u8) -> Self
Sets the column delimiter character.
Sourcepub fn with_null(self, null_string: impl Into<String>) -> Self
pub fn with_null(self, null_string: impl Into<String>) -> Self
Sets the string used to represent NULL values.
Sourcepub fn with_quote(self, quote: u8) -> Self
pub fn with_quote(self, quote: u8) -> Self
Sets the quote character for CSV format.
Sourcepub fn with_escape(self, escape: u8) -> Self
pub fn with_escape(self, escape: u8) -> Self
Sets the escape character for CSV format.
Sourcepub fn with_chunk_size(self, size: usize) -> Self
pub fn with_chunk_size(self, size: usize) -> Self
Sets the import chunk size in bytes.
Controls the buffer size used when streaming data from a reader
during import_text(). Larger values
reduce syscall overhead but use more memory.
Default is 1 MB. Typical range: 64 KB to 16 MB.
§Panics
Panics if size is 0.
Trait Implementations§
Source§impl Clone for CopyOptions
impl Clone for CopyOptions
Source§fn clone(&self) -> CopyOptions
fn clone(&self) -> CopyOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CopyOptions
impl RefUnwindSafe for CopyOptions
impl Send for CopyOptions
impl Sync for CopyOptions
impl Unpin for CopyOptions
impl UnsafeUnpin for CopyOptions
impl UnwindSafe for CopyOptions
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> 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