sqlint/ast/
over.rs

1use crate::ast::{Column, Ordering};
2
3#[derive(Debug, Default, Clone, PartialEq)]
4/// Determines the partitioning and ordering of a rowset before the associated
5/// window function is applied.
6pub struct Over<'a> {
7    pub(crate) ordering: Ordering<'a>,
8    pub(crate) partitioning: Vec<Column<'a>>,
9}
10
11impl<'a> Over<'a> {
12    pub fn is_empty(&self) -> bool {
13        self.ordering.is_empty() && self.partitioning.is_empty()
14    }
15}