left factor terms which start with parens (scalar subquery, paren value expr/row ctors)
This commit is contained in:
parent
d202458808
commit
a296b1ec31
|
@ -426,10 +426,7 @@ subquery expression:
|
||||||
[exists|all|any|some] (queryexpr)
|
[exists|all|any|some] (queryexpr)
|
||||||
|
|
||||||
> subquery :: Parser ValueExpr
|
> subquery :: Parser ValueExpr
|
||||||
> subquery =
|
> subquery = SubQueryExpr <$> sqkw <*> parens queryExpr
|
||||||
> choice
|
|
||||||
> [try $ SubQueryExpr SqSq <$> parens queryExpr
|
|
||||||
> ,SubQueryExpr <$> sqkw <*> parens queryExpr]
|
|
||||||
> where
|
> where
|
||||||
> sqkw = choice
|
> sqkw = choice
|
||||||
> [SqExists <$ keyword_ "exists"
|
> [SqExists <$ keyword_ "exists"
|
||||||
|
@ -476,11 +473,12 @@ todo: timestamp types:
|
||||||
> makeWrap _ _ = fail "there must be one or two precision components"
|
> makeWrap _ _ = fail "there must be one or two precision components"
|
||||||
|
|
||||||
|
|
||||||
== value expression parens and row ctor
|
== value expression parens, row ctor and scalar subquery
|
||||||
|
|
||||||
> parensValue :: Parser ValueExpr
|
> parensTerm :: Parser ValueExpr
|
||||||
> parensValue =
|
> parensTerm = parens $ choice
|
||||||
> ctor <$> parens (commaSep1 valueExpr)
|
> [SubQueryExpr SqSq <$> queryExpr
|
||||||
|
> ,ctor <$> commaSep1 valueExpr]
|
||||||
> where
|
> where
|
||||||
> ctor [a] = Parens a
|
> ctor [a] = Parens a
|
||||||
> ctor as = SpecialOp (Name "rowctor") as
|
> ctor as = SpecialOp (Name "rowctor") as
|
||||||
|
@ -589,11 +587,11 @@ fragile and could at least do with some heavy explanation.
|
||||||
> ,caseValue
|
> ,caseValue
|
||||||
> ,cast
|
> ,cast
|
||||||
> ,try specialOpKs
|
> ,try specialOpKs
|
||||||
|
> ,parensTerm
|
||||||
> ,subquery
|
> ,subquery
|
||||||
> ,try app
|
> ,try app
|
||||||
> ,star
|
> ,star
|
||||||
> ,iden
|
> ,iden]
|
||||||
> ,parensValue]
|
|
||||||
> <?> "value expression"
|
> <?> "value expression"
|
||||||
|
|
||||||
expose the b expression for window frame clause range between
|
expose the b expression for window frame clause range between
|
||||||
|
|
Loading…
Reference in a new issue