Trait connectorx::sources::PartitionParser

source ·
pub trait PartitionParser<'a>: Send {
    type TypeSystem: TypeSystem;
    type Error: From<ConnectorXError> + Send + Debug;

    // Required method
    fn fetch_next(&mut self) -> Result<(usize, bool), Self::Error>;

    // Provided method
    fn parse<'r, T>(
        &'r mut self,
    ) -> Result<T, <Self as PartitionParser<'a>>::Error>
       where T: TypeAssoc<Self::TypeSystem>,
             Self: Produce<'r, T, Error = <Self as PartitionParser<'a>>::Error> { ... }
}

Required Associated Types§

Required Methods§

source

fn fetch_next(&mut self) -> Result<(usize, bool), Self::Error>

Fetch next batch of rows from database, return (number of rows fetched to local, whether all rows are fechted from database). There might be rows that are not consumed yet when calling the next fetch_next. The function might be called even after the last batch is fetched.

Provided Methods§

source

fn parse<'r, T>(&'r mut self) -> Result<T, <Self as PartitionParser<'a>>::Error>
where T: TypeAssoc<Self::TypeSystem>, Self: Produce<'r, T, Error = <Self as PartitionParser<'a>>::Error>,

Read a value T by calling Produce<T>::produce. Usually this function does not need to be implemented.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a> PartitionParser<'a> for BigQuerySourceParser

source§

impl<'a> PartitionParser<'a> for CSVSourcePartitionParser<'a>

source§

impl<'a> PartitionParser<'a> for DummySourcePartitionParser<'a>

source§

impl<'a> PartitionParser<'a> for MsSQLSourceParser<'a>

source§

impl<'a> PartitionParser<'a> for MySQLBinarySourceParser<'a>

source§

impl<'a> PartitionParser<'a> for MySQLTextSourceParser<'a>

source§

impl<'a> PartitionParser<'a> for OracleTextSourceParser<'a>

source§

impl<'a> PartitionParser<'a> for PostgresBinarySourcePartitionParser<'a>

source§

impl<'a> PartitionParser<'a> for PostgresCSVSourceParser<'a>

source§

impl<'a> PartitionParser<'a> for PostgresRawSourceParser<'a>

source§

impl<'a> PartitionParser<'a> for PostgresSimpleSourceParser

source§

impl<'a> PartitionParser<'a> for SQLiteSourcePartitionParser<'a>

source§

impl<'a> PartitionParser<'a> for TrinoSourcePartitionParser<'a>