Skip to content

Commit

Permalink
feat: add more example
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Luthfi Fahlevi committed Aug 22, 2024
1 parent aa6d4f0 commit 0418df2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/docs/reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ 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" || data.foo != "bar")
refreshed_at <= "2023-12-12 23:59:59" && service in ["service-1", "service-2"] && type == "table"
```
```
refreshed_at <= (now() - duration('24h') && service == "service-1" && (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.
Expand Down

0 comments on commit 0418df2

Please sign in to comment.