Skip to content

Commit

Permalink
feat: add case for MemberNode which handle nested query
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Luthfi Fahlevi committed Aug 22, 2024
1 parent 5ab982a commit 7a74aa6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/docs/reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ The query expr at least must consist `refreshed_at`, `type`, and `service` ident
`type` and `service` identifiers valid only if it's using equals (`==`) or `IN` operator, to prevent human error on deleting assets.
For example of the correct query:
```
refreshed_at <= "2023-12-12 23:59:59" && service in ["service-1", "service-2"] && (type == "table") || description != "definitely-active-asset")
refreshed_at <= "2023-12-12 23:59:59" && service in ["service-1", "service-2"] && (type == "table") || data.foo != "bar")
```

The idea of query expr converter is convert `query_expr` to AST (Abstract Syntax Tree), then make it as SQL Query and Elasticsearch Query so can used as filter query on deletion process.
Currently, the expr query **already support most of the frequently used cases, except** ChainNode, MemberNode, SliceNode, CallNode, ClosureNode, PointerNode, VariableDeclaratorNode, MapNode, and PairNode.
Currently, the expr query **already support most of the frequently used cases, except** ChainNode, SliceNode, CallNode, ClosureNode, PointerNode, VariableDeclaratorNode, MapNode, and PairNode.
For more contexts, please refer to [AST Node](https://github.com/expr-lang/expr/blob/master/ast/node.go) in expr-lang library and [Query Expr Converter](https://github.com/goto/compass/tree/main/pkg/query_expr) in Compass.
Example of **unsupported query for now** due to not directly produce a value is
```
Expand Down

0 comments on commit 7a74aa6

Please sign in to comment.