pub struct ExportQuery { /* private fields */ }Expand description
Builder for constructing EXPORT SQL statements.
Exasol EXPORT statements transfer data from tables or queries to external destinations via HTTP transport using CSV format.
Implementations§
Source§impl ExportQuery
impl ExportQuery
Sourcepub fn from_table(table: &str) -> Self
pub fn from_table(table: &str) -> Self
Sourcepub fn from_query(sql: &str) -> Self
pub fn from_query(sql: &str) -> Self
Sourcepub fn schema(self, schema: &str) -> Self
pub fn schema(self, schema: &str) -> Self
Set the schema for a table export.
This method only has an effect when exporting from a table, not from a query.
§Arguments
schema- The schema name.
Sourcepub fn columns(self, cols: Vec<&str>) -> Self
pub fn columns(self, cols: Vec<&str>) -> Self
Set the columns to export from a table.
This method only has an effect when exporting from a table, not from a query.
§Arguments
cols- The column names to export.
Sourcepub fn at_address(self, addr: &str) -> Self
pub fn at_address(self, addr: &str) -> Self
Set the HTTP address for the export destination.
The protocol (http:// or https://) will be determined automatically based on whether a public key is set.
§Arguments
addr- The address in the format “host:port”.
Sourcepub fn with_public_key(self, fingerprint: &str) -> Self
pub fn with_public_key(self, fingerprint: &str) -> Self
Set the public key fingerprint for TLS encryption.
When set, the export will use HTTPS and include a PUBLIC KEY clause.
§Arguments
fingerprint- The SHA-256 fingerprint of the public key.
Sourcepub fn file_name(self, name: &str) -> Self
pub fn file_name(self, name: &str) -> Self
Set the output file name.
Default is “001.csv”. The compression extension will be appended automatically if compression is enabled.
§Arguments
name- The file name.
Sourcepub fn column_separator(self, sep: char) -> Self
pub fn column_separator(self, sep: char) -> Self
Sourcepub fn column_delimiter(self, delim: char) -> Self
pub fn column_delimiter(self, delim: char) -> Self
Sourcepub fn row_separator(self, sep: RowSeparator) -> Self
pub fn row_separator(self, sep: RowSeparator) -> Self
Sourcepub fn null_value(self, val: &str) -> Self
pub fn null_value(self, val: &str) -> Self
Set a custom NULL value representation.
By default, NULL values are exported as empty strings.
§Arguments
val- The string to use for NULL values.
Sourcepub fn delimit_mode(self, mode: DelimitMode) -> Self
pub fn delimit_mode(self, mode: DelimitMode) -> Self
Sourcepub fn compressed(self, compression: Compression) -> Self
pub fn compressed(self, compression: Compression) -> Self
Set the compression type.
The appropriate file extension will be added automatically.
§Arguments
compression- The compression type.
Sourcepub fn with_column_names(self, include: bool) -> Self
pub fn with_column_names(self, include: bool) -> Self
Set whether to include column names in the output.
Default is false.
§Arguments
include- Whether to include column names.
Trait Implementations§
Source§impl Clone for ExportQuery
impl Clone for ExportQuery
Source§fn clone(&self) -> ExportQuery
fn clone(&self) -> ExportQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more