Struct sqlx_exasol::etl::ExportBuilder
source · pub struct ExportBuilder<'a> { /* private fields */ }Expand description
A builder for an ETL EXPORT job.
Calling [build().await] will ouput a future that drives the EXPORT query execution and a
Vec<ExaReader> which must be concurrently used to read data from Exasol.
Implementations§
source§impl<'a> ExportBuilder<'a>
impl<'a> ExportBuilder<'a>
pub fn new(source: ExportSource<'a>) -> Self
sourcepub async fn build<'c>(
&'a self,
con: &'c mut ExaConnection
) -> Result<(BoxFuture<'c, Result<ExaQueryResult, Error>>, Vec<ExaExport>), SqlxError>where
'c: 'a,
pub async fn build<'c>( &'a self, con: &'c mut ExaConnection ) -> Result<(BoxFuture<'c, Result<ExaQueryResult, Error>>, Vec<ExaExport>), SqlxError>where 'c: 'a,
Builds the EXPORT job.
This implies submitting the EXPORT query. The output will be a future to await the result of the job and the workers that can be used for ETL IO.
Errors
Returns an error if the job could not be built and submitted.
sourcepub fn num_readers(&mut self, num_readers: usize) -> &mut Self
pub fn num_readers(&mut self, num_readers: usize) -> &mut Self
Sets the number of reader jobs that will be started.
If set to 0, then as many as possible will be used (one per node).
Providing a number bigger than the number of nodes is the same as providing 0.
pub fn buffer_size(&mut self, buffer_size: usize) -> &mut Self
pub fn comment(&mut self, comment: &'a str) -> &mut Self
pub fn encoding(&mut self, encoding: &'a str) -> &mut Self
pub fn null(&mut self, null: &'a str) -> &mut Self
pub fn row_separator(&mut self, separator: RowSeparator) -> &mut Self
pub fn column_separator(&mut self, separator: &'a str) -> &mut Self
pub fn column_delimiter(&mut self, delimiter: &'a str) -> &mut Self
pub fn with_column_names(&mut self, flag: bool) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for ExportBuilder<'a>
impl<'a> Send for ExportBuilder<'a>
impl<'a> Sync for ExportBuilder<'a>
impl<'a> Unpin for ExportBuilder<'a>
impl<'a> UnwindSafe for ExportBuilder<'a>
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