Skip to main content

sql_fun_sqlast/sem/scalar_expr/
min_max.rs

1use sql_fun_core::IVec;
2
3use crate::{
4    sem::{AnalysisError, FromClause, ParseContext, SemScalarExpr, TypeReference, WithClause},
5    syn::ScanToken,
6};
7
8use super::{AnalyzeScalarExpr, SemScalarExprNode};
9
10/// MIN / MAX expression
11#[derive(Debug, Clone, Eq, Hash, PartialEq, serde::Serialize, serde::Deserialize)]
12pub struct MinMaxExpr {}
13
14impl SemScalarExprNode for MinMaxExpr {
15    fn get_type(&self) -> Option<TypeReference> {
16        todo!()
17    }
18
19    fn is_not_null(&self) -> Option<bool> {
20        todo!()
21    }
22}
23
24impl<TParseContext> AnalyzeScalarExpr<TParseContext, crate::syn::MinMaxExpr> for MinMaxExpr
25where
26    TParseContext: ParseContext,
27{
28    fn analyze_scalar_expr(
29        _context: TParseContext,
30        _with_clause: &WithClause,
31        _from_clause: &FromClause,
32        _syn: crate::syn::MinMaxExpr,
33        _tokens: &IVec<ScanToken>,
34    ) -> Result<(SemScalarExpr, TParseContext), AnalysisError> {
35        todo!()
36    }
37}