Skip to content

Conversation

@toumorokoshi
Copy link
Member

To provide an illustrative example of CEL's usage as a filter language, implement it, along with filtering and sending data along to a functional database (in this case, sqlite).

A small example cel2sql parser was written to illustrate the ability to use CEL as a query language. However, this will be replaced by some cel -> sql parser, hopefully contributed as a more general library and dependency.

Example:

curl $'http://localhost:8081/publishers?filter=description.startsWith(\'tomorrow\')'
{"results":[{"description":"tomorrow they will write again","path":"publishers/foo"}],"nextPageToken":""}

Fixes #59

To provide an illustrative example of CEL's usage as a filter language,
implement it, along with filtering and sending data along to a functional database
(in this case, sqlite).

A small example cel2sql parser was written to illustrate the ability to use
CEL as a query language. However, this will be replaced by some cel -> sql parser,
hopefully contributed as a more general library and dependency.

Example:

```
curl $'http://localhost:8081/publishers?filter=description.startsWith(\'tomorrow\')'
{"results":[{"description":"tomorrow they will write again","path":"publishers/foo"}],"nextPageToken":""}
```

Fixes aep-dev#59
toumorokoshi added a commit to toumorokoshi/aeps that referenced this pull request Jan 10, 2025
It's unclear at this point what order the various AEPs
should be applied on an API endpoint, if they exist.

Adding a section to clarify this. An example of this
precedence is drafted at aep-dev/aepc#60.
@toumorokoshi toumorokoshi merged commit 6fa792d into aep-dev:main Jan 13, 2025
1 check passed
toumorokoshi added a commit to aep-dev/aeps that referenced this pull request Feb 2, 2025
It's unclear at this point what order the various AEPs
should be applied on an API endpoint, if they exist.

Adding a section to clarify this. An example of this
precedence is drafted at aep-dev/aepc#60.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add support for filter / skip expressions, with an example of using CEL

1 participant