hawdb_executor/
read_output.rs1use crate::{QueryOutput, ReadExecutionProfile};
18use hawdb_storage::scan::ScanPruningReport;
19
20#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
21pub struct QueryStreamOptions {
22 pub max_rows: Option<usize>,
23 pub max_payload_bytes: Option<usize>,
24}
25
26#[derive(Debug, Clone, PartialEq, Eq)]
27pub struct QueryStreamReport {
28 pub fully_streamed: bool,
29 pub output_rows: usize,
30 pub output_payload_bytes: usize,
31 pub execution_profile: ReadExecutionProfile<ScanPruningReport>,
32}
33
34#[derive(Debug, Clone, PartialEq, Eq)]
35pub struct BoundedReadQueryOutput {
36 pub output: QueryOutput,
37 pub execution_profile: ReadExecutionProfile<ScanPruningReport>,
38}
39
40#[cfg(test)]
41mod tests {
42 use super::QueryStreamOptions;
43
44 #[test]
45 fn stream_options_default_to_unbounded() {
46 assert_eq!(
47 QueryStreamOptions::default(),
48 QueryStreamOptions {
49 max_rows: None,
50 max_payload_bytes: None,
51 }
52 );
53 }
54}