pub struct CopyOptions {
pub format: CopyFormat,
pub header: bool,
pub delimiter: Option<char>,
pub null_str: Option<String>,
pub quote: Option<char>,
pub escape: Option<char>,
pub force_quote: Option<Vec<String>>,
pub force_not_null: Option<Vec<String>>,
pub force_null: Option<Vec<String>>,
}Expand description
Options for COPY … TO STDOUT [WITH] (…). Defaults reproduce the
bare COPY … TO STDOUT text-format behaviour, so an empty option
list is a no-op. delimiter / null_str / quote fall back to the
per-format defaults (text: \t / \N; csv: , / `` / ") when
unset.
Fields§
§format: CopyFormat§header: bool§delimiter: Option<char>§null_str: Option<String>§quote: Option<char>§escape: Option<char>v7.39 (round 247) — CSV ESCAPE: the character that precedes a
quote (or itself) inside a quoted cell. Defaults to the quote
character (PG’s doubling behavior).
force_quote: Option<Vec<String>>v7.39 (round 247) — CSV FORCE_QUOTE (col, …) / FORCE_QUOTE *:
columns whose non-NULL cells always quote. Some(vec![]) is the
* spelling (every column).
force_not_null: Option<Vec<String>>v7.39 (round 265) — CSV FORCE_NOT_NULL (col, …): for these
columns an UNQUOTED empty field reads as the empty string rather
than NULL (probed). COPY FROM only.
force_null: Option<Vec<String>>v7.39 (round 265) — CSV FORCE_NULL (col, …): for these columns
a QUOTED empty field ("") also reads as NULL (probed). COPY
FROM only.
Trait Implementations§
Source§impl Clone for CopyOptions
impl Clone for CopyOptions
Source§fn clone(&self) -> CopyOptions
fn clone(&self) -> CopyOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more