use crate::batch_plan::_helpers::rules::{null_rule, range_rule, zone_rule};
use crate::loader::models::TablePlan;
pub fn cursor_rules(table: &TablePlan, line: &str, nulls: bool) -> String {
let mut text = match null_rule(table).filter(|_| nulls) {
Some(rule) => format!("{line} ({rule})"),
None => line.to_owned(),
};
if let Some(rule) = range_rule(table) {
text.push_str(&format!("; {rule}"));
}
if let Some((zone, from)) = zone_rule(table) {
text.push_str(&format!("; times without an offset in {zone} ({from})"));
}
text
}