Skip to main content

query_data

Function query_data 

Source
pub async fn query_data(
    storage: &dyn StoragePlugin,
    pv: &str,
    start: SystemTime,
    end: SystemTime,
    post_processor: Option<Box<dyn PostProcessor>>,
) -> Result<Box<dyn EventStream>>
Expand description

Execute a data query across a storage plugin, optionally applying a post-processor.

Prepends the last sample whose timestamp is strictly before start so plots stay continuous when the requested window starts in a gap. Java’s getLastEventOfPreviousPartitionBeforeTimeAsStream (5666a8b5) does the same: a slow PV last sampled 10 days ago, queried for the last 5 minutes, returns that 10-day-old sample as the leading point instead of an empty stream.