Skip to content

Commit

Permalink
Painless script implementation (PEG edition) (#1064)
Browse files Browse the repository at this point in the history
This PR adds a rudimentary implementation of the Painless script. This
is the first usage of the "PEG" parser.
  • Loading branch information
nablaone authored Dec 6, 2024
1 parent aa23807 commit 38c6b7f
Show file tree
Hide file tree
Showing 16 changed files with 2,833 additions and 36 deletions.
8 changes: 5 additions & 3 deletions quesma/model/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package model

import (
"quesma/painful"
"quesma/schema"
"time"
)
Expand Down Expand Up @@ -85,9 +86,10 @@ type (

// RuntimeMapping is a mapping of a field to a runtime expression
type RuntimeMapping struct {
Field string
Type string
Expr Expr
Field string
Type string
DatabaseExpression Expr
PostProcessExpression painful.Expr
}

const MainExecutionPlan = "main"
Expand Down
5 changes: 5 additions & 0 deletions quesma/painful/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# Mark *.go files as generated
# https://github.com/github-linguist/linguist/blob/master/docs/overrides.md

generated_parser.go linguist-generated
Loading

0 comments on commit 38c6b7f

Please sign in to comment.