Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit 38c6b7f

Browse files
authored
Painless script implementation (PEG edition) (#1064)
This PR adds a rudimentary implementation of the Painless script. This is the first usage of the "PEG" parser.
1 parent aa23807 commit 38c6b7f

File tree

16 files changed

+2833
-36
lines changed

16 files changed

+2833
-36
lines changed

quesma/model/query.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package model
44

55
import (
6+
"quesma/painful"
67
"quesma/schema"
78
"time"
89
)
@@ -85,9 +86,10 @@ type (
8586

8687
// RuntimeMapping is a mapping of a field to a runtime expression
8788
type RuntimeMapping struct {
88-
Field string
89-
Type string
90-
Expr Expr
89+
Field string
90+
Type string
91+
DatabaseExpression Expr
92+
PostProcessExpression painful.Expr
9193
}
9294

9395
const MainExecutionPlan = "main"

quesma/painful/.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
# Mark *.go files as generated
3+
# https://github.com/github-linguist/linguist/blob/master/docs/overrides.md
4+
5+
generated_parser.go linguist-generated

0 commit comments

Comments
 (0)