Skip to main content

EdgeCursor

Trait EdgeCursor 

Source
pub trait EdgeCursor: Send + Debug {
    // Required method
    fn next_batch(
        &mut self,
        batch_size: usize,
    ) -> Result<Vec<Edge>, StorageError>;

    // Provided methods
    fn next_column_batch(
        &mut self,
        prop_names: &[Arc<str>],
        batch_size: usize,
    ) -> Result<EdgeColumnBatch, StorageError> { ... }
    fn malformed_skipped(&self) -> u64 { ... }
}
Expand description

A cursor that yields edges in batches.

Required Methods§

Source

fn next_batch(&mut self, batch_size: usize) -> Result<Vec<Edge>, StorageError>

Read the next batch of edges (at most batch_size rows).

Returns an empty Vec when the scan is exhausted.

Provided Methods§

Source

fn next_column_batch( &mut self, prop_names: &[Arc<str>], batch_size: usize, ) -> Result<EdgeColumnBatch, StorageError>

Read the next batch as column-major data (at most batch_size rows).

prop_names lists the properties to decode; an empty list means decode every property of the edge. The returned batch carries one PropertyColumn per requested property.

The default implementation falls back to Self::next_batch and transposes the rows into columns. Storage engines override this when they can decode straight from the column store.

Returns an empty batch when the scan is exhausted.

Source

fn malformed_skipped(&self) -> u64

Number of malformed/unparseable entries skipped so far.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§