#[non_exhaustive]pub struct SqlCsvImportOptions {
pub table: String,
pub columns: Vec<String>,
pub escape_character: String,
pub quote_character: String,
pub fields_terminated_by: String,
pub lines_terminated_by: String,
/* private fields */
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.table: String
The table to which CSV data is imported.
columns: Vec<String>
The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
escape_character: String
Specifies the character that should appear before a data character that needs to be escaped.
quote_character: String
Specifies the quoting character to be used when a data value is quoted.
fields_terminated_by: String
Specifies the character that separates columns within each row (line) of the file.
lines_terminated_by: String
This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
Implementations§
Source§impl SqlCsvImportOptions
impl SqlCsvImportOptions
pub fn new() -> Self
Sourcepub fn set_columns<T, V>(self, v: T) -> Self
pub fn set_columns<T, V>(self, v: T) -> Self
Sets the value of columns.
Sourcepub fn set_escape_character<T: Into<String>>(self, v: T) -> Self
pub fn set_escape_character<T: Into<String>>(self, v: T) -> Self
Sets the value of escape_character.
Sourcepub fn set_quote_character<T: Into<String>>(self, v: T) -> Self
pub fn set_quote_character<T: Into<String>>(self, v: T) -> Self
Sets the value of quote_character.
Sourcepub fn set_fields_terminated_by<T: Into<String>>(self, v: T) -> Self
pub fn set_fields_terminated_by<T: Into<String>>(self, v: T) -> Self
Sets the value of fields_terminated_by.
Sourcepub fn set_lines_terminated_by<T: Into<String>>(self, v: T) -> Self
pub fn set_lines_terminated_by<T: Into<String>>(self, v: T) -> Self
Sets the value of lines_terminated_by.
Trait Implementations§
Source§impl Clone for SqlCsvImportOptions
impl Clone for SqlCsvImportOptions
Source§fn clone(&self) -> SqlCsvImportOptions
fn clone(&self) -> SqlCsvImportOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SqlCsvImportOptions
impl Debug for SqlCsvImportOptions
Source§impl Default for SqlCsvImportOptions
impl Default for SqlCsvImportOptions
Source§fn default() -> SqlCsvImportOptions
fn default() -> SqlCsvImportOptions
Returns the “default value” for a type. Read more
Source§impl Message for SqlCsvImportOptions
impl Message for SqlCsvImportOptions
Source§impl PartialEq for SqlCsvImportOptions
impl PartialEq for SqlCsvImportOptions
impl StructuralPartialEq for SqlCsvImportOptions
Auto Trait Implementations§
impl Freeze for SqlCsvImportOptions
impl RefUnwindSafe for SqlCsvImportOptions
impl Send for SqlCsvImportOptions
impl Sync for SqlCsvImportOptions
impl Unpin for SqlCsvImportOptions
impl UnwindSafe for SqlCsvImportOptions
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