cratestack_core/schema/selection.rs
1//! Field selection / include shape used by the column-projection path.
2
3use std::collections::BTreeMap;
4
5use serde::{Deserialize, Serialize};
6
7#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
8pub struct SelectionQuery {
9 pub fields: Vec<String>,
10 pub includes: Vec<String>,
11 pub include_fields: BTreeMap<String, Vec<String>>,
12}
13
14impl SelectionQuery {
15 pub fn is_empty(&self) -> bool {
16 self.fields.is_empty() && self.includes.is_empty() && self.include_fields.is_empty()
17 }
18}