Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActivityLog searching by metadata BE implementation #3059

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

gagandeepb
Copy link
Contributor

Description

Searching by metadata BE implementation.

@gagandeepb gagandeepb changed the title Searching by metadata BE implementation ActivityLog searching by metadata BE implementation Oct 10, 2024
@gagandeepb gagandeepb force-pushed the searching-by-metadata-impl branch 2 times, most recently from 302074d to 44be4b1 Compare October 16, 2024 12:56
@@ -0,0 +1,39 @@
defmodule Trento.Postgrex.Jsonpath do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adapted from here.

lib/trento/activity_log.ex Outdated Show resolved Hide resolved
@gagandeepb gagandeepb marked this pull request as ready for review November 6, 2024 11:37
@gagandeepb gagandeepb self-assigned this Nov 8, 2024
@gagandeepb gagandeepb added enhancement New feature or request elixir Pull requests that update Elixir code labels Nov 8, 2024
gagandeepb and others added 14 commits November 11, 2024 13:51
Containment is preferred over Existence.
This is needed to support the Postgres Jsonpath type.
...for  search by metadata. Specifically, this adds functions that validate the search string and then parse it into the format expected by Jsonpath. This implementation can be extended to do key:value look ups as well as range/numeric equality look ups on integer fields at a later point.
... to the activity logs endpoint.
Makes capture binding late instead of early
...by breaking it into two
commit 16dc8856c5c7e2f4f3f86d5a2a35ca8c055ea370
Author: Gagandeep Bhatia <gagandeep.bhatia@suse.com>
Date:   Tue Nov 5 12:00:40 2024 +0100

    Adds tests

    - Adapts the public interface of the parse module a bit to allow better inspection of failing parse cases.
    - Parse failure is now an info level log message.
    - Adds tests cases for parse success and failure

commit 5aa83a4d764682d5e40b8f2174539c89bc4c8fec
Author: Gagandeep Bhatia <gagandeep.bhatia@suse.com>
Date:   Wed Oct 23 14:40:19 2024 +0200

    Connects new parser implementation

    ... to the context module

commit df0065d127d7d6ce59cd1e7a10aac5dce2140b2c
Author: Gagandeep Bhatia <gagandeep.bhatia@suse.com>
Date:   Wed Oct 23 13:25:02 2024 +0200

    PoC PEG based query parser

    Implements a parsing expression grammar (PEG) based metadata query parser that turns search strings into valid jsonpath expressions
This adds expected parses for given test cases to assert against
- support for Numeric ranges
- Additional characters that the search regex will now accept
- Tests fixed
- Credo fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
elixir Pull requests that update Elixir code enhancement New feature or request user story
Development

Successfully merging this pull request may close these issues.

2 participants