Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b8f0e49
wip: convert OutputBuilder to return format.Formatted instead of string
computator Aug 21, 2026
aa5366c
wip: fix remaining errors from OutputBuilder return type change
computator Aug 24, 2026
0083854
wip: fix some tests
computator Aug 24, 2026
8bd05a1
wip: fix the rest of the tests and integration tests
computator Aug 26, 2026
4449da9
chore: fix errors from merge
computator Sep 1, 2026
6c90ebe
wip: add formatAsParameter
computator Sep 1, 2026
98ee9a4
wip: use formatAsParameter for string values
computator Sep 9, 2026
326840e
formatter extracts string literals
seanjSO Sep 15, 2026
e411afe
add translation cache layer support for extracted string literals
seanjSO Sep 15, 2026
c17cbb1
output builder materialize parameters escapes string literals instead…
seanjSO Sep 15, 2026
5cc0412
strip some parameterization todos
seanjSO Sep 15, 2026
e92f947
update translate/expression_test for params
seanjSO Sep 15, 2026
7095b26
test update sweep
seanjSO Sep 15, 2026
db58467
cleaning and rabbit penance
seanjSO Sep 16, 2026
63a88a3
don't explicitly cast string to text when materializing parameters
seanjSO Sep 16, 2026
844dcb5
add synthetic AST node for property lookup keys
seanjSO Sep 17, 2026
614a58d
update tests for synthetic AST node change
seanjSO Sep 17, 2026
1e08840
dawgrun flag for param materialization
seanjSO Sep 17, 2026
9a90083
update pgd PropertyLookup creation
seanjSO Sep 18, 2026
5e850fd
use E'...' strings for escaping
seanjSO Sep 18, 2026
0c8096b
update tests for E'...'-strings escaping
seanjSO Sep 18, 2026
cc1abce
dawgrun's sqlfmt doesn't play nice with E'...'
seanjSO Sep 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cmd/benchmark/explain.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package main
import (
"context"
"fmt"
"maps"

"github.com/specterops/dawgs/cypher/frontend"
"github.com/specterops/dawgs/cypher/models/pgsql"
Expand Down Expand Up @@ -50,7 +51,9 @@ func newPostgresExplainer(kindMapper pgsql.KindMapper, graphID int32) ExplainFun
return nil, err
}

result := tx.Raw("EXPLAIN (ANALYZE, BUFFERS) "+sqlQuery, translation.Parameters)
maps.Copy(translation.Parameters, sqlQuery.Parameters)

result := tx.Raw("EXPLAIN (ANALYZE, BUFFERS) "+sqlQuery.Statement, translation.Parameters)
defer result.Close()

var plan []string
Expand All @@ -68,7 +71,7 @@ func newPostgresExplainer(kindMapper pgsql.KindMapper, graphID int32) ExplainFun
}

return &ExplainResult{
SQL: sqlQuery,
SQL: sqlQuery.Statement,
Plan: plan,
Optimization: translation.Optimization,
}, nil
Expand Down
7 changes: 5 additions & 2 deletions cmd/graphbench/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package main
import (
"context"
"fmt"
"maps"
"regexp"
"strconv"
"strings"
Expand Down Expand Up @@ -187,9 +188,11 @@ func (s *postgresSQLRunner) explain(ctx context.Context, cypherQuery string, par
return postgresExplain{}, err
}

maps.Copy(translation.Parameters, sqlQuery.Parameters)

var plan []string
if err := s.db.ReadTransaction(ctx, func(tx graph.Transaction) error {
result := tx.Raw("EXPLAIN (ANALYZE, BUFFERS, TIMING OFF) "+sqlQuery, translation.Parameters)
result := tx.Raw("EXPLAIN (ANALYZE, BUFFERS, TIMING OFF) "+sqlQuery.Statement, translation.Parameters)
defer result.Close()

for result.Next() {
Expand All @@ -207,7 +210,7 @@ func (s *postgresSQLRunner) explain(ctx context.Context, cypherQuery string, par
}

return postgresExplain{
SQL: sqlQuery,
SQL: sqlQuery.Statement,
Plan: plan,
Metrics: parsePostgresPlanMetrics(plan),
Optimization: translation.Optimization,
Expand Down
8 changes: 6 additions & 2 deletions cmd/plancorpus/capture.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"fmt"
"maps"
"net/url"
"os"
"path/filepath"
Expand Down Expand Up @@ -280,9 +281,11 @@ func (s *backendCapture) capturePostgres(ctx context.Context, cypherQuery string
return
}

maps.Copy(translation.Parameters, sqlQuery.Parameters)

var plan []string
if err := s.db.ReadTransaction(ctx, func(tx graph.Transaction) error {
result := tx.Raw("EXPLAIN "+sqlQuery, translation.Parameters)
result := tx.Raw("EXPLAIN "+sqlQuery.Statement, translation.Parameters)
defer result.Close()

for result.Next() {
Expand All @@ -298,7 +301,8 @@ func (s *backendCapture) capturePostgres(ctx context.Context, cypherQuery string
record.Error = err.Error()
}

record.SQL = sqlQuery
record.SQL = sqlQuery.Statement
Comment thread
seanjSO marked this conversation as resolved.
record.Params = translation.Parameters
record.PGPlan = plan
record.PGOperators = postgresOperators(plan)
record.PlannedLowerings = loweringNames(translation.Optimization.PlannedLowerings)
Expand Down
Loading
Loading