Sign in

    superbigcup325/moonlake/sql does not have a README file

    AggFn

    pub(all) enum AggFn {
    Sum
    Avg
    Count
    CountStar
    CountDistinct
    SdSamp
    SdPop
    StringAgg
    VarSamp
    VarPop
    Median
    Min
    Max
    } derive(Eq,
    Debug
    )

    AggFn::equal

    fn AggFn::equal(AggFn, AggFn) -> Bool

    AggFn::not_equal

    fn AggFn::not_equal(x : AggFn, y : AggFn) -> Bool

    AggFn::to_repr

    ExtractField

    pub(all) enum ExtractField {
    Year
    Month
    Day
    } derive(Eq,
    Debug
    )

    ExtractField::equal

    ExtractField::not_equal

    fn ExtractField::not_equal(x : ExtractField, y : ExtractField) -> Bool

    FromItem

    pub(all) struct FromItem {
    table : TableRef
    tbl_alias : String?
    col_aliases : Array[String]?
    join : JoinKind
    on : LExpr?
    } derive(Eq,
    Debug
    )

    FromItem::equal

    fn FromItem::equal(FromItem, FromItem) -> Bool

    FromItem::not_equal

    fn FromItem::not_equal(x : FromItem, y : FromItem) -> Bool

    FromItem::to_repr

    IntervalUnit

    pub(all) enum IntervalUnit {
    Days
    Months
    Years
    } derive(Eq,
    Debug
    )

    INTERVAL literal unit (interval '90' day); only date arithmetic consumes it.

    IntervalUnit::equal

    IntervalUnit::not_equal

    fn IntervalUnit::not_equal(x : IntervalUnit, y : IntervalUnit) -> Bool

    JoinKind

    pub(all) enum JoinKind {
    Inner
    Left
    Right
    Full
    Semi
    Anti
    AntiLoose
    Cross
    } derive(Eq,
    Debug
    )

    How a FROM item attaches to the accumulated rows before it. The first item's kind is meaningless (Inner, ignored).

    JoinKind::equal

    fn JoinKind::equal(JoinKind, JoinKind) -> Bool

    JoinKind::not_equal

    fn JoinKind::not_equal(x : JoinKind, y : JoinKind) -> Bool

    JoinKind::to_repr

    LExpr

    pub(all) enum LExpr {
    Col(String)
    ColQ(String, String)
    Lit(
    Scalar
    )
    Arith(
    ArithOp
    , LExpr, LExpr)
    Cmp(
    CmpOp
    , LExpr, LExpr)
    And(LExpr, LExpr)
    Or(LExpr, LExpr)
    Not(LExpr)
    Between(LExpr, LExpr, LExpr)
    In(LExpr, Array[LExpr])
    NotIn(LExpr, Array[LExpr])
    Like(LExpr, LExpr)
    NotLike(LExpr, LExpr)
    IsNull(LExpr, Bool)
    Star
    Extract(ExtractField, LExpr)
    Case(Array[(LExpr, LExpr)], LExpr?)
    Agg(AggFn, LExpr?)
    ScalarSub(Select)
    InSelect(LExpr, Select, Bool)
    Exists(Select, Bool)
    Func(String, Array[LExpr])
    Cast(LExpr,
    DataType
    )
    IntervalLit(Int64, IntervalUnit)
    } derive(Eq,
    Debug
    )

    LExpr::equal

    fn LExpr::equal(LExpr, LExpr) -> Bool

    LExpr::not_equal

    fn LExpr::not_equal(x : LExpr, y : LExpr) -> Bool

    LExpr::to_repr

    OrderItem

    pub(all) struct OrderItem {
    key : LExpr
    desc : Bool
    nulls_first : Bool?
    } derive(Eq,
    Debug
    )

    OrderItem::equal

    fn OrderItem::equal(OrderItem, OrderItem) -> Bool

    OrderItem::not_equal

    fn OrderItem::not_equal(x : OrderItem, y : OrderItem) -> Bool

    Select

    pub(all) struct Select {
    from : Array[FromItem]
    filter : LExpr?
    group_by : Array[LExpr]
    having : LExpr?
    items : Array[SelectItem]
    windows : Array[WindowSpec]
    order_by : Array[OrderItem]
    limit : Int?
    offset : Int?
    distinct : Bool
    setop : (SetOpKind, Bool, Select)?
    } derive(Eq,
    Debug
    )

    W2 subset: the full select pipeline over a FROM chain joined in written order (left-deep; comma lists behave as INNER joins with the join conditions supplied by WHERE).

    Select::equal

    fn Select::equal(Select, Select) -> Bool

    Select::not_equal

    fn Select::not_equal(x : Select, y : Select) -> Bool

    Select::to_repr

    SelectItem

    pub(all) struct SelectItem {
    expr : LExpr
    label : String?
    } derive(Eq,
    Debug
    )

    SelectItem::equal

    fn SelectItem::equal(SelectItem, SelectItem) -> Bool

    SelectItem::not_equal

    fn SelectItem::not_equal(x : SelectItem, y : SelectItem) -> Bool

    SetOpKind

    pub(all) enum SetOpKind {
    Union
    Intersect
    Except
    } derive(Eq,
    Debug
    )

    The set-operation kind joining a select into the chain before it.

    SetOpKind::equal

    fn SetOpKind::equal(SetOpKind, SetOpKind) -> Bool

    SetOpKind::not_equal

    fn SetOpKind::not_equal(x : SetOpKind, y : SetOpKind) -> Bool

    TableRef

    pub(all) enum TableRef {
    Named(String)
    Sub(Select)
    } derive(Eq,
    Debug
    )

    TableRef::equal

    fn TableRef::equal(TableRef, TableRef) -> Bool

    TableRef::not_equal

    fn TableRef::not_equal(x : TableRef, y : TableRef) -> Bool

    TableRef::to_repr

    WinFn

    pub(all) enum WinFn {
    RowNumber
    Rank
    DenseRank
    Agg(AggFn, LExpr?)
    } derive(Eq,
    Debug
    )

    The function of one window definition. Agg carries the aggregate name with its input (None only for count(*)); the parser only lets aggregates and the three ranking functions take OVER.

    WinFn::equal

    fn WinFn::equal(WinFn, WinFn) -> Bool

    WinFn::not_equal

    fn WinFn::not_equal(x : WinFn, y : WinFn) -> Bool

    WinFn::to_repr

    WindowSpec

    pub(all) struct WindowSpec {
    fn_ : WinFn
    partition : Array[LExpr]
    order : Array[(LExpr, Bool, Bool?)]
    } derive(Eq,
    Debug
    )

    One fn(...) OVER (PARTITION BY ... ORDER BY ...) definition in the select list. The select item itself carries an index marker; the binder lowers the spec against the item's binding space.

    WindowSpec::equal

    fn WindowSpec::equal(WindowSpec, WindowSpec) -> Bool

    WindowSpec::not_equal

    fn WindowSpec::not_equal(x : WindowSpec, y : WindowSpec) -> Bool

    contains_win_marker

    fn contains_win_marker(e : LExpr) -> Bool

    True when the expression contains a __win select-list marker. Subquery boundaries stop the walk: a nested select body numbered its own markers and owns them. The binder's window lowering also consults this (window functions cannot nest inside aggregates or each other).

    parse_select

    fn parse_select(sql : String) -> Select raise
    SqlError

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io