Skip to content

Commit

Permalink
Add VALUES row constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
alancai98 committed Oct 30, 2024
1 parent 5c49c76 commit 6022e09
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,16 @@ internal class V1PartiQLParserDefault : V1PartiQLParser {
exprPathStepAllFields(null)
}

override fun visitValues(ctx: GeneratedParser.ValuesContext) = translate(ctx) {
val rows = visitOrEmpty<ExprArray>(ctx.valueRow())
exprBag(rows)
}

override fun visitValueRow(ctx: GeneratedParser.ValueRowContext) = translate(ctx) {
val expressions = visitOrEmpty<Expr>(ctx.expr())
exprArray(expressions)
}

override fun visitValueList(ctx: GeneratedParser.ValueListContext) = translate(ctx) {
val expressions = visitOrEmpty<Expr>(ctx.expr())
exprArray(expressions)
Expand Down

0 comments on commit 6022e09

Please sign in to comment.