-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: transpile filters to expressions with parameters
Instead of transpiling filters to a single spansql.BoolExpr with spansql.[...]Literal, filters are transpiled to a spansql.BoolExpr with every literal returned as a parameter. This fixes potential security issue where malicous filters are transpiled directly to SQL without proper escaping. Parameters are automatically named using a counter based on order of appearance in the expr.Expr AST. This could be prettier, but atleast provides a deterministic naming which *could* improve ability to cache the filter (this is an assumption).
- Loading branch information
Showing
3 changed files
with
77 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters