tass 0.9.0

A pager for tabular data
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub mod csv;
#[cfg(feature = "json")]
pub mod json;
#[cfg(feature = "parquet")]
pub mod parquet;
#[cfg(feature = "virt")]
pub mod virt;

use arrow::record_batch::RecordBatch;

pub trait DataSource {
    fn check_for_new_rows(&mut self) -> anyhow::Result<usize>;
    fn row_count(&self) -> usize;
    fn fetch_batch(&mut self, offset: usize, len: usize) -> anyhow::Result<RecordBatch>;
    fn search(&self, needle: &str, from: usize, rev: bool) -> anyhow::Result<Option<usize>>;
}